POST
/
api
/
v1
/
shortcuts
/
quote
curl --request POST \
  --url https://api.enso.finance/api/v1/shortcuts/quote \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "chainId": 1,
  "fromAddress": "0xd8da6bf26964af9d7eed9e03e53415d37aa96045",
  "routingStrategy": "router",
  "route": [
    {
      "amountIn": "1000000000000000000",
      "path": [
        {
          "tokenIn": "<string>",
          "tokenOut": "<string>",
          "protocol": "<string>",
          "action": "<string>",
          "primary": "<string>"
        }
      ]
    }
  ],
  "fee": [
    "100"
  ],
  "feeReceiver": "0x220866B1A2219f40e72f5c628B65D54268cA3A9D",
  "ignoreAggregators": [
    "<string>"
  ],
  "blockNumber": "0x01"
}'
{
  "gas": "<string>",
  "amountOut": {},
  "priceImpact": 123,
  "feeAmount": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

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

Body

application/json
route
object[]
required

Ordered array of paths that you want to simulate

chainId
number
default:1

Chain ID of the network to execute the transaction on

fromAddress
string

Ethereum address of the wallet to send the transaction from

Example:

"0xd8da6bf26964af9d7eed9e03e53415d37aa96045"

routingStrategy
enum<string> | null

Routing strategy to use

Available options:
router,
delegate,
ensowallet
fee
string[]

Fee in basis points (1/10000) for each route. If specified, this percentage of each amountIn value will be sent to feeReceiver

Example:
["100"]
feeReceiver
string

The Ethereum address that will receive the collected fee. Required if fee is provided

Example:

"0x220866B1A2219f40e72f5c628B65D54268cA3A9D"

ignoreAggregators
string[] | null

A list of swap aggregators to be ignored from consideration

blockNumber
string

Hex string of block number

Example:

"0x01"

Response

200
application/json
gas
string
required
amountOut
object
required
priceImpact
number
required

Price impact in basis points, null if USD price not found

feeAmount
string[]
required

An array of the fee amount collected for each tokenIn