-
Notifications
You must be signed in to change notification settings - Fork 146
How to fetch a FULL order status #77
Comments
Right now it only supports |
Thanks for the report! |
The orderStatus function now supports newOrderRespType orderStatus: function(symbol, orderid, callback, flags = {}) {
let parameters = Object.assign({symbol:symbol, orderId:orderid}, flags);
signedRequest(base+'v3/order', parameters, function(error, data) {
if ( callback ) return callback.call(this, error, data, symbol);
});
}, I'll update when the release is live |
binance.orderStatus(_SYMBOL_, orderID, function(err, orderStatus, symbol) {
if(err)
logger.info(`ERROR: ${err.message}`);
else{
logger.info(symbol + " order status:" + JSON.stringify(orderStatus));
}
}, {newOrderRespType: 'FULL'}); |
Available now in |
Above code didn't work even now. I get following error: |
newOrderRespType, as its name implies, must unfortunately only be available in new orders |
@jaggedsoft I didn't quite get it. The documentation mentions it in newOrder creation API and not in orderStatus. But you have added this in orderStatus(as mentioned by you in above code snippet) and order status can only be checked for an order which was already placed. And once the order is completed then only there can be any use of FULL to check the details of the fills. There seems to be ambiguity in the documentation and actual implementation? |
@jaggedsoft any update on this? |
I'm afraid not, it appears the deficiency is on the binance side It's also possible that one of these may provide what you want. But I'm not sure the difference between them yet Recent Trades (historicalTrades, recentTrades, aggTrades functions)binance.aggTrades("BNBBTC", {limit:500}, (error, response)=>{
console.log("aggTrades", response);
}); binance.recentTrades("BNBBTC", (error, response)=>{
console.log("recentTrades", response);
}); binance.historicalTrades("BNBBTC", (error, response)=>{
console.log("historicalTrades", response);
}); |
Hello,
I have been trying to fetch an orders status to look for the price and qty details from the fills. This as explained in the API docs can be fetch by using newOrderRespType ENUM.
newOrderRespType | ENUM | NO | Set the response JSON. ACK, RESULT, or FULL; default: RESULT.
But i get ReferenceError: newOrderRespType is not defined.
Can someone tell how to fetch FULL orderStatus as explained in the API doc @ https://github.com/binance-exchange/binance-official-api-docs/blob/master/rest-api.md
The text was updated successfully, but these errors were encountered: