Swaps
Crosschain swap is the exchange of one asset for another.
To carry out an asset swap, you need to make sure that this service is available in the networks you have chosen. To do this, request list of available coins, find the coin you need, it will have a list of networks
networks, make sure that the network of the asset you want to swap the allowCrosschainSwapFrom
flag is wound true
, and the network of the asset you want to receive has allowCrosschainSwapTo
equal to true
.
For example:
You have ETH in the Ethereum network, in the list of available coins you should find the ETH coin, then in the list of networks
find the ethereum
network it should have "allowCrosschainSwapFrom ": true
You want to swap it for USDT on the Tron network, in the list of available coins you should find the USDT coin, then in the networks
list, find the tron
network, it should have "allowCrosschainSwapTo": true
Find out the allowable limit for the transaction amount. Please note that the limit amounts are indicated in USD, the rates of such stablecoins as USDT, BUSD etc do not differ significantly from the rate of USD, and if you want to exchange another coin, then you will need to get the exchange rate to USD to make sure that your amount meets the specified limits.
Request fee preview to get a token
, it will need to be specified when requesting transaction creation as feeToken
.
The operation is not executed immediately after the request, you must wait 1-3 minutes. You can find out the operation execution status yourself, or you can specify the URL to receive the webhook in the webhookUrl
field when creating.
Available statuses
Status
Description
CREATED
Request registered
PENDING
Processing
ERROR
Error during execution
REJECTED
Request rejected
PROCESSED
Success
Last updated