Skip to content

Commit

Permalink
Fix timestamp issues on coinbase ticker feed
Browse files Browse the repository at this point in the history
  • Loading branch information
bmoscon authored and leftys committed Nov 29, 2024
1 parent b679fc9 commit feadc9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cryptofeed/exchanges/coinbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,9 @@ async def _ticker(self, msg: dict, timestamp: float):
'last_size': '0.00241692'
}
'''
await self.callback(TICKER, Ticker(self.id, self.exchange_symbol_to_std_symbol(msg['product_id']), Decimal(msg['best_bid']), Decimal(msg['best_ask']), self.timestamp_normalize(msg['time']), raw=msg), timestamp)

ts = self.timestamp_normalize(msg['time']) if 'time' in msg else None
await self.callback(TICKER, Ticker(self.id, self.exchange_symbol_to_std_symbol(msg['product_id']), Decimal(msg['best_bid']), Decimal(msg['best_ask']), ts, raw=msg), timestamp)

async def _book_update(self, msg: dict, timestamp: float):
'''
Expand Down

0 comments on commit feadc9c

Please sign in to comment.