POSThttps://api.socket.tech/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
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
]
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
]
Chain id of destination chain.
Token address on source chain.
Token address on destination chain.
Include 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.
route
object
required
Unique id for each route.
Contains only on single swap.
Sending token amount.
Approximate receiving token amount.
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
]
Array of bridges used in the route
Total number of transactions for the route.
Combined USD gas fees for all transactions in the route.
Address of user receiving the amount.
Address of user making the transactions.
Array of user transactions.
Receive Value
Estimate of total time in seconds, excluding the transaction time.
Estimate of max time to exit from the chain in seconds.
integratorFee
object
required
asset
object
Name of token.
Address of token.
URL for icon of token.
Decimal used for token.
Symbol of 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
]
Chain id of the token
URL for icon of token.
Unique Id over all chains
refuel
object
required
gasFees
object
required
Approx Gas Limit of the transaction.
USD value of gas fees at current gas price.
asset
object
required
Gas token details.
Name of token.
Address of token.
URL for icon of token.
Decimal used for token.
Symbol of 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
]
Chain id of the token
URL for icon of token.
Unique Id over all chains
Estimated Amount of gas token will be used
fromAsset
object
required
Name of token.
Address of token.
URL for icon of token.
Decimal used for token.
Symbol of 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
]
Chain id of the token
URL for icon of token.
Unique Id over all chains
toAsset
object
required
Name of token.
Address of token.
URL for icon of token.
Decimal used for token.
Symbol of 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
]
Chain id of the token
URL for icon of token.
Unique Id over all chains
destinationCallData
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.
Address of token for which approval is required.
Contract address that needs approval.
Address of owner.
{
"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"
}
}