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.
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
- The size is below minSz (for BTC-USDT spot our data shows 0.00001 BTC; for DOGE-USDT 10 DOGE).
- You sized the trade in USDT but sent it as sz in coins, so the number is tiny.
- After rounding down to lotSz the size fell below minSz.
How to fix it
- Read minSz and lotSz for the instrument.
- Convert your intended size into the unit OKX wants (coins on spot, contracts on swaps).
- Round down to lotSz, then compare with minSz.
- 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
| Symbol | Quantity step | Minimum quantity | Source and read date |
|---|---|---|---|
| OKX BTC-USDT | 0.00000001 | 0.00001 | www.okx.com, read 2026-11-11 |
| OKX ETH-USDT | 0.000001 | 0.0001 | www.okx.com, read 2026-11-11 |
| OKX SOL-USDT | 0.000001 | 0.01 | www.okx.com, read 2026-11-11 |
| OKX XRP-USDT | 0.000001 | 1 | www.okx.com, read 2026-11-11 |
| OKX DOGE-USDT | 0.000001 | 10 | www.okx.com, read 2026-11-11 |
| OKX BTC-USDT-SWAP (swap, contracts) (1 contract = 0.01 coins) | 0.01 | 0.01 | www.okx.com, read 2026-11-11 |
| OKX ETH-USDT-SWAP (swap, contracts) (1 contract = 0.1 coins) | 0.01 | 0.01 | www.okx.com, read 2026-11-11 |
| OKX SOL-USDT-SWAP (swap, contracts) (1 contract = 1 coins) | 0.01 | 0.01 | www.okx.com, read 2026-11-11 |
| OKX XRP-USDT-SWAP (swap, contracts) (1 contract = 100 coins) | 0.01 | 0.01 | www.okx.com, read 2026-11-11 |
| OKX DOGE-USDT-SWAP (swap, contracts) (1 contract = 1000 coins) | 0.01 | 0.01 | www.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
- https://www.okx.com/docs-v5/en/ (read 2026-11-16)
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.
Related fixes
- Order quantity must be a multiple of the lot size. (OKX spot and swap)
- Filter failure: LOT_SIZE (Binance spot)
- Filter failure: NOTIONAL (Binance spot)
All error fixes. General information for education only. It is not financial advice, and trading can lose money.