From 0d76323a90879cdab4ad0c61c97ffad027869028 Mon Sep 17 00:00:00 2001 From: goodboy Date: Wed, 21 Jan 2026 19:56:59 -0500 Subject: [PATCH] binance: mk `AggTrade.nq` optional.. Oof! my bad. Turns out spot pairs don't provide the `.nq` field looks like.. i guess i should not just test `.perp.` pairs all the time! Bp --- piker/brokers/binance/feed.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/piker/brokers/binance/feed.py b/piker/brokers/binance/feed.py index 79e5cbeb..a3e1f091 100644 --- a/piker/brokers/binance/feed.py +++ b/piker/brokers/binance/feed.py @@ -102,12 +102,12 @@ class AggTrade(Struct, frozen=True): a: int # Aggregate trade ID p: float # Price q: float # Quantity with all the market trades - nq: float # Normal quantity without the trades involving RPI orders f: int # First trade ID l: int # noqa Last trade ID T: int # Trade time m: bool # Is the buyer the market maker? - M: bool | None = None # Ignore + M: bool|None = None # Ignore + nq: float|None = None # Normal quantity without the trades involving RPI orders async def stream_messages(