XY Finance
Search…
Custom Link
The X Swap front-end supports URL query parameters to allow for custom linking to X Swap. Users can use parameters to pre-determine the user's bridge & swapping route on X Swap.

Example Usage

Swap from the USDC on Ethereum to USDC on Polygon.

Query Parameters

Parameter
Description
Example
sourceChainId
Chain ID
1
targetChainId
Chain ID
137
fromTokenAddress
Token Contract Address
0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
toTokenAddress
Token Contract Address
0x2791bca1f2de4661ed88a30c99a7a9449aa84174
amount
Float Value
50.5
  • The custom link only work if there is at least a valid chain id.
  • If address is empty or invalid, the native token will be the default token.

Support Chains

Network Name
Chain ID
Status
Ethereum
1
BSC
56
Polygon
137
Fantom
250
Cronos
25
ThunderCore
108
Avalanche
43115
KuCoin
321
Arbitrum
42161