General information

Quantity Units

Units of the order quantity per exchange and market

It is always recommended to use testnet/sandbox first!

How the quantity is calculated

  • Percentages (q=10%) are a share of the available balance. On margin and derivatives markets they are always multiplied by the leverage. On closing orders they are a share of the position.
  • Absolute quantities (q=0.05) are in the unit of the exchange or market, see the tables below.
  • Currency amounts (u=currency, or the suffix $: q=100$) are in the currency of the third column. Where the leverage is used, the amount is the margin, not the position value: long=100$ lev=10 on BTCUSDT opens a position worth about 1000 USDT.
  • To disable the leverage multiplier, add levcalc=1 or prefix the quantity with '@', eg. q=@0.05 (since 1.3.110 also on closing orders).
  • The same for a saved quantity (after save): write q=lastqty@ (or q=@lastqty since 1.3.110) for exactly the saved size, or q=50%l for a share of it, which includes the '@'. Without it the exchanges marked ✔ below multiply the saved size by the leverage again.
Not sure what a quantity will be? Add disabled to the line: the order is only calculated and logged, not placed.

Derivatives and margin markets

coin = the base asset, eg. BTC on BTCUSDT. The contract size of a market is shown in the exchange's contract details.

Marketq= (default unit)u=currency
Binance Futures USD-McoinUSDT / USDC
Binance Futures COIN-Mcontracts (BTC 100 USD, others 10 USD)USD
Bitfinex Margincoinquote currency (eg. USD)
Bitfinex Perpetuals (F0)coinUSDT
Bybit Linear (perpetuals and futures)coinUSDT / USDC
Bybit Inversecontracts (1 USD)coin
Bybit Optionscoinpremium in USDT / USDC
Deribit InverseUSD (BTC: multiples of 10)coin
Deribit Linear (USDC)coinUSDC
Deribit Optionscoinpremium in coin (or USDC)
Kraken Futures Inverse (PI_ / FI_)contracts (1 USD)coin
Kraken Futures Multi-Collateral (PF_)coinUSD
KuCoin Futures USDT-Mlots (eg. 0.001 BTC)USDT
KuCoin Futures Inverselots (1 USD)coin
OANDAunits (base currency)account currency ¹
OKX Linearcontracts (eg. 0.01 BTC)USDT ²
OKX Inversecontracts (eg. 100 USD)coin ²
Phemex USDT-McoinUSDT
Phemex COIN-Mcontracts (1 USD)coin
¹ converted from the account currency to the quote currency of the pair, like percentages² USD in multi-currency and portfolio margin accounts

Leverage

Where the leverage multiplies the quantity, the default leverage (without lev=) decides the order size. exchange setting = the leverage currently set on the exchange for the market.

ExchangeLeverage × quantity ¹Default leverage
Binance Futuresexchange setting
Bitfinexpair maximum (margin), 10x (perpetuals)
Bybit Linear / Inverseu=currency onlyexchange setting
Bybit Options–1x (no leverage)
Deribitu=currency only1x
Kraken Futures Inverseinstrument maximum ²
Kraken Futures Multi-Collateralleverage preference (isolated), instrument maximum (cross)
KuCoin Futures1x
OANDAu=currency onlyaccount leverage
OKXexchange setting
Phemexexchange setting
¹ ✔ = absolute quantities and u=currency, also on closing orders (close q=…). Percentages always include the leverage² eg. 50x: Kraken's inverse markets have no leverage setting, long=1000 without lev= is 50000 contracts!
Always set lev= (or use levcalc=1) where the leverage multiplies the quantity, unless you know the leverage set on the exchange.

Spot markets

Spot quantities are in the base asset (coin) and u=currency amounts in the quote currency (eg. USDT), except where the table says otherwise. Spot orders don't use leverage.

ExchangeLimit buyMarket buySell
Binance, Kraken, Bitfinex, Coinbase Pro, Gemini, Poloniexbasebasebase
Bybit, Coinbase Advanced, KuCoin, OKXbasequotebase
Phemexquotequotebase
eg. on Bybit buy=100 market buys for 100 USDT, buy=0.001 (limit) buys 0.001 BTC
Attention: Always double check that you are using the right syntax/alert!