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
binance_nq_hotfix
Gud Boi 2026-01-21 19:56:59 -05:00
parent bd812bd2dd
commit b7cdbd89d4
1 changed files with 2 additions and 2 deletions

View File

@ -102,12 +102,12 @@ class AggTrade(Struct, frozen=True):
a: int # Aggregate trade ID a: int # Aggregate trade ID
p: float # Price p: float # Price
q: float # Quantity with all the market trades q: float # Quantity with all the market trades
nq: float # Normal quantity without the trades involving RPI orders
f: int # First trade ID f: int # First trade ID
l: int # noqa Last trade ID l: int # noqa Last trade ID
T: int # Trade time T: int # Trade time
m: bool # Is the buyer the market maker? 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( async def stream_messages(