Git Product home page Git Product logo

Comments (10)

adityamertia avatar adityamertia commented on June 24, 2024 1

Above code didn't work even now. I get following error:
ERROR: "{\"code\":-1104,\"msg\":\"Not all sent parameters were read; read '5' parameter(s) but was sent '6'.\"}"

from node-binance-api.

adityamertia avatar adityamertia commented on June 24, 2024 1

@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?
My requirement is to fetch the details of order fills, as i ultimately need the 'price' at which the order gets executed. using orderStatus i can get it by taking weighted avg of price and qty. Is there any other way of fetching the 'price'?

from node-binance-api.

jaggedsoft avatar jaggedsoft commented on June 24, 2024

Right now it only supports symbol, orderid
I'll add the rest of the flags tonight

from node-binance-api.

jaggedsoft avatar jaggedsoft commented on June 24, 2024

Thanks for the report!

from node-binance-api.

jaggedsoft avatar jaggedsoft commented on June 24, 2024

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

from node-binance-api.

jaggedsoft avatar jaggedsoft commented on June 24, 2024
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'});

from node-binance-api.

jaggedsoft avatar jaggedsoft commented on June 24, 2024

Available now in v0.4.11

from node-binance-api.

jaggedsoft avatar jaggedsoft commented on June 24, 2024

newOrderRespType, as its name implies, must unfortunately only be available in new orders

from node-binance-api.

adityamertia avatar adityamertia commented on June 24, 2024

@jaggedsoft any update on this?

from node-binance-api.

jaggedsoft avatar jaggedsoft commented on June 24, 2024

I'm afraid not, it appears the deficiency is on the binance side
But I can suggest they provide what you're after

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);
});

from node-binance-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.