Support spot, margin, contracts, and options API trading for 100+ digital currencies
User
Create/Manage API keys
Deploy API
API
Trade & request
OKX
We offer exclusive services for VIP and institutional traders, including improved fee structures, higher trading limits, flexible account management features, and OTC services. Our professional team strives to provide excellent trading solutions to a wide range of market participants.
Get access to better fees, higher trading limits, and lower latency.
Get access to world-class market depth and rewardable commissions.
Request-for-Quote (RFQ) for large-sized spot, derivatives, and multi-leg structures.
Check out our various incentive programs to 100x your profits
Invite your friends and earn rewards of up to 10,000 USDT
Join our affiliate program and earn commissions of up to 50%
Lead trades and earn a profit sharing ratio of up to 30%
Showcase your strategies and earn a profit share
Utilize these tools and platforms to elevate your API trading experience!
It's completely free to sign up as OKX user and use our APIs. For trading fees, please refer to Fee schedule.
1. Log into your OKX account and click the user icon
2. Select API from the dropdown menu
3. Choose the account you want to create API Keys for
4. Click Create API Keys
Yes. After logging into OKX website, by clicking Demo trading, you can follow the steps described above to create API Keys for demo trading purpose.
Please refer to Demo Trading Services for the useful URLs to start demo trading services.
You can start using OKX APIs once created them!
For public REST APIs, you can just test them out in your browser, e.g. https://www.okx.com/api/v5/public/instruments?instType=SPOT.
For private REST APIs or WebSocket APIs, we recommend using tools like Jupyter Notebook, Postman, etc.
REST APIs require an HTTP request to be sent for every response you get. It's the best when you just want the current state of a resource and do not want or require ongoing updates, e.g. symbol data.
WebSocket APIs do not follow a request-response message pattern.
Once a TCP connection has been established, the WebSocket channel can send updates continuously without receiving another request. WebSocket APIs are the best when you want ongoing updates whenever they are available, e.g. market data.
Disclaimer: The availability of products and services listed on this page will depend on your region. Please see your applicable Terms of Service for more detail.