ActiveRoutesController_getActiveRoutesForUser
GEThttps://api.socket.tech/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.
result
object
required
Id of the Active Route.
Address of user doing the Active Route.
Total number of txs required in Active Route.
Array of user txs.
Id of source chain.
Id of destination chain.
Address of token on source chain.
Address of token on destination chain.
Amount of sending tokens.
Approximate amount of receiving tokens.
Status of the Active Route.
Timestamp of Route start.
Timestamp of last route update.
Index of current tx in userTxs array.
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
{
"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"
}
}
}