👾Transit Swap Cross
Transit cross-chain swap api
chains supported (fromChainID & toChainID):
Ethereum: 1
BSC: 56
OkExchain: 66
HECO: 128
Matic: 137
Fantom: 250
KCC: 321
AVAX: 43114
TRON: 95500
bridge supported:
ANYSWAP
METAPATH
CBRIDGE
Tokens API
Cross Tokens List
GET
https://aggserver.transit.finance/v3/cross/common/list
Swap API
Transit Swap API for Cross
GET
https://aggserver.transit.finance/v3/cross/swap
Query Parameters
Name | Type | Description |
---|---|---|
toChainID* | integer | chainID for cross to chain |
decimal0 | integer | Decimals of the token0 |
token0* | string | Contract address of a token on fromChain |
fromChainID* | integer | chainID for cross from chain |
to | string | Recipient token1 on toChain |
amountIn | integer | Amount of a token to cross swap |
bridge* | string | Use bridge of cross |
token1* | string | Contract address of a token on toChain |
decimal1 | integer | Decimals of the token1 |
channel | string | "default"、"web"、"android"、"ios"、"extension" |
issuer | string | Sender of transaction push |
Responses Details
amountOut: cross-swap amountOut on toChain for token1
router: Transit swap Router v3
exchange: use bridge (anySwap or MetaPath)
data: ABI data can be sent directly to router contract
about 'relayerFee': if exchange is MetaPath, it'll be the number of token1
Cross Order Callback API
If use 'MetaPath' to cross swap, it's better to request this api to speed up transactions.
Order Callback
GET
https://aggserver.transit.finance/v3/cross/order
Query Parameters
Name | Type | Description |
---|---|---|
bridge* | String | |
fromChainID* | String | |
toChainID* | String | |
token0* | String | |
token1* | String | |
to* | String | |
amountIn* | String | |
channel* | String | |
hash* | String | the hash of from chain's transaction |
amountOutMin* | String | use the result data 'amountOut' of swap api |
Last updated