binance-api-node
binance-api-node copied to clipboard
Update index.d.ts
property name typo (notional -> minNotional)
That's for futures, you need to replace it only for spot
This is an extract of what I get when I directly call api/v3/exchangeInfo
As far as I can see, in MIN_NOTIONAL filter, it's called minNotional. Am I wrong or missing anything? ;-)
"symbols": [ { "symbol": "ETHBTC", "status": "TRADING", "baseAsset": "ETH", "baseAssetPrecision": 8, "quoteAsset": "BTC", "quotePrecision": 8, "quoteAssetPrecision": 8, "baseCommissionPrecision": 8, "quoteCommissionPrecision": 8, "orderTypes": [ "LIMIT", "LIMIT_MAKER", "MARKET", "STOP_LOSS_LIMIT", "TAKE_PROFIT_LIMIT" ], "icebergAllowed": true, "ocoAllowed": true, "quoteOrderQtyMarketAllowed": true, "allowTrailingStop": true, "isSpotTradingAllowed": true, "isMarginTradingAllowed": true, "filters": [ { "filterType": "PRICE_FILTER", "minPrice": "0.00000100", "maxPrice": "922327.00000000", "tickSize": "0.00000100" }, { "filterType": "PERCENT_PRICE", "multiplierUp": "5", "multiplierDown": "0.2", "avgPriceMins": 5 }, { "filterType": "LOT_SIZE", "minQty": "0.00010000", "maxQty": "100000.00000000", "stepSize": "0.00010000" }, { "filterType": "MIN_NOTIONAL", "minNotional": "0.00010000", "applyToMarket": true, "avgPriceMins": 5 }, { "filterType": "ICEBERG_PARTS", "limit": 10 }, { "filterType": "MARKET_LOT_SIZE", "minQty": "0.00000000", "maxQty": "1200.26865194", "stepSize": "0.00000000" }, { "filterType": "TRAILING_DELTA", "minTrailingAboveDelta": 10, "maxTrailingAboveDelta": 2000, "minTrailingBelowDelta": 10, "maxTrailingBelowDelta": 2000 }, { "filterType": "MAX_NUM_ORDERS", "maxNumOrders": 200 }, { "filterType": "MAX_NUM_ALGO_ORDERS", "maxNumAlgoOrders": 5 } ], "permissions": [ "SPOT", "MARGIN" ] }, .....
Ohhh I do sorry! Now I catch your point. You are right. In Futures it's called notional...
maybe we can add both names as optionals... what do you think?
I think it will be better to have different types for both spot and futures
Done! Review changes, please ;-)
No was thinking really different types for the exchangeInfos() methods, but im not the maintainer here, he will tell you
I see.. let's wait till maintainer brings light...
Haha well I don't really handle anything typings related, so it' would be mostly your call @yovanoc. @bennycode might be able to give his input but he might be busy
So yeah I think it will be a lot clearer to have different types for futures and spot but you can do something like I did here: https://github.com/Ashlar/binance-api-node/commit/7225098fecb0337a9069cee9551022defa389144
@balthazar we should look into options to generate TypeScript definitions OR progressively migrate this codebase to TypeScript. TypeScript can handle standard JavaScript with ease (using the allowJs compiler flag), so migrating step-by-step would be possible.
Did something change Binance side with this? I've deployed spot code pinned to 0.11.36 that suddenly started failing on around the date you created this PR @macryptotechfin
this is what i get on https://api.binance.com/api/v3/exchangeInfo
PRICE_FILTER LOT_SIZE ICEBERG_PARTS MARKET_LOT_SIZE TRAILING_DELTA PERCENT_PRICE_BY_SIDE NOTIONAL MAX_NUM_ORDERS MAX_NUM_ALGO_ORDERS
Yeah MIN_NOTIONAL filter has been renamed NOTIONAL and has minNotional and iirc maxNotional attributes now.
The MIN_NOTIONAL issue got fixed with this PR: https://github.com/ViewBlock/binance-api-node/pull/609
@balthazar I think this issue here can be closed now?!
The right thing to do is to split these types for futures and spot. Because I had changed this type for futures usage.
@bennycode I think you're right, closing