Fix PriceResult slots serialization that broke open-group response.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -213,8 +213,8 @@ class Matcher:
|
||||
detail="opened",
|
||||
data={
|
||||
"group_id": group_id,
|
||||
"perp": pf.__dict__,
|
||||
"option": of.__dict__,
|
||||
"perp": pf.to_dict(),
|
||||
"option": of.to_dict(),
|
||||
"initial_premium": initial_premium,
|
||||
"fees": pf.fee + of.fee,
|
||||
},
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import asdict, dataclass
|
||||
|
||||
|
||||
@dataclass(slots=True)
|
||||
@@ -13,6 +13,9 @@ class PriceResult:
|
||||
slip: float
|
||||
notional: float
|
||||
|
||||
def to_dict(self) -> dict[str, float]:
|
||||
return asdict(self)
|
||||
|
||||
|
||||
def perp_fill(
|
||||
*,
|
||||
|
||||
Reference in New Issue
Block a user