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=10on BTCUSDT opens a position worth about 1000 USDT. - To disable the leverage multiplier, add
levcalc=1or prefix the quantity with '@', eg.q=@0.05(since 1.3.110 also on closing orders). - The same for a saved quantity (after
save): writeq=lastqty@(orq=@lastqtysince 1.3.110) for exactly the saved size, orq=50%lfor 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.
| Market | q= (default unit) | u=currency |
|---|---|---|
| Binance Futures USD-M | coin | USDT / USDC |
| Binance Futures COIN-M | contracts (BTC 100 USD, others 10 USD) | USD |
| Bitfinex Margin | coin | quote currency (eg. USD) |
| Bitfinex Perpetuals (F0) | coin | USDT |
| Bybit Linear (perpetuals and futures) | coin | USDT / USDC |
| Bybit Inverse | contracts (1 USD) | coin |
| Bybit Options | coin | premium in USDT / USDC |
| Deribit Inverse | USD (BTC: multiples of 10) | coin |
| Deribit Linear (USDC) | coin | USDC |
| Deribit Options | coin | premium in coin (or USDC) |
| Kraken Futures Inverse (PI_ / FI_) | contracts (1 USD) | coin |
| Kraken Futures Multi-Collateral (PF_) | coin | USD |
| KuCoin Futures USDT-M | lots (eg. 0.001 BTC) | USDT |
| KuCoin Futures Inverse | lots (1 USD) | coin |
| OANDA | units (base currency) | account currency ¹ |
| OKX Linear | contracts (eg. 0.01 BTC) | USDT ² |
| OKX Inverse | contracts (eg. 100 USD) | coin ² |
| Phemex USDT-M | coin | USDT |
| Phemex COIN-M | contracts (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.
| Exchange | Leverage × quantity ¹ | Default leverage |
|---|---|---|
| Binance Futures | exchange setting | |
| Bitfinex | pair maximum (margin), 10x (perpetuals) | |
| Bybit Linear / Inverse | u=currency only | exchange setting |
| Bybit Options | – | 1x (no leverage) |
| Deribit | u=currency only | 1x |
| Kraken Futures Inverse | instrument maximum ² | |
| Kraken Futures Multi-Collateral | leverage preference (isolated), instrument maximum (cross) | |
| KuCoin Futures | 1x | |
| OANDA | u=currency only | account leverage |
| OKX | exchange setting | |
| Phemex | exchange 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.
| Exchange | Limit buy | Market buy | Sell |
|---|---|---|---|
| Binance, Kraken, Bitfinex, Coinbase Pro, Gemini, Poloniex | base | base | base |
| Bybit, Coinbase Advanced, KuCoin, OKX | base | quote | base |
| Phemex | quote | quote | base |
eg. on Bybit
buy=100 market buys for 100 USDT, buy=0.001 (limit) buys 0.001 BTCAttention: Always double check that you are using the right syntax/alert!