v1

latestOpenAPI 3.1.02026-08-0466147138.0 KB
Execution

Get routes for a withdrawal

This is the first of two steps for a withdrawal 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 /withdraw/start endpoint.

post/withdraw/calculate

Request body

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.

is_erc20boolean

Is the superposition an aERC20 token instead of the traditional 1155S

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.

retain_4626boolean

Flag to indicate if the user wants to hold vault shares or not

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

Must provide either vault_id or superform_id

superpositions_amount_instring

Amount of the superposition to be withdrawn

superpositions_chain_idinteger

Chain ID that the superposition was minted to.

swap_slippageinteger

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

to_chain_idinteger

Chain ID of the destination chain

to_token_addressstring

Address of the destination token

user_addressstring required
vault_idstring

Must provide either vault_id or superform_id

Example request

[
  {
    "bridge_slippage": 50,
    "exclude_ambs": [],
    "exclude_bridges": [],
    "exclude_dexes": [],
    "exclude_liquidity_providers": [],
    "positive_slippage": 100,
    "refund_address": "0xB9Ff2b5Ce562b79825Ca2e9003D1d548C6a698d9",
    "route_type": "output",
    "superform_id": "6277101737206669028000504059097845015423773220595131737620",
    "superpositions_amount_in": "3881289106529881",
    "superpositions_chain_id": 10,
    "swap_slippage": 50,
    "to_chain_id": 42161,
    "to_token_address": "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE",
    "user_address": "0xB9Ff2b5Ce562b79825Ca2e9003D1d548C6a698d9"
  }
]

Response

OK