DEX API

FAQ#

Supported bridges#

  1. Celer cBridge
  2. SWFT
  3. Stargate
  4. Across
  5. Hyphen
  6. Wanchain
  7. Circle

More

Reasons for the lack of liquidity in quote inquiries#

  1. No third-party cross-chain bridges are available to support this swap.
  2. The input token quantity doesn’t meet the minimum or maximum cross-chain quantity required by the third-party bridge.
  3. Either the source chain pool or the destination chain pool has no liquidity.
  4. The crypto being traded is a honeypot token.

Common reasons for cross-chain failures#

There are three categories of unsuccessful cross-chain swaps: unsuccessful source-chain swaps, unsuccessful destination-chain swaps, and unsuccessful cross-bridge transactions.

  1. The source-chain swaps and the destination-chain swaps may fail for the following reasons:
  • Broadcast failure
  • Insufficient gas
  • Exceeded slippage setting
  • Insufficient approved crypto amount
  • Third-party DEX contract execution error
  • The transaction was sped up or canceled
  • Tokens traded were safeMoon or honeypot tokens
  1. Cross-bridge transactions may fail for the following reasons:
  • Exceeded the third-party bridge’s slippage
  • Triggered the third-party bridge’s blocklist
  • The minimum/maximum cross-chain amount required by the bridge wasn’t met
  • Insufficient liquidity on the bridge
  • The cross-bridge transaction timed out

Cross-chain support for heterogeneous chains#

At the moment, only cross-chain transactions between EVM chains are supported. Heterogeneous cross-chain transactions will be supported in the future, such as TRON, SUI, etc.

Transaction time is too long#

NO, The transaction of source-chain swaps usually takes less than one minute. The official bridges have long transaction times because of their own cross-chain mechanisms. If the other third-party bridge doesn’t return the final status for a long time, you can check the transaction status on the chain or contact third-party customer service for confirmation.

Cross-chain slippage range#

0.2%-50%

Are speed-ups and transaction cancellation supported?#

No, speed-ups and transaction cancellation aren’t supported.

Token approval for cross-chain swaps#

If the token used in the cross-chain transaction is an ERC-20 token, you need to first approve the token: GET approve-transaction If you want to find out the approval limit, you can request: GET get-allowance

Cross-chain bridge fee#

The crossChainFee is charged by the third-party bridge. The fees are generally in USDT, USDC, DAI, or WETH. Some bridges, such as Stargate, and Wanchain, will also charge an additional Native token otherNativeFee as a cross-chain bridge fee.

Route#

The cross-chain swap route is the overall best route calculated based on amount, network fees, slippage, and cross-chain bridge costs.

Estimated time for cross-chain transactions#

The estimated time for cross-chain transactions is dynamically calculated based on historical completion times of successful transactions.

Cross-chain refund#

There are two types of cross-chain refunds at the moment. The first is a refund initiated by a third-party bridge. The second is a refund initiated by OKX DEX.

  1. Refund initiated by a third-party bridge
  • The main reason for this type of refund is that the bridge refund rules have been triggered when the funds have entered the bridge, but the bridge transaction is unable to proceed normally.
  • Refunds are initiated generally because there is insufficient liquidity due to changes in the bridge’s pool, or the user’s cross-chain amount is below the minimum required by the bridge, or some other rules have been triggered, such as the third-party bridge’s blocklists.
  • The third-party bridge will initiate the refund. The refund token is generally USDT, USDC, DAI, WETH, and ETH. The refund is returned from the third-party bridge, and the final amount received by the user will have the gas fee deducted.
  • Common third-party bridges for cross-chain refunds include SWFT etc.
  1. Refunds initiated by OKX DEX
  • There are two main reasons for refunds. The first is that when OKX pre-executes a swap on the destination chain, if the pre-executed transaction returns an error, a refund will be automatically triggered. The second is an actual unsuccessful swap on the destination chain.
  • If pre-execution transactions return errors, it’s usually because the set slippage has been exceeded, or errors have occurred during third-party DEX contract executions, or the traded tokens are safeMoon tokens or honeypot tokens, etc.
  • Failed transactions on the destination chain will also trigger automatic refunds. Common reasons for such failures can be found in the above-mentioned cross-chain scenarios.
  • OKX DEX will initiate the refund. The refund token is USDT, USDC, DAI, WETH, or ETH. The refund is returned from OKX DEX, and the final amount received by the user will have the gas fee deducted.