Compare commits

...

3 Commits

Author SHA1 Message Date
Gud Boi d146060d5c Merge pull request 'binance: mk `AggTrade.nq` optional..'
Reviewed-on: #67
Reviewed-by: momo <dilarayalniz1@gmail.com>
2026-01-22 03:20:27 +00:00
Gud Boi fff9de9aec binance: add API changelog link 2026-01-21 22:19:13 -05:00
Gud Boi b7cdbd89d4 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
2026-01-21 19:59:07 -05:00
1 changed files with 3 additions and 2 deletions

View File

@ -102,12 +102,13 @@ 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
nq: float|None = None # Normal quantity without the trades involving RPI orders
# ^XXX https://developers.binance.com/docs/derivatives/change-log#2025-12-29
async def stream_messages(