v1

latestOpenAPI 3.1.02026-08-0466147138.0 KB
Execution

Get routes for a deposit

This is the first of two steps for a deposit flow. After providing relevant options as input, this endpoint will return a number of possible routes. The selected route should be used as input for the /deposit/start endpoint.

post/deposit/calculate

Request body

amount_instring

Amount of the token to be deposited

bridge_slippageinteger

Slippage taken on bridge action in bps, between 0.5% and 50%

exclude_ambsinteger[]

List of AMB IDs to exclude from the route. See output of /supported for AMB IDs.

exclude_bridgesinteger[]

List of bridge IDs to exclude from the route. See output of /supported for bridge IDs.

exclude_dexesinteger[]

List of dex IDs to exclude from the route. See output of /supported for dex IDs.

exclude_liquidity_providersinteger[]

List of liquidity provider IDs to exclude from the route. See output of /supported for liquidity provider IDs.

filter_swap_routesboolean

If true, any route that contains a destination swap will be filtered out. Reduces chances of a deposit failing due to route unavailability.

from_chain_idinteger

Chain ID of the source chain

from_token_addressstring

Address of the source token

is_part_of_multi_vaultboolean

Flag to indicate if the request is part of a multi-vault deposit or withdrawal

need_insuranceboolean

If true, only returns insurable routes.

positive_slippageinteger

Swap surplus in bps, between 1% and 100%. See help.superform.xyz for more.

refund_addressstring

Address on the destination chain to which the refund should be made, if needed.

route_type'time' | 'output' | 'gas'
superform_idstring

Must provide either vault_id or superform_id

swap_slippageinteger

Slippage taken on dex action in bps, between 0.5% and 50%

to_token_addressstring

Address of the destination token

user_addressstring required
vault_idstring

Must provide either vault_id or superform_id

Example request

[
  {
    "amount_in": "15.629478",
    "bridge_slippage": 50,
    "exclude_ambs": [],
    "exclude_bridges": [],
    "exclude_dexes": [],
    "exclude_liquidity_providers": [],
    "from_chain_id": 137,
    "from_token_address": "0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174",
    "positive_slippage": 100,
    "refund_address": "0xB9Ff2b5Ce562b79825Ca2e9003D1d548C6a698d9",
    "route_type": "output",
    "superform_id": "53060340969226284497088793362664417178471904761401476120749147",
    "swap_slippage": 50,
    "user_address": "0xB9Ff2b5Ce562b79825Ca2e9003D1d548C6a698d9"
  }
]

Response

OK