Skip to content
Asaf edited this page Jun 7, 2019 · 1 revision

Bug in ccxt\bit2c.py when the asks/bids ris none. Fix as follows:

def fetch_open_orders(self, symbol=None, since=None, limit=None, params={}):
    self.load_markets()
    if symbol is None:
        raise ArgumentsRequired(self.id + ' fetchOpenOrders() requires a symbol argument')
    market = self.market(symbol)
    response = self.privateGetOrderMyOrders(self.extend({
        'pair': market['id'],
    }, params))
    orders = self.safe_value(response, market['id'], {})
    asks = self.safe_value(orders, 'ask')
    bids = self.safe_value(orders, 'bid')
    if asks is None: asks = []    # <----------- The Fix, part 1
    if bids is None: bids = []    # <----------- The Fix, part 2
    return self.parse_orders(self.array_concat(asks, bids), market, since, limit)
Clone this wiki locally