POST
/
api
/
v1
/
shortcuts
/
static
/
ipor
curl --request POST \
  --url https://api.enso.finance/api/v1/shortcuts/static/ipor \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "isRouter": true,
  "amountIn": "1000000000000000",
  "tokenIn": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
  "tokenBToBuy": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
  "percentageForTokenB": "5000",
  "slippage": "300",
  "simulate": false
}'
{
  "createdAt": 123,
  "tx": {
    "data": "<string>",
    "to": "<string>",
    "from": "<string>",
    "value": "<string>"
  },
  "logs": [
    "<string>"
  ],
  "simulationURL": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

chainId
number
default:1

Chain ID of the network to execute the transaction on

fromAddress
string
default:0xd8da6bf26964af9d7eed9e03e53415d37aa96045
required

Ethereum address of the wallet to send the transaction from

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)

Example:

"5000"

isRouter
boolean | null

Flag that indicates whether to use the shared router

slippage
string
default:300

Slippage in basis points (1/10000). 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