add order-tag to serialize / unserialize methods

This commit is contained in:
Matthias
2024-01-28 19:12:53 +01:00
parent d82bfc9fad
commit ccd4c715ca
2 changed files with 3 additions and 0 deletions

View File

@@ -242,6 +242,7 @@ class Order(ModelBase):
'remaining': self.remaining,
'ft_fee_base': self.ft_fee_base,
'funding_fee': self.funding_fee,
'ft_order_tag': self.ft_order_tag,
})
return resp
@@ -1407,6 +1408,7 @@ class LocalTrade:
ft_price=order["price"],
remaining=order["remaining"],
funding_fee=order.get("funding_fee", None),
ft_order_tag=order.get("ft_order_tag", None),
)
trade.orders.append(order_obj)

View File

@@ -261,6 +261,7 @@ class OrderSchema(BaseModel):
order_timestamp: Optional[int] = None
order_filled_timestamp: Optional[int] = None
ft_fee_base: Optional[float] = None
ft_order_tag: Optional[str] = None
class TradeSchema(BaseModel):