coinbasepro-python icon indicating copy to clipboard operation
coinbasepro-python copied to clipboard

Implementation of nasks and nbids

Open kkuette opened this issue 7 years ago • 0 comments

With the order book we are able to pull only the last upper bid and lower ask, i was thinking about adding 2 functions

def get_nasks(self, n):
        return [self.get_asks(self._asks.peekitem(i)[0]) for i in range(n+1)]

And

def get_nbids(self, n):
        return [self.get_bids(self._bids.peekitem(-i)[0]) for i in range(1, n+1)]

With these functions we are able to pull as many ask and bid data we want, with ease.

kkuette avatar Sep 29 '18 04:09 kkuette