New Order
Type: TRADE
Weight: 1
POST /fapi/v1/order
Send in a new order: LIMIT, MARKET, or a trigger order (STOP / TAKE_PROFIT families).
Request
POST /fapi/v1/order?timestamp=<ms>&signature=<hex>
Content-Type: application/json
Business parameters travel in the JSON body; timestamp and signature in the query string. The signed payload is query_string + raw_body (see Signing).
Body params
| Name | Type | Required | Notes |
|---|---|---|---|
symbol | string | yes | BTCUSDT (aliases normalized). |
side | string | yes | BUY / SELL. |
type | string | yes | LIMIT MARKET STOP STOP_MARKET TAKE_PROFIT TAKE_PROFIT_MARKET. Aliases STOP_LIMIT (= STOP) and TAKE_PROFIT_LIMIT (= TAKE_PROFIT) accepted. TRAILING_STOP_MARKET only via algoOrder. |
quantity | string | one of quantity / quoteOrderQty | Base-asset quantity. |
quoteOrderQty | string | one of quantity / quoteOrderQty | USDT notional; converted to quantity = floor(quoteOrderQty / refPrice / lot_size) × lot_size where refPrice is price (LIMIT / STOP / TAKE_PROFIT), stopPrice (STOP_MARKET / TAKE_PROFIT_MARKET) or mark price (MARKET). Supported on every order type (Binance spot supports it only on MARKET). Sending both → -1106. |
price | string | LIMIT / STOP / TAKE_PROFIT | Limit price. |
stopPrice | string | STOP_* / TAKE_PROFIT_* | Trigger price (evaluated against mark price). |
timeInForce | string | no | GTC (default) IOC FOK GTX (post-only). |
reduceOnly | bool / string | no | Accepts true/false/"true"/"false"/1/0/"1"/"0"/"". |
positionSide | string | no | Only BOTH is meaningful; LONG / SHORT are accepted but behave as BOTH. |
workingType | string | no | CONTRACT_PRICE / MARK_PRICE — echoed only; triggers always use mark price. |
newClientOrderId | string | no | 1–36 chars of [A-Za-z0-9_.-]; unique per (user, active orders). Auto-generated when omitted. |
Response — 200
{
"orderId": "550e8400-e29b-41d4-a716-446655440000",
"symbol": "BTCUSDT",
"status": "NEW",
"clientOrderId": "my-order-1",
"price": "60000.00",
"avgPrice": "0",
"origQty": "0.010",
"executedQty": "0",
"cumQuote": "0",
"timeInForce": "GTC",
"type": "LIMIT",
"reduceOnly": false,
"side": "BUY",
"positionSide": "BOTH",
"stopPrice": "0",
"workingType": "CONTRACT_PRICE",
"priceProtect": false,
"origType": "LIMIT",
"updateTime": 1714261234567,
"time": 1714261234567
}
status ∈ NEW / PARTIALLY_FILLED / FILLED / CANCELED / REJECTED. orderId and clientOrderId are UUID-style strings, not integers.
Sparky behaviour worth knowing
- Trigger orders (
STOP_*,TAKE_PROFIT_*) do not enter the book. They are stored as trigger orders and a keeper submits the derived order when mark price crossesstopPrice. A trigger whose condition is already true is rejected with-2021. - GTX (post-only) must be
LIMITwithprice; if it would cross it is rejected with-2010 post only order would have matched immediately. Accepted GTX orders are persisted asGTC. reduceOnlyis enforced: no opposite-side position →-2022; a quantity larger than the opposite position is capped to it (not rejected), so it can never flip the position.- Lot size:
quantity < lot_size→-1013; quantities that are not a lot multiple are floored silently. - Notional bounds:
notional < min_order_size_usdor> max_order_size_usd→-1013, usingpricefor LIMIT and mark price for MARKET. - Margin:
notional / leverage × 1.005is frozen at placement (0.5 % buffer); the unused part is released on fill. Insufficient →-2019. - Leverage is the standing per-symbol value from
POST /fapi/v1/leverage, clamped to the market maximum at placement. - Fees use your live VIP tier (same as the web app).
- Duplicate
newClientOrderIdamong your active orders →-2014; terminal orders' ids may be reused. - OI cap: if the order would push the market's long or short open interest over its cap it is rejected (
-2010).
Errors
| HTTP | code | msg |
|---|---|---|
400 | -1013 | Quantity below lot size / notional out of bounds. |
400 | -1100 | Unparseable quantity / price / bad newClientOrderId characters. |
400 | -1102 | Missing required parameter (e.g. price on LIMIT, stopPrice on STOP). |
400 | -1106 | quantity and quoteOrderQty both sent. |
400 | -1121 | Symbol not tradeable on this deployment. |
400 | -1130 | Unknown side / type. |
400 | -2010 | GTX would match immediately; OI cap exceeded; reference price ≤ 0. |
400 | -2014 | Duplicate newClientOrderId. |
400 | -2019 | Margin insufficient. |
400 | -2021 | Trigger order would trigger immediately. |
400 | -2022 | reduceOnly with no opposite position. |
500 | -1001 | Matching engine / shard forwarding failure. |
Authentication failures (INVALID_API_KEY, API_KEY_DISABLED, IP_NOT_ALLOWED, SIGNATURE_INVALID) apply to every signed endpoint and use Sparky's {"success":false,"error":{...}} envelope; see Error Codes.