Your order should meet or exceed the minimum order amount.

OKX error 51020 means your order is smaller than the instrument's minimum size (minSz). For spot pairs minSz is in the coin you trade; for swaps it is in contracts.

Official docs opened 2026-11-16. OKX error 51020. Plain-English guide, not financial advice.

What the official docs say

OKX API docs, error codes: "51020 - Your order should meet or exceed the minimum order amount." minSz is returned by /api/v5/public/instruments.

Three common causes

  1. The size is below minSz (for BTC-USDT spot our data shows 0.00001 BTC; for DOGE-USDT 10 DOGE).
  2. You sized the trade in USDT but sent it as sz in coins, so the number is tiny.
  3. After rounding down to lotSz the size fell below minSz.

How to fix it

  1. Read minSz and lotSz for the instrument.
  2. Convert your intended size into the unit OKX wants (coins on spot, contracts on swaps).
  3. Round down to lotSz, then compare with minSz.
  4. If it is below minSz, increase the trade or skip it.

Python (standard library only) example (runs as shown with sample numbers):

from decimal import Decimal, ROUND_DOWN

def floor_to_step(value, step):
    v, s = Decimal(str(value)), Decimal(str(step))
    return (v / s).to_integral_value(ROUND_DOWN) * s

min_sz, lot_sz = Decimal("10"), "0.000001"      # DOGE-USDT spot
sz = floor_to_step("7.5", lot_sz)
print("too small - skip" if sz < min_sz else sz)

Current limits for popular symbols

SymbolQuantity stepMinimum quantitySource and read date
OKX BTC-USDT0.000000010.00001www.okx.com, read 2026-11-11
OKX ETH-USDT0.0000010.0001www.okx.com, read 2026-11-11
OKX SOL-USDT0.0000010.01www.okx.com, read 2026-11-11
OKX XRP-USDT0.0000011www.okx.com, read 2026-11-11
OKX DOGE-USDT0.00000110www.okx.com, read 2026-11-11
OKX BTC-USDT-SWAP (swap, contracts) (1 contract = 0.01 coins)0.010.01www.okx.com, read 2026-11-11
OKX ETH-USDT-SWAP (swap, contracts) (1 contract = 0.1 coins)0.010.01www.okx.com, read 2026-11-11
OKX SOL-USDT-SWAP (swap, contracts) (1 contract = 1 coins)0.010.01www.okx.com, read 2026-11-11
OKX XRP-USDT-SWAP (swap, contracts) (1 contract = 100 coins)0.010.01www.okx.com, read 2026-11-11
OKX DOGE-USDT-SWAP (swap, contracts) (1 contract = 1000 coins)0.010.01www.okx.com, read 2026-11-11

Check your numbers

Pick a symbol, type your quantity and see the valid rounded quantity.

Check this automatically before every order: AIKIT (free 1,000 calls)

Disclosure: AIKIT is our own product. It returns sourced exchange and broker rules (with the official source and read date) and checks bot code against them. Facts and checks only, not advice.

Questions people ask

What does OKX 51020 mean?

The order is smaller than the minimum order size (minSz) of that instrument.

Is minSz in USDT?

No. On spot it is in the base coin. On swaps it is in contracts.

Does market data show it?

Yes, minSz is in /api/v5/public/instruments. The table on this page lists current values with source and read date.

Sources

Symbol limits in the table: AIKIT facts read 2026-11-11 from the venue's own public API (links in the table). Exchange rules change; read the live values from the venue before you trade.

All error fixes. General information for education only. It is not financial advice, and trading can lose money.