All
FAQ
Announcements
Product documents
How can I do derivatives trading with the Jupyter Notebook?
There are two position (order placement) modes when trading EXPIRY and PERPETUAL: long/short and buy/sell (net). You can change the position (order placement) mode between long/short and buy/sell (net), via the API Set position mode: result = accountAPI.set_position_mode( posMode = "long_short_mode" ) print(result) Or alternatively, you can do it via Settings on the web as below: In buy/sell (net) mode, the position of a certain contract is the net quantity of your buy and sell trades.Published on Sep 28, 2023Updated on May 29, 2026203How do I use the Top account long/short ratio indicator?
The Top account long/short ratio indicator visualizes the ratio of accounts with net long positions to those with net short positions among the top 5% of traders with the largest open position value. The Top account long/short ratio is viewed as a gauge of top traders' sentiment, where a high ratio suggests optimistic expectations. Long/short ratio (Accounts) ratio is calculated as accounts with net long positions/ accounts with net short positions.Published on May 16, 2024Updated on May 29, 202621X-Perps fees overview: trading fees, funding, and other costs
Your net PnL is not always equal to the raw market move from entry to exit. In addition to price movement, your net result may be affected by trading fees, funding payments, and execution-related effects.What are the common cost components for X-Perps?Published on Apr 9, 2026Updated on May 29, 20261How PnL works in X-Perps?
Realized PnL is the gain or loss that becomes final when a position (or part of a position) is closed.Why does my X-Perps net result differ from the "price move"? Your net result can be affected by more than the difference between entry and exit price. It may also include: trading fees funding payments partial closes and execution timingWhat should I check in the app to understand my X-Perps PnL?Published on Apr 9, 2026Updated on May 29, 2026How do I use the Account long/short ratio indicator?
The Account long/short ratio indicator visualises the ratio of accounts with net long positions to those with net short positions. This is a sentiment analysis indicator. An indicator featuring a high long-short ratio signifies positive expectations among investors. The display of Account long/short ratio indicatorHow do I turn on the Account long/short ratio indicator?Published on May 16, 2024Updated on May 29, 202619How do I get started with OKX Trade?
To become a market maker or a liquidity provider in an AMM, a user needs to deposit an equivalent value of two tokens in the corresponding pool - for example, $150 worth of ETH and $150 worth of USDC in the USDC/ETH pool.5. What's a DEX Aggregator?Published on Jul 26, 2022Updated on Jun 3, 202678Zero-Knowledge Proofs: what are zk-STARKs and how do they work? (zk-STARK V1)
Building constraints: in order to prove the liability of our exchange, we state three claims: Claim 1: We accumulated every user's values correctly, including the value of each crypto and net value of each user Claim 2: The exchange has not forged a virtual user whose net value is negative to reduce the total exchange liability (An individual user having negative balances is acceptable only if her/his net value is above 0) Claim 3: The total value that the exchange claims accounts for every singlePublished on May 10, 2023Updated on Sep 8, 2025181Event Contracts FAQ
The Up share price subsequently rises to 0.72 USDT, and the user sells all shares: Realized PnL ≈ (0.72 − 0.40) × 100 ≈ +32.00 USDT Note: actual amount received is net of fees.What happens if I hold to expiry without closing early?Published on Apr 16, 2026Updated on Jun 2, 2026How do I track the cost price of my spot trades?
Average cost price = (Average cost price before last buy × Amount + Price of last buy × Amount) / Net buying amount Cumulative Cost Price = (Cumulative buying value – Cumulative selling value) / Net buying amount Visit here to learn more.How do I track the cost price of my spot trades?Published on Sep 5, 2024Updated on May 29, 202628Satoshi test FAQ
You'll need to send a random amount specified by us, typically worth 5 USDC, for the test. This amount will be specified during the verification process.4. What happens if I send the wrong amount to the Satoshi test? If the amount sent doesn't match the specified amount for the Satoshi test, the verification will fail. You'll need to restart the test with the correct amount to proceed with your transaction.Your deposit will be locked and you may unlock it by providing the sender's info.Published on May 28, 2024Updated on May 29, 202643How do I use OKX Wallet Trader Mode for copy trading?
Risk Control Settings (optional) Buy Budget: The net buy cap for a copy trading task (net cost = cumulative buys − cumulative sells − gas). Once exceeded, subsequent copy-buy trades will be automatically filtered. If not set, there is no cap. Strategy Stop Loss: The cumulative loss cap for a copy trading task (in USD). When the total unrealized loss of tokens purchased through the task exceeds the threshold, subsequent copy-buy trades will be automatically filtered.Published on Dec 10, 2025Updated on May 29, 202628What's funding rate and how do I use it?
That means even if price moves only slightly, your net result may still be impacted by: trading fees funding payments position durationWhen and how funding is applied? Funding timing, calculation methodology, and payment intervals can vary. Always check the contract details and in-app product page for: current funding rate estimated next funding time historical funding data Important note: Funding rates can change over time and may become more significant during volatile market conditions.Published on Apr 15, 2026Updated on Jun 2, 2026Crypto profit & loss analysis (PnL) FAQ
Cryptos with a net value of less than $10 are not displayed.3. Is the asset and PnL data shown in Crypto PnL Analysis updated in real time? The number of assets changes in real-time, but there is a 5-10 minute delay in PnL.4. Is Crypto PnL analysis sharing available for all cryptos? No, stablecoins do not support PnL sharing at the moment.5. How is cumulative PnL calculated? When the total value of crypto assets is greater than $10, the system will start calculating the cumulative PnL.Published on Apr 3, 2026Updated on May 29, 2026How do I set up a recurring buy plan?
Example: if you set up a plan to buy $30 of BTC weekly starting on a Tuesday, you'll automatically buy $30 worth of BTC every Tuesday that follows. We only support plans fixed at the cash amount for recurring buy at this time.2. When will my recurring orders be executed? Your recurring orders will be automatically executed at the time you set up your plan and on the frequency you selected.Published on Jan 23, 2025Updated on May 29, 202650How can I do spot trading with the Jupyter Notebook?
In the example below, you are about to place a market order to buy BTC that is worth 100 USD. 1 # market order 2 result = tradeAPI.place_order( 3 instId="BTC-USDT", 4 tdMode="cash", 5 side="buy", 6 ordType="market", 7 sz="100", 8 tgtCcy="quote_ccy" # this determines the unit of the sz parameter. 9 ) 10 print(result)10.4 How can I use the client order ID parameter clOrdId?Published on Sep 29, 2023Updated on May 29, 2026561