JKorf / Bittrex.Net

A C# .Net wrapper for the Bittrex web API including all features easily accessible and usable
MIT License
141 stars 62 forks source link

Request for order the book depth in get_orderbook endpoint #32

Closed daerhiel closed 6 years ago

daerhiel commented 6 years ago

Hi, I know that the get_orderbook v1.1 endpoint supports 3rd 'depth' parameter, which allows to limit orderbook entries:

This can be seen in Python Bittrex wrapper. Is it possible to add this parameter to the respective methods?

` def get_orderbook(self, market, depth_type, depth=20): """ Used to get retrieve the orderbook for a given market

    :param market: String literal for the market (ex: BTC-LTC)
    :type market: str

    :param depth_type: buy, sell or both to identify the type of orderbook to return.
        Use constants BUY_ORDERBOOK, SELL_ORDERBOOK, BOTH_ORDERBOOK
    :type depth_type: str

    :param depth: how deep of an order book to retrieve. Max is 100, default is 20
    :type depth: int

    :return: Orderbook of market in JSON
    :rtype : dict
    """
    return self.api_query('getorderbook', {'market': market, 'type': depth_type, 'depth': depth})

`

JKorf commented 6 years ago

Hi,

I tried this out, but the parameter does not seem to do anything. It also isn't described by the API specification. You can try it, there is no difference in: https://bittrex.com/api/v1.1/public/getorderbook?market=BTC-LTC&type=both&depth=10 and https://bittrex.com/api/v1.1/public/getorderbook?market=BTC-LTC&type=both&depth=100