A swap is executed at the real-time market price, whereas a limit order allows trading at a specified price, granting the trader control over pricing. Swaps are immediately executed and don’t require waiting. In contrast, a limit order is executed only when the token’s price reaches the set limit.
The API limit order is integrated into the OKX DEX to provide liquidity. The counterparties in this case are the users of OKX DEX. Users trading on OKX DEX can complete a transaction once they match an execution path coming from a limit order.
Network fees for limit orders are incurred only during the execution of an order. Placing or withdrawing a limit order doesn’t incur any network fees. In the context of API limit orders on OKX DEX, the network fees are borne by the transactions’ counterparties.
Non-execution can occur for two reasons:
ETH can’t be sold via a limit order because it isn’t an ERC-20 token. Limit orders on OKX DEX are currently designed only for ERC-20 tokens. If you want to sell ETH using a limit order, you should first wrap your ETH and use WETH (Wrapped ETH) as the sell token.