Query Order
Description
Retrieve the current state of a single order. Returns 404 if the order does not exist or belongs to a different user — the same response in both cases, so callers cannot probe for the existence of other users' orders.
HTTP Request
GET /spot/orders/:id (JWT or API Key)
Weight
0 — order endpoints are not subject to per-IP weight limits.
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
id | STRING (path) | YES | UUID of the order to query. Returned as id by New Order. |
Response Example
200 OK
{
"id": "9f2a1c4e-5b67-4d8a-bf93-2e1f4a6c8d10",
"symbol": "DFUSDT",
"side": "buy",
"type": "limit",
"tif": "gtc",
"price": "0.5000",
"quantity": "100",
"quote_quantity": null,
"filled_qty": "100",
"avg_fill_price": "0.4990",
"status": "filled",
"reject_reason": null,
"created_at": 1778400000,
"updated_at": 1778400090
}
| Field | Notes |
|---|---|
id | Server-generated UUID for this order. |
status | See Order Status. Terminal states: filled / canceled / rejected. |
filled_qty | Cumulative base quantity matched across all fills. |
avg_fill_price | Volume-weighted average price across all fills. "0" if not yet filled. |
quote_quantity | Set only for market BUY (mirrors the original request); null otherwise. |
reject_reason | Non-null only for status=rejected; contains the rejection error code string. |
created_at, updated_at | Unix seconds. |
Note: Unlike New Order, this response does not include a
fillsarray. Use Account Trades to retrieve individual fill records for an order.
Error Responses
| HTTP | error | When |
|---|---|---|
400 | invalid id | :id is not a valid UUID. |
404 | ORDER_NOT_FOUND | Order does not exist, or belongs to a different user. |
500 | DB_ERROR | Server fault. |
Full list: Error Codes.
Code Examples
cURL (JWT)
JWT="your_jwt_token"
ORDER_ID="9f2a1c4e-5b67-4d8a-bf93-2e1f4a6c8d10"
curl -s "https://api-sepolia.p99.world/api/v1/spot/orders/${ORDER_ID}" \
-H "Authorization: Bearer ${JWT}"
cURL (HMAC API Key)
API_KEY="your_api_key"
API_SECRET="your_api_secret"
ORDER_ID="9f2a1c4e-5b67-4d8a-bf93-2e1f4a6c8d10"
TIMESTAMP=$(date +%s%3N)
PAYLOAD="timestamp=${TIMESTAMP}"
SIGNATURE=$(echo -n "${PAYLOAD}" | openssl dgst -sha256 -hmac "${API_SECRET}" | awk '{print $2}')
curl -s \
-H "X-MBX-APIKEY: ${API_KEY}" \
"https://api-sepolia.p99.world/api/v1/spot/orders/${ORDER_ID}?timestamp=${TIMESTAMP}&signature=${SIGNATURE}"
Python
import time, hmac, hashlib, requests
API_KEY = "your_api_key"
API_SECRET = "your_api_secret"
BASE_URL = "https://api-sepolia.p99.world/api/v1"
def signed_get(path: str) -> dict:
ts = int(time.time() * 1000)
payload = f"timestamp={ts}"
sig = hmac.new(API_SECRET.encode(), payload.encode(), hashlib.sha256).hexdigest()
r = requests.get(
f"{BASE_URL}{path}?timestamp={ts}&signature={sig}",
headers={"X-MBX-APIKEY": API_KEY},
timeout=5,
)
r.raise_for_status()
return r.json()
order_id = "9f2a1c4e-5b67-4d8a-bf93-2e1f4a6c8d10"
order = signed_get(f"/spot/orders/{order_id}")
print(order["id"], order["status"], order["filled_qty"], "/", order["quantity"])
# Poll until terminal
import time as time_module
while order["status"] not in ("filled", "canceled", "rejected"):
time_module.sleep(1)
order = signed_get(f"/spot/orders/{order_id}")
print(f" status={order['status']} filled={order['filled_qty']}")