Skip to content

Commit

Permalink
update orderbook
Browse files Browse the repository at this point in the history
  • Loading branch information
leftys committed Nov 13, 2024
1 parent bdc94e2 commit 59c8572
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cryptofeed/backends/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async def __call__(self, book: OrderBook, receipt_timestamp: float):
side: SortedDict
for side_name, side in (('bid', book.book.bids), ('ask', book.book.asks)):
depth: int = -1
for price, size in side.to_list():
for price, size in side.to_list(20):
depth += 1
data[f'{side_name}_{depth}_price'] = float(price)
data[f'{side_name}_{depth}_size'] = float(size)
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ def run_tests(self):
"aiofile>=2.0.0",
"yapic.json>=1.6.3",
'uvloop ; platform_system!="Windows"',
"order_book>=0.6.1",
# "order_book>=0.6.1",
"order-book @ git+https://github.com/leftys/orderbook.git@c30b03952c6d76b9b3f960f69d5053bf1a8fed74#egg=order-book==0.6.1",
"aiodns>=1.1",
"aiomonitor>=0.4.5",
"aioconsole>=0.5.1",
Expand Down

0 comments on commit 59c8572

Please sign in to comment.