Open pdoria opened 2 years ago
by the way, you can modify this npm library without changing it,
for example, I needed api to disable "spotBNBBurn" , which this library dont have, but api have it, so I used javascript ability to modify any function:
let binance = new Binance().options({});
binance.disable_bnb_fee = (req_type) => {
let parameters = Object.assign( {"spotBNBBurn":false} );
return new Promise((resolve, reject) => {
callback = (error, response) => {
if (error) {
reject(error);
} else {
resolve(response);
}
}
binance.signedRequest('https://api.binance.com/sapi/v1/bnbBurn', parameters, callback, req_type);
});
}
and then you can run it:
let ret;
try {
ret = await binance.disable_bnb_fee('GET');
}catch(err){
console.log("err", err);
}
if(ret.spotBNBBurn != false){
try {
ret = await binance.disable_bnb_fee('POST');
}catch(err){
console.log("err", err);
}
console.log("Setting BNB fee to disabled");
}
Made a small change to exchangeInfo() so it supports returning info on a single symbol:
`/**