Pre-check Order
Description
Pre-checks order margin requirements before execution. A successful pre-check only indicates that the pre-check passed and does not actually create an order. A formal order still requires a call to /api/v3/order/create, and the final validation result at the time of formal order submission shall prevail.
HTTP Request
- POST
/api/v3/order/pre-check - Supported Products:
linear - Rate Limit: 10 requests per second per UID
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
category | string | Yes | Product type: linear |
symbol | string | Yes | trading pair, such as BTCUSDT |
side | string | Yes | Direction: BUY / SELL |
orderType | string | Yes | order type: Market / Limit |
qty | string | Yes | Order quantity. For a spot Market Buy, specify the amount in the quote asset. |
price | string | No | Limit order price. |
timeInForce | string | No | Valid methods: GTC, IOC, FOK, PostOnly, PO-COF (spot-only for skip-order, valid only in spot trading) |
positionIdx | int64 | No | Futures position mode: 0 one-way, 1 long, 2 short. Accounts in one-way mode can omit it. The default is 0. |
orderLinkId | string | No | custom order ID, currently 36 characters long |
triggerPrice | string | No | Trigger price for conditional order |
triggerDirection | int32 | No | Trigger direction: triggered when 1 price increases / triggered when 2 price decreases |
triggerBy | string | No | Trigger price type: LastPrice / MarkPrice |
takeProfit | string | No | Take-profit trigger price, take-profit type is market order |
stopLoss | string | No | Stop-loss trigger price, stop-loss type is market order |
tpTriggerBy | string | No | Take-profit trigger price type. For contracts, default is LastPrice, LastPrice / MarkPrice. |
slTriggerBy | string | No | Take-profit trigger price type. For contracts, default is LastPrice, LastPrice / MarkPrice. |
reduceOnly | bool | No | Is reduce-only only |
Response Parameters
| Field | Type | Description |
|---|---|---|
orderId | string | Pre-check order ID (not a real order) |
orderLinkId | string | Custom Order ID |
preImrE4 | int32 | Initial margin rate before order placement (×10⁻⁴) |
preMmrE4 | int32 | Maintenance margin ratio before order (×10⁻⁴) |
postImrE4 | int32 | Initial margin ratio after order (×10⁻⁴) |
postMmrE4 | int32 | Maintenance margin ratio after order (×10⁻⁴) |
Request Example
POST /api/v3/order/pre-check HTTP/1.1
Host: openapi.lbank.com
Content-Type: application/json
ex-api-key: <your_api_key>
ex-timestamp: <current_unix_timestamp_ns>
ex-nonce: <unique_random_hex>
ex-signature: <your_signature>
ex-client-type: API
{
"category": "linear",
"symbol": "BTCUSDT",
"side": "BUY",
"orderType": "Limit",
"qty": "0.001",
"price": "60000",
"timeInForce": "GTC",
"positionIdx": 0,
"orderLinkId": "b320fe1a-478c-4d2e-a219-000000000001",
"reduceOnly": false
}
Response Example
HTTP/1.1 200 OK
Content-Type: application/json
{
"code": 200,
"message": "Success",
"data": {
"orderId": "example_pre_check_order_id",
"orderLinkId": "b320fe1a-478c-4d2e-a219-000000000001",
"preImrE4": 1000,
"preMmrE4": 500,
"postImrE4": 1200,
"postMmrE4": 600
},
"extras": null
}