Implement Streaming API client for python 3#14
Conversation
Codecov Report
@@ Coverage Diff @@
## master #14 +/- ##
===========================================
- Coverage 59.44% 30.85% -28.59%
===========================================
Files 4 6 +2
Lines 143 269 +126
===========================================
- Hits 85 83 -2
- Misses 58 186 +128
Continue to review full report at Codecov.
|
|
There might be a critical bug in the streamingapi of this merge. Please check out the pull request before merging: adamhicks#2 |
As recommended by reviewer comment
Streamingapi
YinYin-blip
left a comment
There was a problem hiding this comment.
Unresolved comments.
| self._bids = {b.order_id: b for b in bids} | ||
| self._asks = {a.order_id: a for a in asks} | ||
| self._sequence = first['sequence'] | ||
| self._trades = [] |
There was a problem hiding this comment.
Is this variable used anywhere?
|
|
||
| def _process_delete(self, delete_update: dict): | ||
| order_id = delete_update['order_id'] | ||
| self._asks.pop(order_id, None) |
There was a problem hiding this comment.
Why not self._asks.pop(order_id) ? Raising a KeyError if order_id is not found might be preferred.
| def _process_delete(self, delete_update: dict): | ||
| order_id = delete_update['order_id'] | ||
| self._asks.pop(order_id, None) | ||
| self._bids.pop(order_id, None) |
|



No description provided.