Skip to content

Commit

Permalink
timestamps for bitmex trades
Browse files Browse the repository at this point in the history
  • Loading branch information
bmoscon committed Aug 20, 2018
1 parent 51ce490 commit c35971a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cryptofeed/bitmex/bitmex.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,8 @@ async def _trade(self, msg):
side=BID if data['side'] == 'Buy' else ASK,
amount=data['size'],
price=data['price'],
id=data['trdMatchID'])
id=data['trdMatchID'],
timestamp=data['timestamp'])

async def _book(self, msg):
pair = None
Expand Down
4 changes: 1 addition & 3 deletions examples/demo_redis.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,8 @@ def main():
f.add_feed(GDAX(channels=[TRADES], pairs=['BTC-USD'], callbacks={TRADES: TradeRedis()}))
f.add_feed(Gemini(pairs=['BTC-USD'], callbacks={TRADES: TradeRedis()}))



f.run()


if __name__ == '__main__':
main()
main()

0 comments on commit c35971a

Please sign in to comment.