Beispiel #1
0
    def _get_orderbook_from_api_resp(self, req):
        order_book = self.resp(req)

        timestamp = int(order_book['timestamp'])
        now = Delorean()

        if epoch(timestamp) < now.last_minute(10):
            raise exceptions.ExchangeAPIErrorException(
                self,
                'Orderbook is more than 10 minutes old',
            )

        return order_book