Skip to main content

Swap

swap

Select token in and token out and amount for the swap.

  swap (
tokenIn: Token!
tokenOut: Token!
amount: BigInt!
tradeType: TradeType!
tradeOptions: TradeOptions!
txOverrides: TxOverrides
): Ethereum_TxReceipt!

exec

Executes the trade.

  exec(
trade: Trade!
tradeOptions: TradeOptions!
txOverrides: TxOverrides
): Ethereum_TxReceipt!

execCall

Executes swap given swap parameters and chain ID.

  execCall(
parameters: SwapParameters!
chainId: ChainId!
txOverrides: TxOverrides
): Ethereum_TxReceipt!

approve

Approves tokens in the swap.

  approve(
token: Token!
amount: BigInt
txOverrides: TxOverrides
): Ethereum_TxReceipt!