ActiveRoutesController_getActiveRoutesForUser
GET/v2/route/active-routes/users
ActiveRoutesController_getActiveRoutesForUser
Request
Query Parameters
Address of user starting the route.
Possible values: [updatedAt, createdAt]
Sort param for routes.
Offset for fetching active routes.
Number of active routes to return in one API call.
Possible values: [READY, PENDING, COMPLETED, FAILED]
Status of the route. The route will only be marked completed if all the user txs have been completed.
Id of sending chain
Id of destination chain.
Address of token on source chain.
Token address on destination chain.
Header Parameters
Responses
- 200
Get all the active routes from a user address. Filters like fromChainId, toChainId and token addresses can be used to get back specific active routes.
- application/json
- Schema
- Example (from schema)
Schema
Status of API response.
trueresult
object
required
Id of the Active Route.
420Address of user doing the Active Route.
0x3e8cB4bd04d81498aB4b94a392c334F5328b237bTotal number of txs required in Active Route.
3Array of user txs.
Id of source chain.
137Id of destination chain.
56Address of token on source chain.
0x2791bca1f2de4661ed88a30c99a7a9449aa84174Address of token on destination chain.
0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3Amount of sending tokens.
100000000Approximate amount of receiving tokens.
100000000Status of the Active Route.
PENDINGTimestamp of Route start.
1642009930239Timestamp of last route update.
1642009930239Index of current tx in userTxs array.
1642009930239fromAsset
object
required
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
object
required
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
DAI{
"success": true,
"result": {
"activeRouteId": 420,
"userAddress": "0x3e8cB4bd04d81498aB4b94a392c334F5328b237b",
"totalUserTx": 3,
"userTxs": [
{}
],
"fromChainId": 137,
"toChainId": 56,
"fromAssetAddress": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
"toAssetAddress": "0x1af3f329e8be154074d8769d1ffa4ee058b1dbc3",
"fromAmount": "100000000",
"toAmount": "100000000",
"routeStatus": "PENDING",
"createdAt": 1642009930239,
"updatedAt": 1642009930239,
"currentUserTxIndex": 1642009930239,
"fromAsset": {
"name": "USD Coin",
"address": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
"icon": "https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svg",
"decimals": 6,
"symbol": "USDC",
"chainId": 137,
"logoURI": "https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svg",
"chainAgnosticId": "DAI"
},
"toAsset": {
"name": "USD Coin",
"address": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
"icon": "https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svg",
"decimals": 6,
"symbol": "USDC",
"chainId": 137,
"logoURI": "https://maticnetwork.github.io/polygon-token-assets/assets/usdc.svg",
"chainAgnosticId": "DAI"
}
}
}