Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix filters type in index.d.ts #668

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alangustavo
Copy link

I found that the return of the binance API is slightly different from what is expected by the API filters. The return of the query to api is something like:
{ status: 'TRADING', baseAsset: 'SOL', baseAssetPrecision: 8, quoteAsset: 'USDT', quotePrecision: 8, orderTypes: ['LIMIT', 'LIMIT_MAKER', 'MARKET', 'STOP_LOSS', 'STOP_LOSS_LIMIT', 'TAKE_PROFIT', 'TAKE_PROFIT_LIMIT'], icebergAllowed: true, ocoAllowed: true, isSpotTradingAllowed: true, isMarginTradingAllowed: true, filters: [ [Object: null prototype] { filterType: 'PRICE_FILTER', minPrice: '0.01000000', maxPrice: '10000.00000000', tickSize: '0.01000000' }, [Object: null prototype] { filterType: 'LOT_SIZE', minQty: '0.00100000', maxQty: '90000.00000000', stepSize: '0.00100000' }, [Object: null prototype] { filterType: 'ICEBERG_PARTS', limit: 10 }, [Object: null prototype] { filterType: 'MARKET_LOT_SIZE', minQty: '0.00000000', maxQty: '72740.91618828', stepSize: '0.00000000' }, [Object: null prototype] { filterType: 'TRAILING_DELTA', minTrailingAboveDelta: 10, maxTrailingAboveDelta: 2000, minTrailingBelowDelta: 10, maxTrailingBelowDelta: 2000 }, [Object: null prototype] { filterType: 'PERCENT_PRICE_BY_SIDE', bidMultiplierUp: '5', bidMultiplierDown: '0.2', askMultiplierUp: '5', askMultiplierDown: '0.2', avgPriceMins: 5 }, [Object: null prototype] { filterType: 'NOTIONAL', minNotional: '5.00000000', applyMinToMarket: true, maxNotional: '9000000.00000000', applyMaxToMarket: false, avgPriceMins: 5 }, [Object: null prototype] { filterType: 'MAX_NUM_ORDERS', maxNumOrders: 200 }, [Object: null prototype] { filterType: 'MAX_NUM_ALGO_ORDERS', maxNumAlgoOrders: 5 } ], permissions: [] },

But the library filter expects other names, for example MAX_NUM_ALGO_ORDERS and MAX_NUM_ORDERS.

The other modifications are to use the semicolon at the end of objects that VSCode automatically placed.

@balthazar
Copy link
Member

Let's remove the semicolons please so the PR is centered on one thing, rather than formatting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants