Introduction to DEX API Services
OKX provides a comprehensive decentralized exchange (DEX) API suite, including the Limit Order API for advanced trading functionalities. This documentation covers technical specifications, integration methods, and best practices for developers building Web3 applications.
Key Features
Wallet API Integration
- Account management
- On-chain data queries
- Transaction broadcasting
- Signature verification SDK
DEX API Capabilities
- Token swapping
- Cross-chain transactions
- Limit order management
- Market data access
Marketplace APIs
- Runes trading
- NFT marketplace
- BTC Ordinals
- Fractal Ordinals
Limit Order API Technical Reference
Supported Chains
Retrieve all blockchain networks compatible with limit order functionality.
Token Lists
Access comprehensive cryptocurrency listings for trading pairs.
Transaction Authorization
Manage token approval processes for trading activities.
Order Management
- Create limit orders with custom parameters
- Query active/past orders
- Cancel existing orders
- Retrieve order details
Integration Workflow
Setup
- Obtain API credentials
- Configure network endpoints
Authorization
- Implement wallet connect
- Set trading allowances
Order Execution
- Construct order payloads
- Submit transactions
- Monitor order status
Technical Specifications
| Parameter | Type | Description |
|---|---|---|
chainId | integer | Blockchain network identifier |
tokenIn | string | Input token contract address |
tokenOut | string | Output token contract address |
amountIn | string | Quantity of input token |
price | string | Limit price denominated in output token |
FAQ
What networks support limit orders?
Currently supports Ethereum, BSC, Polygon, Arbitrum, and 10+ other EVM-compatible chains.
How are fees calculated?
Transaction fees vary by network and are displayed during order preview.
Can I cancel partially filled orders?
Yes, the remaining unexecuted portion can be cancelled through the API.
What's the order expiration timeframe?
Default duration is 30 days, configurable upon order creation.
How to handle failed transactions?
Check error codes and resubmit with adjusted gas parameters.
Is there a minimum order size?
Minimums vary by trading pair and are enforced by liquidity conditions.
Additional Resources
For comprehensive implementation guides and code samples: