node-binance-api
node-binance-api copied to clipboard
Is it possible to get current weight without making additional request to /api/v3/exchangeInfo?
I mean getting the weight from any of requests making with node-binance-api.
You're allowed 1200 weight per minute, but I don't see any easy way of automatically handling this
@jaggedsoft maybe to return the weight header as an object from any methods when the request has done?
Not a bad idea. I guess you could keep track of weight in a global variable as well. We'd just have to build out a map of which endpoints use how much weight. The hard part would be things that have dynamic weights like klines or depth endpoints using different weights depending on the limit you set.
How much weight is the getting user balance? I mean this request : https://github.com/jaggedsoft/node-binance-api#getting-list-of-current-balances Do i get banned when i use this every minute?
How much weight is the getting user balance? I mean this request : https://github.com/jaggedsoft/node-binance-api#getting-list-of-current-balances Do i get banned when i use this every minute?
Sorry, Just found out the weight is 5 per request : https://binance-docs.github.io/apidocs/spot/en/#account-information-user_data
Don't mind me
Hello :). I was looking for the same thing and couldnt find any help here so I took a look into the code. You can get the weight with binance.usedWeight()
. It gets updated after each request made to Binance API through the information sent back in the headers.
Hello :). I was looking for the same thing and couldnt find any help here so I took a look into the code. You can get the weight with
binance.usedWeight()
. It gets updated after each request made to Binance API through the information sent back in the headers.
Hi Snuuson,
Thank you for your response. I found out about the binance.usedWeight after exploring more on their examples. https://github.com/jaggedsoft/node-binance-api/blob/master/examples/advanced.md#show-weight-used-from-last-request
There seems to be also very informative other samples as well like the filtering thing. Like the lot size filter thing. Just wanted to say it out for other noobs out there like me.