Please provide the (optional) parameter “withTrades” at least to the following endpoints:
Query order (USER_DATA)
GET /api/v3/order
All orders (USER_DATA)
GET /api/v3/allOrders
And maybe to the following endpoints:
Current open orders
GET /api/v3/openOrdersQuery OCO (USER_DATA)
GET /api/v3/orderListQuery all OCO (USER_DATA)
GET /api/v3/allOrderListQuery Open OCO (USER_DATA)
GET /api/v3/openOrderList
If “withTrades” is set to “TRUE” (or 1), then the array of trades will be sent along the order information. For example:
// request
GET /api/v3/order?symbol="BNBBTC"&orderId=100234&withTrades="TRUE"
// response:
{
“symbol”: “BNBBTC”,
“orderId”: 100234,
“orderListId”: -1 //Unless part of an OCO, the value will always be -1.
“clientOrderId”: “myOrder1”,
“price”: “4.00000100”,
“origQty”: “12.00000000”,
“executedQty”: “4.00000000”,
“cummulativeQuoteQty”: “0.0”,
“status”: “NEW”,
“timeInForce”: “GTC”,
“type”: “LIMIT”,
“side”: “BUY”,
“stopPrice”: “0.0”,
“icebergQty”: “0.0”,
“time”: 1499827319559,
“updateTime”: 1499827319559,
“isWorking”: true,
“origQuoteOrderQty”: “0.000000”
“trades”: [
{
“symbol”: “BNBBTC”,
“id”: 28457,
“orderId”: 100234,
“orderListId”: -1,
“price”: “4.00000100”,
“qty”: “12.00000000”,
“quoteQty”: “48.000012”,
“commission”: “10.10000000”,
“commissionAsset”: “BNB”,
“time”: 1499865549590,
“isBuyer”: true,
“isMaker”: false,
“isBestMatch”: true
}
]
}
Benefits:
- far more user friendly (because no more hassle to merge orders and their belonging trades together)
- only one request instead of multiple requests (because the user does not need to do the bunch of requests to get those trades from the previous requested orders)
- it’s so common that trades lists are sent with their belonging order