Skip to content

Commit

Permalink
fix channel callbacks to show seq ids for channels that need them
Browse files Browse the repository at this point in the history
  • Loading branch information
s4w3d0ff committed Jul 14, 2019
1 parent 1992241 commit e2887de
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion poloniex/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -745,8 +745,15 @@ def on_message(self, data):
return False
if 'callback' in self.channels[chan]:
# activate chan callback
if not chan in ['account', 'heartbeat']:
if chan == 'heartbeat':
# show whole heartbeat
self.socket._callback(self.channels[chan]['callback'], message)
elif chan in ['ticker', '24hvolume']:
# ticker and 24hvolume dont need seq id
message = message[2]
else:
# show seq id for everything else
message = message[1]
self.socket._callback(self.channels[chan]['callback'], message)

def on_error(self, error):
Expand Down

0 comments on commit e2887de

Please sign in to comment.