Skip to main content
POST
Get transaction for IPOR shortcut

Query Parameters

chainId
number
default:1

Chain ID of the network to execute the transaction on

fromAddress
string
required

Ethereum address of the wallet to send the transaction from

Example:

"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"

Body

application/json
amountIn
string
required

Amount of tokenIn in wei

Example:

"1000000000000000"

tokenIn
string
required

Address of the tokenIn. For ETH, use 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee

Example:

"0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee"

tokenBToBuy
string
required

Address of the tokenBToBuy

Example:

"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"

percentageForTokenB
string
required

Percentage of tokenB to buy in basis points (1/10000), e.g. 50 = 0.50%.

Example:

"5000"

isRouter
boolean | null

Flag that indicates whether to use the shared router

slippage
string
default:300

Slippage in basis points (1/10000) e.g. 50 = 0.50%, Default is 300

Example:

"300"

simulate
boolean | null
default:false

Flag that indicates whether to simulate the transaction, verify some assertions, return simulationURL and events

Response

200 - application/json
createdAt
number
required

Block number the transaction was created on

tx
object
required

The tx object to use in ethers

logs
string[]
required

Logs from the simulated transaction

simulationURL
string
required

Tenderly simulation URL