OKX demo trading is a simulated copy of the trading interface that runs on virtual funds. Nothing you do in it touches your real balance. This guide shows how to switch into it, how to get back out, where it differs from live trading, and how to connect a bot to it with a demo API key.
What demo trading is
Demo trading gives your account a second, separate environment with its own virtual assets, orders and positions. OKX describes it as a place to practise without real money, and states that demo trades do not affect your real assets.
According to OKX's help center, the demo environment covers spot, margin, futures and options. That makes it useful for learning order types, margin modes and leverage settings before using them with real funds, and for testing an automated strategy.
Switch to demo trading
On the website, move the pointer over the trade menu in the top bar and choose the demo trading entry. In the app, open the main menu from the home screen and choose demo trading, which OKX lists in the trade group and among the shortcuts.
The screen then reloads in demo mode and shows your total demo assets. Check for the demo label before placing anything. The layout is nearly identical to live trading, and the label is the only quick way to tell which environment you are in.
Place a practice trade
Trading works the same way as on the live screen. Open the trade page, pick a pair or contract from the selector, choose an order type, enter price and amount, and submit. For futures, select the contract type and the margin currency first, then open a long or short position.
Use the time to practise the things that are costly to get wrong with real funds: setting a stop loss, switching between cross and isolated margin, changing leverage, and closing a position partly. Each of these is found in the same place as in live mode.
Reset the virtual balance
A demo account starts with a predefined amount of virtual funds. OKX's help pages do not state the amount, and it is displayed on the demo assets page. If you run the balance down, you can restore it.
OKX requires that you first close all open positions and cancel all pending orders. Then open the demo assets page and use the reset option, which on some screens sits behind a more menu next to the asset. The balance returns to its initial amount.
Return to live trading
Leaving demo mode is a single control, but its position and wording vary by platform. OKX's guides mention an exit control beside the demo trading label, a return to live trading button at the top right of the app, and a switch to live trading link at the bottom of the web page.
After switching, confirm that the demo label is gone and that the balances shown are your real ones before you place an order. Placing a real order while believing you are still in demo mode is the main risk of moving between the two.
What differs from live trading
OKX states that demo and live are separate and that market data from one cannot be used as a reference for the other. Prices and order book depth in demo are not the live market. An order that fills instantly in demo may fill at a worse price, partly, or not at all on the real order book.
Some rules carry over and some do not. OKX says the fee tier used in demo trading follows the tier of your main account. Sub-accounts cannot be created inside demo mode. They have to be created in live mode first and can then be used in demo.
The larger difference is that nothing is at stake. Demo results show whether you understand the mechanics, not whether a strategy would be profitable. Leveraged products carry a real risk of losing the whole margin, and their availability differs by country and OKX entity, so check what your region allows before moving on to live trading.
Demo API keys
A live API key does not work in demo trading. OKX's documentation says a separate key must be created inside the demo environment: switch to demo trading, open the personal or account area of the demo site, find the demo trading API page and create a key there. As with live keys, you set a passphrase and permissions, and a read-only key cannot place orders.
Every demo request must carry the request header x-simulated-trading with the value 1. Without it, or with a live key, OKX returns error 50101, which means the key does not match the current environment. OKX also publishes separate WebSocket addresses for demo trading in its API documentation.
OKX states that demo trading keys do not expire. The demo API does not cover everything, and OKX lists withdrawal, deposit, and purchase and redemption functions as unsupported. Test order logic in demo, and expect to test funding flows separately.
Questions and answers
- Is OKX demo trading free?
- Yes. It runs on virtual funds supplied by OKX and does not use or affect your real assets.
- How do I reset my OKX demo balance?
- Close all open positions and cancel all pending orders, then use the reset option on the demo assets page. The balance returns to its initial amount.
- Can I use my live API key for demo trading?
- No. Create a separate key inside the demo environment and send the header x-simulated-trading with the value 1 on every request. A mismatch returns error 50101.
- Are demo prices the same as the real market?
- Do not assume so. OKX says the demo and live environments are separate and that market data from one cannot be used as a reference for the other.
- Can I withdraw profits made in demo trading?
- No. Demo funds are virtual and have no value outside the demo environment. They cannot be withdrawn or converted into real assets.
Crypto trading carries a high risk of loss, and leveraged products can lose your whole deposit. Nothing here is investment advice. Check that the exchange is available in your country before you sign up.
Related guides
- APIOKX create API keyCreating an OKX API key step by step: the three values you must store, which permissions to grant, why binding an IP address matters, the inactivity expiry rule and the errors new keys most often hit.
- DepositHow to deposit on OKXA step-by-step crypto deposit on OKX: choosing the asset and network, copying the address and memo, picking the funding or trading account, and what to check if the deposit does not arrive.
- VerificationOKX KYC levelsHow identity verification on OKX is structured today: the stages of the individual verification form, what an unverified account cannot do, and where your own limits are shown.
- Referral codeOKX referral codeWhat an OKX referral code does, where it goes on the sign-up form, the rule that stops you adding or changing it afterwards, and how to check whether one is attached to your account.