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

GetOrderBook 100 orders limit #89

Open
l0rdak opened this issue May 6, 2018 · 11 comments
Open

GetOrderBook 100 orders limit #89

l0rdak opened this issue May 6, 2018 · 11 comments

Comments

@l0rdak
Copy link

l0rdak commented May 6, 2018

Issue Overview

GetOrderBook has limit to return only 100 orders, raising ArgumentException on exceed. While Binance API /api/v1/depth is capable of returning 1000 orders. Web Socket connection returns updates for 1000 orders depth, but we need to initialize cache with GetOrderBook.

Package Version: 4.4.0

@glitch100
Copy link
Owner

Would you like limit removed? Previously the API only supported 100 orders

@l0rdak
Copy link
Author

l0rdak commented Jun 22, 2018

I propose to increase limit to 1000. Link to API docs. Many thanks!

@Bladerender
Copy link

Keep in ming that weight of such a request will be not 1, so if you use some weight limit calculation not to be banned on Binance, you should change that as well.

@menkaur
Copy link

menkaur commented Jul 29, 2018

@Bladerender what is the weight of request to fetch orderbook with limit 1000?

@Bladerender
Copy link

  1. So it's like asking 10 times 100. Taking into account that Binance allows only 10 requests per second, it means that by asking 1000 order book you used everything for current second. Way to costly.

@menkaur
Copy link

menkaur commented Aug 3, 2018 via email

@l0rdak
Copy link
Author

l0rdak commented Aug 4, 2018

1000 orderbook is needed while socket connection initialization and using Diff. Depth Stream. You can call it only one time at the beginning. Three month passed still no progress in this question :-) So I need every time recompile custom library version, where one 0 is added.

@fl4p-old
Copy link

@l0rdak why don't you create a pull request?

You can easily work around this bug:

...
   Api = new APIProcessor(apiKey, apiScret, new APICacheManager());
...
        public static async Task<OrderBookResponse> FetchOrderBook(string symbol)
        {
            return await Api.ProcessGetRequest<OrderBookResponse>(Endpoints.MarketData.OrderBook(symbol, 1000, false));
        }

@l0rdak
Copy link
Author

l0rdak commented Sep 4, 2018

@fl4p thanks for the solution

@glitch100
Copy link
Owner

Is this still needed? 👎 👍

@l0rdak
Copy link
Author

l0rdak commented Mar 19, 2019

Yes :)

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

No branches or pull requests

5 participants