How do I perform a token swap

Published on 8 Feb 2025Updated on 5 Feb 20263 min read29

1. What is the DEX swap feature?

Swap is a type of transaction that refers to the conversion of tokens on the same blockchain, meaning the payment and receiving tokens are on the same network. It is one of the most commonly used features in Web3 wallets. You can make transactions on both the App and Web platforms.

2. Preparation before trades

  1. First, you need to create a OKX wallet: How do I create or import an OKX Wallet?

  2. Transfer assets into your OKX wallet: How do I manage my assets in my OKX wallet?

  3. Find the contract address of the token you want to buy: How do I manage my assets in my OKX wallet?

3. Trade on OKX DEX

For example, to buy TRUMP on the Solana network, you swap SOL for TRUMP on Solana. Before initiating a transaction, make sure your wallet has enough tokens to cover gas fees. For example, you need a certain amount of SOL for transactions on Solana and TRX for transactions on TRON

App

  1. Open OKX wallet, tap DEX > select Swap. The token at the top is the one you want to pay with, and the token at the bottom is the one you will receive.

  2. After selecting the token, you can select Market or Limit to make the swap trade. The page defaults to the Market. Enter the quantity you want to swap, tap Swap via DEX, then go to your wallet to Confirm and wait for the transaction to be processed on-chain.

Note: You need to enable your smart account before you can place limit orders.

Web

  1. Open OKX Wallet official website, select the Swap option from the main menu. You need to select a network. For example, if you hold SOL, you need to choose the Solana network.

  2. Select the token you want to swap, enter the amount to swap, and the system will display the current rate, slippage, minimum amount to receive, liquidity, service fee and other parameters. Once everything is set, tap Swap via DEX and wait for the transaction to be confirmed on-chain.

Extension wallet

Log in to the extension wallet: OKX Wallet Extension Wallet User Guide

On the extension wallet homepage, select Swap, choose the network, such as Solana, then select the tokens to swap, enter the quantity to swap, and tap Swap via DEX. Wait for the transaction to be confirmed on-chain.

4. Note

  1. Please make sure to back up your seed phrase for the new wallet.

  2. When exchanging with the native token of the mainnet, select 100% when selecting the amount will automatically reserve a portion of the token as gas fees to avoid transaction failure.

  3. When the network is congested, such as on the Ethereum network, gas fees may rise rapidly. If the reserved gas fee is insufficient, the transaction may fail.

  4. For some tokens, slippage can change significantly when there is a sudden surge in trading volume or rapid price fluctuations. If your slippage setting is too low, you may not be able to successfully trade the token.

  5. After the swap is completed, you can view your asset on the wallet Home. select History to check your trades, and you can also jump to the browser to view the details of a specific transaction.

For more information about DEX trading, please refer to: DEX FAQ