feat: add stake_amount_filled order attribute

This commit is contained in:
Matthias 2024-11-05 07:19:09 +01:00
parent 5cb4a65cbd
commit 3d307fe8ff

View File

@ -176,6 +176,11 @@ class Order(ModelBase):
"""Amount in stake currency used for this order"""
return self.safe_amount * self.safe_price / self.trade.leverage
@property
def stake_amount_filled(self) -> float:
"""Filled Amount in stake currency used for this order"""
return self.safe_filled * self.safe_price / self.trade.leverage
def __repr__(self):
return (
f"Order(id={self.id}, trade={self.ft_trade_id}, order_id={self.order_id}, "