User Liquidation Orders
Description
Get the user's historical liquidation orders.
HTTP Request
GET /fapi/v1/forceOrders (HMAC SHA256)
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| symbol | STRING | NO | Trading pair |
| startTime | LONG | NO | Accepted but currently ignored — no time filtering is applied |
| endTime | LONG | NO | Accepted but currently ignored — no time filtering is applied |
| limit | INT | NO | Default 100; Max 1000 |
| timestamp | LONG | YES | Timestamp |
Response Example
[
{
"orderId": "9d1a3c6e-2f47-4b8a-9c30-5b7de2a41f88",
"symbol": "BTCUSDT",
"status": "FILLED",
"side": "SELL",
"type": "LIQUIDATION",
"price": "56000",
"origQty": "1",
"executedQty": "1",
"time": 1623910239123,
"updateTime": 1623910239123
}
]
The response contains the caller's most recent liquidation events, newest
first, up to limit. There is no age cutoff.
If no symbol is sent, all liquidation orders will be returned.
Code Examples
cURL
API_KEY="your_api_key"
API_SECRET="your_api_secret"
TIMESTAMP=$(date +%s%3N)
QUERY_STRING="symbol=BTCUSDT&limit=100×tamp=${TIMESTAMP}"
SIGNATURE=$(echo -n "${QUERY_STRING}" | openssl dgst -sha256 -hmac "${API_SECRET}" | awk '{print $2}')
curl -s -H "X-MBX-APIKEY: ${API_KEY}" \
"https://api.prex.world/fapi/v1/forceOrders?${QUERY_STRING}&signature=${SIGNATURE}"
Python
import time, hmac, hashlib, requests
API_KEY = "your_api_key"
API_SECRET = "your_api_secret"
BASE_URL = "https://api.prex.world"
def sign(params: str) -> str:
return hmac.new(API_SECRET.encode(), params.encode(), hashlib.sha256).hexdigest()
def signed_get(path, params={}):
params["timestamp"] = int(time.time() * 1000)
qs = "&".join(f"{k}={v}" for k, v in params.items())
params["signature"] = sign(qs)
return requests.get(f"{BASE_URL}{path}", params=params, headers={"X-MBX-APIKEY": API_KEY})
# Get user's liquidation orders for BTCUSDT
resp = signed_get("/fapi/v1/forceOrders", params={
"symbol": "BTCUSDT",
"limit": "100"
})
print(resp.json())