Submit a new order over the authenticated WebSocket connection. The response confirms LTP has accepted the order. The order then goes through state changes (NEW → OPEN → FILLED / CANCELLED) which are delivered via the Orders push channel.
Rate limit: 1200 requests per 60 seconds
Request
Send the following message after login to place an order.
{
"id": "XXX",
"action": "place_order",
"args": {
"clientOrderId": "XXXX",
"sym": "BINANCE_SPOT_BTC_USDT",
"side": "BUY",
"orderType": "LIMIT",
"timeInForce": "GTC",
"orderQty": "1000",
"limitPrice": "60000",
"reduceOnly": "false"
}
}
| Field | Type | Required | Description |
|---|---|---|---|
id | String | N | Request ID |
action | String | Y | Order Must be place_order. |
args | Object | Y | Order parameters (see below). |
> clientOrderId | String | N | Your own order ID. Only lowercase letters (a-z) and digits (0-9). Max 32 characters recommended. If omitted, LTP generates one automatically. |
> sym | String | Y | Trading pair identifier in Exchange_BusinessType_Base_Counter format. Examples: BINANCE_SPOT_BTC_USDT, BINANCE_PERP_BTC_USDT, OKX_PERP_ETH_USDT. Supported: SPOT / MARGIN / PERP on BINANCE and OKX; PERP on EDX. |
> side | String | Y | BUY or SELL. |
> orderType | String | Y | LIMIT (rests on the book at a specified price) or MARKET (executes immediately at the best available price). |
> timeInForce | String | N | Controls how long a LIMIT order stays active. GTC (Good Till Cancel, default — stays open until filled or cancelled), IOC (Immediate Or Cancel — unfilled portion is cancelled immediately), FOK (Fill Or Kill — must fill entirely or be cancelled entirely), GTX (Post-only — rejected if it would match immediately, ensuring you always pay maker fees). Do not send for MARKET orders. |
> orderQty | String | N | Order quantity. Required unless placing a spot market buy using quoteOrderQty. For Binance and EDX: base asset quantity (e.g. amount of BTC in BTC/USDT). For OKX: number of contracts. |
> limitPrice | String | N | Order price. Required when orderType is LIMIT. |
> quoteOrderQty | String | N | Order amount in quote currency. Only for spot market buy orders (e.g. spend exactly 100 USDT to buy BTC). Cannot be used together with orderQty. |
> reduceOnly | String | N | "true" or "false". When "true", the order can only reduce an existing position and will never open or increase one. For derivatives only. |
> positionSide | String | N | NONE for one-way mode (default). LONG or SHORT required in hedge mode. |
> tpTriggerPrice | String | N | Take-profit trigger price. When the market reaches this price, a take-profit order is submitted automatically. |
> tpTriggerType | String | N | Price type for the take-profit trigger: LAST_PRICE (default) or MARK_PRICE. |
> tpPrice | String | N | Take-profit execution price. "0" means execute at market price when triggered. |
> slTriggerPrice | String | N | Stop-loss trigger price. When the market reaches this price, a stop-loss order is submitted automatically. |
> slTriggerType | String | N | Price type for the stop-loss trigger: LAST_PRICE (default) or MARK_PRICE. |
> slPrice | String | N | Stop-loss execution price. "0" means execute at market price when triggered. |
Response
The response is sent immediately after LTP receives the request. A successful response means the order has been accepted — not that it has been filled.
Success:
{
"id": "XXXX",
"event": "place_order",
"code": 200000,
"msg": "Success",
"data": {
"orderId": "XXXXX",
"clientOrderId": "XXXXX"
}
}
Failure:
{
"id": "***",
"event": "error",
"code": "60009",
"msg": "CreateOrder failed."
}
| Field | Type | Description |
|---|---|---|
id | String | Request ID. |
event | String | place_order on success, error on failure. |
code | Long | 200000 = order accepted. Any other value indicates an error — check msg for the reason. |
msg | String | "Success" on success, or an error message explaining why the order was rejected. |
data | Object | Returned on success only. |
> orderId | String | LTP-assigned order ID. Use this for cancel or replace requests, and for querying order status. |
> clientOrderId | String | Echoed from the request. Empty if clientOrderId was not provided. |
