Request a split order request in order to split your swap order into chunks on different DEXs.
dexter.newSplitSwapRequest()
...
withSwapInToken(Token): SplitSwapRequest
Set which Token in the pool you are swapping in.
dexter.newSplitSwapRequest()
.withSwapInToken('lovelace')
...
withSwapOutToken(Token): SplitSwapRequest
Set which Token in the pool you are swapping out.
dexter.newSplitSwapRequest()
.withSwapOutToken('lovelace')
...
withSwapInAmountMappings(SwapInAmountMapping[]): SplitSwapRequest
Set how much you are swapping in for each DEX.
dexter.newSplitSwapRequest()
.withSwapInAmountMappings([
{
swapInAmount: 2_000000n,
liquidityPool: new LiquidityPool(Minswap.identifier, ...)
},
{
swapInAmount: 5_000000n,
liquidityPool: new LiquidityPool(WingRiders.identifier, ...)
},
])
...
withSwapOutAmountMappings(SwapOutAmountMapping[]): SplitSwapRequest
Set how much you are swapping out for each DEX.
dexter.newSplitSwapRequest()
.withSwapOutAmountMappings([
{
swapInAmount: 2_000000n,
liquidityPool: new LiquidityPool(Minswap.identifier, ...)
},
{
swapInAmount: 5_000000n,
liquidityPool: new LiquidityPool(WingRiders.identifier, ...)
},
])
flip(): SplitSwapRequest
Flip your swap in and swap out token.
dexter.newSplitSwapRequest()
.flip()
...
withSlippagePercent(number): SplitSwapRequest
Set how much slippage you will tolerate. (Default: 1.0%)
dexter.newSplitSwapRequest()
.withSlippagePercent(0.5)
...
getEstimatedReceive(): bigint
Get the total estimated receive for your swap.
Will return a sum of the estimated receive for each DEX mapping.
dexter.newSplitSwapRequest()
.getEstimatedReceive()
getMinimumReceive(): bigint
Get the total minimum receive for your swap.
Will return a sum of the minimum receive for each DEX mapping.
dexter.newSplitSwapRequest()
.getMinimumReceive()
getAvgPriceImpactPercent(): number
Get the average price impact percentage for your swap.
Will return the average price impact for each swap on each DEX.
dexter.newSplitSwapRequest()
.getAvgPriceImpactPercent()
getSwapFees(): SwapFee[]
Get the DEX specific fees for your swap.
Will return all swap fees associated with each DEX in the swap.
dexter.newSplitSwapRequest()
.getSwapFees()