How to calculate “cummulativeQuoteQty” correctly, in a limit buy order?
I can’t validate the binance formula to calculate the “cumulativeQuoteQty”.
I have already tried to apply the calculation indicated in the link below, but without success:
I ran the request twice with the same parameters below:
symbol=BTCUDT
side=BUY
type=LIMIT
timeInForce=GTC
quantity=0.001039
price=19247.21
The first order below was executed:
{
“symbol”: “BTCUSDT”,
“orderId”: 1234,
“orderListId”: -1,
“clientOrderId”: “hhhhhh”,
“price”: “19247.21000000”,
“origQty”: “0.00103900”,
“executedQty”: “0.00103900”,
“cumulativeQuoteQty”: “19.99719662”,
“status”: “FILLED”,
“timeInForce”: “GTC”,
“type”: “LIMIT”,
“side”: “BUY”,
“stopPrice”: “0.00000000”,
“icebergQty”: “0.00000000”,
“time”: 1234,
“updateTime”: 1234,
“isWorking”: true,
“origQuoteOrderQty”: “0.00000000”
}
The second order below was executed:
{
“symbol”: “BTCUSDT”,
“orderId”: 1234,
“orderListId”: -1,
“clientOrderId”: “hhhhhh”,
“price”: “19247.21000000”,
“origQty”: “0.00103900”,
“executedQty”: “0.00103900”,
“cumulativeQuoteQty”: “19.95828607”,
“status”: “FILLED”,
“timeInForce”: “GTC”,
“type”: “LIMIT”,
“side”: “BUY”,
“stopPrice”: “0.00000000”,
“icebergQty”: “0.00000000”,
“time”: 1234,
“updateTime”: 1234,
“isWorking”: true,
“origQuoteOrderQty”: “0.00000000”
}
Note that both orders were executed at the same quantity and price, but the “cumulativeQuoteQty” was calculated differently.
Please help me understand why?