All
FAQ
Announcements
Product documents
Crypto profit & loss analysis (PnL) FAQ
How is the average cost of a crypto asset calculated in Crypto PnL Analysis? Average cost = (Average cost before the last purchase or deposit * Amount + Price of the last purchase or deposit * Amount) / Balance after the last purchase or deposit Note: price of the last deposit is the price at the moment of depositing7. How is the PnL calculated? PnL = (Last price - Average cost) * Current balance8. How is the PnL% calculated? PnL% = (Last price - Average cost) / Average cost9.Published on 22 Aug 2023Updated on 3 Mar 2026103How do I track the cost price of my spot trades?
How is the cost price calculated? The calculations are based on your spot trading history. You may choose to calculate by average entry cost or cumulative average cost in trading settings. 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 5 Sept 2024Updated on 30 Jan 202626How do I use the custom formula feature?
Navigate to the Trading screen Select Advanced Select Custom Formula from the list of options Select Custom Formula from the Advanced option Enter your formula using mathematical operators For instance, you would like to compare SOL’s performance to BTC using SOL/BTC, or evaluate the stronger pair by calculating SOL/BTC – ETH/BTC You can create a formula using up to 10 pairs with +, -, /, and * operations Once a formula is created, the chart dynamically updates with candles that reflect the calculatedPublished on 5 Mar 2025Updated on 10 Sept 20253What is Proof of Reserves (PoR) user snapshot data?
as: snapshot equity = the USDT amount shown in "My Portfolio" - the USDT amount of the margin trading position liability ETH snapshot is calculated as: snapshot equity = ETH amount shown in "My Portfolio" + ETH amount of margin trading position assets - ETH amount of margin trading UPL Example: short ETH/USDT (i.e. borrow ETH and sell USDT) ETH snapshot is calculated as: snapshot equity = ETH amount shown in "My Portfolio" - ETH amount of margin trading position liabilities USDT snapshot is calculatedPublished on 20 Jan 2023Updated on 4 Mar 2026484Zero-Knowledge Proofs: what are zk-STARKs and how do they work? (zk-STARK V1)
You may first calculate your leaf by hashing your asset information, then verify whether your leaf is a valid leaf in the Merkle tree and root we publish. For example, in Figure 1, the user with an id of id_k will calculate hashk = hash("20" + "15" + "5" + "id_k" + "99821"), and the other data in the red square frame will be the Merkle path verification. An open source tool is provided for users to do this verification.Published on 10 May 2023Updated on 8 Sept 2025178Trading Fee Rules FAQ
How is the trading fee calculated? Instruments Calculation formulas of trading fees Spot/Margin Trading fee of Spot/Margin = Fee rate × Amount of bought or sold crypto when order filled.Published on 22 Mar 2024Updated on 3 Mar 20261,069OKX Trading Rebate Card - Terms and Conditions
If the valid usage period is the same, the earliest voucher received will be consumed first.How does Trading Fee Rebate calculation works?Published on 9 Oct 2023Updated on 8 Jan 2026323OKX API FAQ
If you need to calculate the conversion between the number of contracts and coins, you can refer to the number of contracts-to-coin conversion interface here.How to obtain the fluctuation rate of the interface? The interface cannot directly obtain the price increase or decrease, but it can be calculated through a calculation formula.Published on 20 Sept 2024Updated on 3 Mar 2026126How do I track my assets when trading in Spot and Futures mode?
After the merger, the total of both positions and assets will be calculated, which may result in a larger figure than before.Why are my assets more than before on the trading page? The new version will also show all of the user's assets, including less than 8-bit assets, while the old version will not.How to only display one of the holds or assets? After selecting the preferred type through the drop-down, the result of the matching condition can be displayed.Published on 23 Oct 2024Updated on 12 Feb 202617How can I do derivatives trading with the Jupyter Notebook?
The notional value of a derivative contract can be calculated as ctVal * ctMult (unit: ctValCcy); For example, from the instrument parameters shown below, we can calculate the notional value of an LTC-USD perpetual contract as: ctVal * ctMult (unit:ctValccy) = 10 * 1 USD = 10 USD "instType":"SWAP", "instId":"LTC-USD-SWAP", "instFamily":"LTC-USD", "uly":"LTC-USD", "settleCcy":"LTC", "ctVal":"10", "ctMult":"1", "ctValCcy":"USD"3.Published on 28 Sept 2023Updated on 12 Feb 2026192What are the advantages of using cross margin and isolated margin?
The margin and profit and loss for each position are calculated separately. The risks and returns of each position are independent, isolating the risk of isolated margin positions from that of cross margin positions. In the event of a liquidation, only the margin for that specific position will be lost, preventing larger losses.Published on 20 Mar 2023Updated on 3 Feb 202641How do I add margin for margin trading?
Isolated margin: The margin for each position is calculated separately, and during liquidation, only the current position is at risk of loss. You can choose different margin modes based on your personal needs. The methods for increasing and decreasing margin will vary accordingly.How to increase or decrease margin?Increase or decrease margin in isolated margin mode. After opening a position, click the ➕ button next to the margin in the position and asset section to add or reduce margin.Published on 20 Mar 2023Updated on 3 Feb 202635Why is my accessible balance lower than my funds unavailable for withdrawal?
Your accessible balance and funds under the unavailable for withdrawal portion are calculated differently, which can result in the former being lower than the latter. The value of your accessible balance changes with the fluctuation of crypto value and trading activities. However, the value of your funds under the unavailable for withdrawal portion is a snapshot taken at the time of deposit. It does not change with the fluctuation of crypto value and trading activities.Published on 13 May 2024Updated on 8 Sept 2025335OKX Australia - New User Bonus Program
Reward calculation and distribution: The calculation of the reward(s) will be based on the BTC/AUD exchange rate on the day of distribution, as determined by the OKX platform on the distribution date. The distribution of the reward(s) will occur within 5 business days following the successful completion of each task. OKX may delay the distribution of rewards due to unforeseen technical or operational issues.Published on 10 June 2024Updated on 17 Nov 202568How do I adjust leverage levels?
How's margin calculated for leveraged trades? Margin requirements vary based on the leverage level and the asset's volatility. The initial margin is the amount you must deposit to open a leveraged position, and the maintenance margin is the minimum amount needed to keep the position open.4. What happens if my margin falls below the maintenance level? If your margin falls below the maintenance level, we may issue a margin call, requiring you to deposit additional funds.Published on 2 Aug 2024Updated on 30 Jan 202653