From 2ea850eed0bcf0c37767a864cefbdfcb9c5601eb Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Fri, 3 Mar 2023 00:23:09 -0500 Subject: [PATCH] `deribit`: add new `Trade.block_trade_id` field.. --- piker/brokers/deribit/api.py | 5 +++-- piker/brokers/deribit/feed.py | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/piker/brokers/deribit/api.py b/piker/brokers/deribit/api.py index 1fd34554..f93a20e5 100644 --- a/piker/brokers/deribit/api.py +++ b/piker/brokers/deribit/api.py @@ -128,8 +128,9 @@ class Trade(Struct): index_price: float direction: str amount: float - combo_trade_id: Optional[int] = 0, - combo_id: Optional[str] = '', + combo_trade_id: Optional[int] = 0 + combo_id: Optional[str] = '' + block_trade_id: str | None = '' class LastTradesResult(Struct): diff --git a/piker/brokers/deribit/feed.py b/piker/brokers/deribit/feed.py index 865d0e6f..7161aab5 100644 --- a/piker/brokers/deribit/feed.py +++ b/piker/brokers/deribit/feed.py @@ -46,9 +46,12 @@ from cryptofeed.defines import ( from cryptofeed.symbols import Symbol from .api import ( - Client, Trade, + Client, + Trade, get_config, - str_to_cb_sym, piker_sym_to_cb_sym, cb_sym_to_deribit_inst, + str_to_cb_sym, + piker_sym_to_cb_sym, + cb_sym_to_deribit_inst, maybe_open_price_feed )