okexcBinance & OKX fee lookup
Esc

OKX guides

How to Calculate OKX Trading Fees: Spot and Contract Formulas With Worked Examples

Spot and contracts use different fee formulas, and applying the spot one to a leveraged position understates the cost by an order of magnitude. This guide works through both with examples you can re-run with your own numbers.

Published Revised 5 min read

Rates and amounts in this article are from when it was published and may have changed since. Current figures: Fee calculator · Binance vs OKX fees (updated daily)

Last checked: August 21, 2026. Independent educational guide, not investment advice, not affiliated with OKX. Every rate used below is an example chosen to make the arithmetic readable — none of them is a current OKX rate. Substitute the rate shown in your own account before relying on any result.

"How much will this trade actually cost me?" is answerable with arithmetic, but only if you know which formula applies to which product. OKX uses a different fee expression for spot than for contracts, and beginners routinely apply the spot one to a leveraged position and underestimate the cost by an order of magnitude. This guide walks through both, with worked examples you can re-run with your own numbers.

This guide focuses on the arithmetic behind an OKX fee charge. To see how it fits with everything else you pay on OKX, start with our OKX fees overview, which covers trading, funding and withdrawal costs in one place.

The spot formula

OKX expresses the spot trading fee as:

Fee = fee rate × amount of crypto bought or sold when the order was filled

The subtle part is the words "bought or sold," because they determine which asset the fee is taken from.

Worked example — buying. Suppose you buy 0.02 BTC at 60,000 USDT, and your applicable taker rate is 0.1% (example rate).

  • Notional: 0.02 × 60,000 = 1,200 USDT
  • Fee, denominated in the asset bought: 0.02 BTC × 0.1% = 0.00002 BTC
  • BTC credited to your account: 0.02 − 0.00002 = 0.01998 BTC

You paid 1,200 USDT and received slightly less than 0.02 BTC. This is why the quantity in your account never exactly matches the quantity on the order ticket.

Worked example — selling. Sell the same 0.02 BTC at 60,000 USDT with the same rate:

  • Proceeds before fee: 1,200 USDT
  • Fee, denominated in the currency received: 1,200 × 0.1% = 1.2 USDT
  • USDT credited: 1,198.8 USDT

The round trip. Buying and selling are two separate fills, each charged. A position you open and close at exactly the same price does not break even — it loses roughly two fees. At 0.1% taker on both sides, that is about 0.2% of notional, meaning the price must move about 0.2% in your favour just to get back to zero.

The contract formula

For USDT-margined perpetual swaps, the structure OKX publishes is:

Trading fee = contract value × number of contracts × fill price × fee rate

The critical difference is that this is calculated on notional value, not on the margin you posted. With leverage those two numbers diverge sharply.

Worked example. Say you open a position with 500 USDT of margin at 10× leverage, giving 5,000 USDT of notional, at a 0.05% taker rate (example rate).

  • Opening fee: 5,000 × 0.05% = 2.5 USDT
  • Closing fee, if the exit notional is similar: ≈ 2.5 USDT
  • Round-trip trading fee: ≈ 5 USDT

Now measure that against the right denominator. Against notional it is 0.1%. Against your margin it is 5 ÷ 500 = 1%. The leverage multiplied your fee exposure relative to the capital you actually put up, and this is the calculation beginners skip. Raising leverage from 10× to 20× on the same margin doubles the fee in absolute terms.

Note also that the closing fee is computed at the exit price, so it is not exactly equal to the opening fee unless the price is unchanged.

What the trading fee leaves out

For a complete cost estimate, three more items belong in the sum:

  1. Funding, for perpetuals held across a settlement. This is exchanged between long and short holders on a schedule, and is a separate mechanism from the trading fee — see OKX funding rate vs trading fees.
  2. Spread and slippage. A market order fills against the book, and on a thin pair the average fill price can differ from the price you saw. A "zero-fee" pair can still cost you here — see zero-fee pairs and the real spread cost.
  3. Withdrawal fees, if the point of the trade is to move the asset off the platform afterwards — see OKX withdrawal fees.

A workable planning total looks like this:

Total round-trip cost ≈ opening fee + closing fee + net funding + estimated slippage

Convert it to the move you need:

Break-even move (%) ≈ total round-trip cost ÷ notional × 100

For the full derivatives version of this calculation, see calculating your OKX perpetual break-even price.

Getting the rate right

The arithmetic is trivial; the input is where people go wrong. Three rules:

  • Use your own rate, not a published table. Rates depend on your fee tier, region and instrument. The order panel in your account shows the applicable rate for the selected pair.
  • Use the correct rate of the two. A resting limit order that adds to the book is charged at the maker rate; anything that fills immediately is a taker fill. See maker, taker and OKX fee tiers.
  • Do not carry rates across products. Spot, perpetuals, expiry futures and options each have their own schedule.

Reconciling against your statement

To verify a fee you were actually charged, pull the fill from your order history and line up five things: the instrument, the fill price, the filled quantity (not the ordered quantity), whether the fill was maker or taker, and the fee currency. Partial fills are charged per fill, so one order ticket can generate several fee entries. If the numbers still do not reconcile, contact official support with order IDs only — never share passwords, verification codes, API keys, or seed phrases.

FAQ

Why is the fee charged in BTC rather than USDT on my buy? Because the spot fee is levied on the asset acquired. On a sell it is levied on the proceeds, typically USDT.

Does the fee use margin or notional on a contract trade? Notional. Multiplying your margin by the fee rate will understate the cost by roughly the leverage multiple.

Why did one order produce several fee entries? The order filled in parts. Each fill is charged separately, and the parts can even mix maker and taker treatment.

Is a limit order always cheaper? Only if it rests on the book. A limit order priced to cross the spread executes immediately and is charged as a taker fill.

Sources

Educational content only, not financial advice. All rates above are illustrative examples. Derivatives carry leverage risk and may not be available in every region.

Want your own numbers? Fee calculator · Withdrawal fees

More on this topic

Archive →