Order Modification History
Description
Get history of order modifications.
caution
This endpoint is currently available on Testnet only and returns 404 on the production API.
HTTP Request
GET /fapi/v1/orderAmendment (HMAC SHA256)
Weight
1
Request Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| symbol | STRING | YES | Trading pair |
| orderId | LONG | NO | System order ID |
| origClientOrderId | STRING | NO | User-defined order ID |
| startTime | LONG | NO | Start time |
| endTime | LONG | NO | End time |
| limit | INT | NO | Default 500; Max 1000 |
| timestamp | LONG | YES | Timestamp |
Response Example
[
{
"amendmentId": 12345,
"symbol": "BTCUSDT",
"orderId": 2254222045,
"clientOrderId": "testOrderModify1",
"time": 1623910239123,
"amendatoryProps": [
{
"prop": "price",
"original": "60000",
"new": "60500"
}
]
}
]
Returns data for the most recent 3 months only.
Either orderId or origClientOrderId must be sent.
Code Examples
cURL
API_KEY="your_api_key"
API_SECRET="your_api_secret"
TIMESTAMP=$(date +%s%3N)
QUERY_STRING="symbol=BTCUSDT&orderId=2254222045×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-sepolia.ztdx.io/fapi/v1/orderAmendment?${QUERY_STRING}&signature=${SIGNATURE}"
Python
import time, hmac, hashlib, requests
API_KEY = "your_api_key"
API_SECRET = "your_api_secret"
BASE_URL = "https://api.ztdx.io"
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})
# Query order modification history for a specific order
resp = signed_get("/fapi/v1/orderAmendment", params={
"symbol": "BTCUSDT",
"orderId": "2254222045"
})
print(resp.json())