Skip to content

Commit

Permalink
Fix Binance Futures QuoteTick parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
cjdsellers committed Jan 17, 2024
1 parent 81fba28 commit 2f08599
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ None
### Fixes
- Fixed memory leak for catalog queries (#1430), thanks @twitu
- Fixed `LoggingConfig` parsing of `WARNING` log level (was not being recognized), thanks for reporting @davidsblom
- Fixed Binance Futures `QuoteTick` parsing to capture event time for `ts_event`, thanks for reporting @x-zho14

---

Expand Down
3 changes: 2 additions & 1 deletion nautilus_trader/adapters/binance/common/schemas/market.py
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,7 @@ class BinanceQuoteData(msgspec.Struct, frozen=True):
B: str # best bid qty
a: str # best ask price
A: str # best ask qty
T: int | None # event time

def parse_to_quote_tick(
self,
Expand All @@ -484,7 +485,7 @@ def parse_to_quote_tick(
ask_price=Price.from_str(self.a),
bid_size=Quantity.from_str(self.B),
ask_size=Quantity.from_str(self.A),
ts_event=ts_init,
ts_event=millis_to_nanos(self.T) if self.T else ts_init,
ts_init=ts_init,
)

Expand Down

0 comments on commit 2f08599

Please sign in to comment.