POST/v2/route/start
Function that takes in a route and starts the selected route. Function is responsible for
- Saving the selected route to bridge tokens from one chain to another.
- Saving the fromChain, toChain, and fromAsssetAddress and toAssetAddress
- Returns the Active Route Id, Current Tx, Total number of txs, txType
Request
Header Parameters
- application/json
Body
required
Chain id of source chain.
Possible values: [MAINNET_CHAIN_ID, OPTIMISM_CHAIN_ID, BSC_CHAIN_ID, XDAI_CHAIN_ID, POLYGON_CHAIN_ID, FANTOM_CHAIN_ID, ZKSYNC_ERA_CHAIN_ID, POLYGON_ZKEVM_CHAIN_ID, MANTLE_CHAIN_ID, BASE_CHAIN_ID, MODE_CHAIN_ID, ARBITRUM_CHAIN_ID, AVAX_CHAIN_ID, LINEA_CHAIN_ID, BLAST_CHAIN_ID, SCROLL_CHAIN_ID, ZORA_CHAIN_ID, AURORA_CHAIN_ID]
137Chain id of destination chain.
Possible values: [MAINNET_CHAIN_ID, OPTIMISM_CHAIN_ID, BSC_CHAIN_ID, XDAI_CHAIN_ID, POLYGON_CHAIN_ID, FANTOM_CHAIN_ID, ZKSYNC_ERA_CHAIN_ID, POLYGON_ZKEVM_CHAIN_ID, MANTLE_CHAIN_ID, BASE_CHAIN_ID, MODE_CHAIN_ID, ARBITRUM_CHAIN_ID, AVAX_CHAIN_ID, LINEA_CHAIN_ID, BLAST_CHAIN_ID, SCROLL_CHAIN_ID, ZORA_CHAIN_ID, AURORA_CHAIN_ID]
56Token address on source chain.
0x2791bca1f2de4661ed88a30c99a7a9449aa84174Token address on destination chain.
0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3Include the tx details for the first user transaction. If true it will return the txData txType etc. If false, it will only return the active route Id of the selected route.
truerouteobjectrequired
Unique id for each route.
6a4c26b6-b008-431d-a37c-028e0b30482bContains only on single swap.
falseSending token amount.
100000000000000000000Approximate receiving token amount.
100000000000000000000Array of bridges used in the route
Possible values: [hop, hopCctp, anyswap, anyswap-router-v4, anyswap-router-v6, polygon-bridge, arbitrum-bridge, hyphen, across, optimism-bridge, celer, refuel-bridge, stargate, connext, cctp, synapse, base-bridge, zora-bridge, zksync-native, symbiosis, gnosis-native-bridge, mantle-native-bridge, scroll-native-bridge, mode-native-bridge, super-bridge, stargate-v2]
[anyswap-router-v4]Total number of transactions for the route.
3Combined USD gas fees for all transactions in the route.
125.4Address of user receiving the amount.
0x3e8cB4bd04d81498aB4b94a392c334F5328b237bAddress of user making the transactions.
0x3e8cB4bd04d81498aB4b94a392c334F5328b237bArray of user transactions.
Receive Value
Estimate of total time in seconds, excluding the transaction time.
600Estimate of max time to exit from the chain in seconds.
600integratorFee
objectrequired
asset
object
Name of token.
USD CoinAddress of token.
0x2791bca1f2de4661ed88a30c99a7a9449aa84174URL for icon of token.
https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svgDecimal used for token.
6Symbol of token.
USDCChain id of the token
Possible values: [MAINNET_CHAIN_ID, OPTIMISM_CHAIN_ID, BSC_CHAIN_ID, XDAI_CHAIN_ID, POLYGON_CHAIN_ID, FANTOM_CHAIN_ID, ZKSYNC_ERA_CHAIN_ID, POLYGON_ZKEVM_CHAIN_ID, MANTLE_CHAIN_ID, BASE_CHAIN_ID, MODE_CHAIN_ID, ARBITRUM_CHAIN_ID, AVAX_CHAIN_ID, LINEA_CHAIN_ID, BLAST_CHAIN_ID, SCROLL_CHAIN_ID, ZORA_CHAIN_ID, AURORA_CHAIN_ID]
137URL for icon of token.
https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svgUnique Id over all chains
DAIrefuelobjectrequired
gasFees
objectrequired
Approx Gas Limit of the transaction.
250000USD value of gas fees at current gas price.
125.4asset
object
required
Gas token details.
Name of token.
USD CoinAddress of token.
0x2791bca1f2de4661ed88a30c99a7a9449aa84174URL for icon of token.
https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svgDecimal used for token.
6Symbol of token.
USDCChain id of the token
Possible values: [MAINNET_CHAIN_ID, OPTIMISM_CHAIN_ID, BSC_CHAIN_ID, XDAI_CHAIN_ID, POLYGON_CHAIN_ID, FANTOM_CHAIN_ID, ZKSYNC_ERA_CHAIN_ID, POLYGON_ZKEVM_CHAIN_ID, MANTLE_CHAIN_ID, BASE_CHAIN_ID, MODE_CHAIN_ID, ARBITRUM_CHAIN_ID, AVAX_CHAIN_ID, LINEA_CHAIN_ID, BLAST_CHAIN_ID, SCROLL_CHAIN_ID, ZORA_CHAIN_ID, AURORA_CHAIN_ID]
137URL for icon of token.
https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svgUnique Id over all chains
DAIEstimated Amount of gas token will be used
fromAsset
objectrequired
Name of token.
USD CoinAddress of token.
0x2791bca1f2de4661ed88a30c99a7a9449aa84174URL for icon of token.
https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svgDecimal used for token.
6Symbol of token.
USDCChain id of the token
Possible values: [MAINNET_CHAIN_ID, OPTIMISM_CHAIN_ID, BSC_CHAIN_ID, XDAI_CHAIN_ID, POLYGON_CHAIN_ID, FANTOM_CHAIN_ID, ZKSYNC_ERA_CHAIN_ID, POLYGON_ZKEVM_CHAIN_ID, MANTLE_CHAIN_ID, BASE_CHAIN_ID, MODE_CHAIN_ID, ARBITRUM_CHAIN_ID, AVAX_CHAIN_ID, LINEA_CHAIN_ID, BLAST_CHAIN_ID, SCROLL_CHAIN_ID, ZORA_CHAIN_ID, AURORA_CHAIN_ID]
137URL for icon of token.
https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svgUnique Id over all chains
DAItoAsset
objectrequired
Name of token.
USD CoinAddress of token.
0x2791bca1f2de4661ed88a30c99a7a9449aa84174URL for icon of token.
https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svgDecimal used for token.
6Symbol of token.
USDCChain id of the token
Possible values: [MAINNET_CHAIN_ID, OPTIMISM_CHAIN_ID, BSC_CHAIN_ID, XDAI_CHAIN_ID, POLYGON_CHAIN_ID, FANTOM_CHAIN_ID, ZKSYNC_ERA_CHAIN_ID, POLYGON_ZKEVM_CHAIN_ID, MANTLE_CHAIN_ID, BASE_CHAIN_ID, MODE_CHAIN_ID, ARBITRUM_CHAIN_ID, AVAX_CHAIN_ID, LINEA_CHAIN_ID, BLAST_CHAIN_ID, SCROLL_CHAIN_ID, ZORA_CHAIN_ID, AURORA_CHAIN_ID]
137URL for icon of token.
https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svgUnique Id over all chains
DAIdestinationCallData
object
bridgeInsuranceData
object
Amount of token to be used in insurance.
Responses
- 200
- 201
Starts the Active Route and gives back the data to start the route
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [approve, fund-movr, claim, dex-swap, sign]
Possible values: [MAINNET_CHAIN_ID, OPTIMISM_CHAIN_ID, BSC_CHAIN_ID, XDAI_CHAIN_ID, POLYGON_CHAIN_ID, FANTOM_CHAIN_ID, ZKSYNC_ERA_CHAIN_ID, POLYGON_ZKEVM_CHAIN_ID, MANTLE_CHAIN_ID, BASE_CHAIN_ID, MODE_CHAIN_ID, ARBITRUM_CHAIN_ID, AVAX_CHAIN_ID, LINEA_CHAIN_ID, BLAST_CHAIN_ID, SCROLL_CHAIN_ID, ZORA_CHAIN_ID, AURORA_CHAIN_ID]
Possible values: [eth_sendTransaction, eth_signMessage]
approvalData
object
Minimum amount of approval needed.
10000000000000000Address of token for which approval is required.
0x2791bca1f2de4661ed88a30c99a7a9449aa84174Contract address that needs approval.
0x2791bca1f2de4661ed88a30c99a7a9449aa84174Address of owner.
0x3e8cB4bd04d81498aB4b94a392c334F5328b237b{
"userTxType": "approve",
"txTarget": "string",
"chainId": "MAINNET_CHAIN_ID",
"activeRouteId": 0,
"txData": "string",
"txType": "eth_sendTransaction",
"value": "string",
"userTxIndex": 0,
"totalUserTx": 0,
"approvalData": {
"minimumApprovalAmount": "10000000000000000",
"approvalTokenAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
"allowanceTarget": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
"owner": "0x3e8cB4bd04d81498aB4b94a392c334F5328b237b"
}
}