Skip to content
This repository has been archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
Merge pull request #40 from bybit-exchange/MJ
Browse files Browse the repository at this point in the history
	modified:   pybit/__init__.py
  • Loading branch information
verata-veritatis authored Jun 16, 2021
2 parents 2423554 + fb6d54f commit ef66693
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pybit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,11 @@ def _on_message(self, message):

# Record the initial snapshot.
elif 'snapshot' in msg_json['type']:
self.data[topic] = msg_json['data']
if 'order_book' in msg_json['data']:
self.data[topic] = msg_json['data']['order_book'] if self.trim else msg_json
else:
self.data[topic] = msg_json['data'] if self.trim else msg_json
#self.data[topic] = msg_json['data']

# For incoming 'order' and 'stop_order' data.
elif any(i in topic for i in ['order', 'stop_order']):
Expand Down

0 comments on commit ef66693

Please sign in to comment.