To Enable the List Deletion
Opened this issue · 0 comments
stephencostiniano commented
@Juless89 Hello you forgot to include [x] in your delete condition when qty is 0
# loop through orderbook side
for x in range(0, len(self.orderbook[side])):
if price == self.orderbook[side][x][0]:
# when qty is 0 remove from orderbook, else
# update values
if qty == 0:
del self.orderbook[side]
break
else:
self.orderbook[side][x] = update
break
I learned how to use websocket thru this tutorial thank you so much