mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-17 05:11:15 +00:00
chore: align rpc message fields to use order_rate
This commit is contained in:
@@ -1216,6 +1216,7 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
"leverage": trade.leverage if trade.leverage else None,
|
"leverage": trade.leverage if trade.leverage else None,
|
||||||
"direction": "Short" if trade.is_short else "Long",
|
"direction": "Short" if trade.is_short else "Long",
|
||||||
"limit": open_rate, # Deprecated (?)
|
"limit": open_rate, # Deprecated (?)
|
||||||
|
"order_rate": open_rate,
|
||||||
"open_rate": open_rate,
|
"open_rate": open_rate,
|
||||||
"order_type": order_type or "unknown",
|
"order_type": order_type or "unknown",
|
||||||
"stake_amount": stake_amount,
|
"stake_amount": stake_amount,
|
||||||
@@ -1252,6 +1253,7 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
"leverage": trade.leverage,
|
"leverage": trade.leverage,
|
||||||
"direction": "Short" if trade.is_short else "Long",
|
"direction": "Short" if trade.is_short else "Long",
|
||||||
"limit": trade.open_rate,
|
"limit": trade.open_rate,
|
||||||
|
"order_rate": trade.open_rate,
|
||||||
"order_type": order_type,
|
"order_type": order_type,
|
||||||
"stake_amount": trade.stake_amount,
|
"stake_amount": trade.stake_amount,
|
||||||
"open_rate": trade.open_rate,
|
"open_rate": trade.open_rate,
|
||||||
@@ -2247,6 +2249,7 @@ class FreqtradeBot(LoggingMixin):
|
|||||||
"direction": "Short" if trade.is_short else "Long",
|
"direction": "Short" if trade.is_short else "Long",
|
||||||
"gain": gain,
|
"gain": gain,
|
||||||
"limit": profit_rate or 0,
|
"limit": profit_rate or 0,
|
||||||
|
"order_rate": profit_rate or 0,
|
||||||
"order_type": order_type,
|
"order_type": order_type,
|
||||||
"amount": order.safe_amount_after_fee,
|
"amount": order.safe_amount_after_fee,
|
||||||
"open_rate": trade.open_rate,
|
"open_rate": trade.open_rate,
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ class __RPCEntryExitMsgBase(RPCSendMsgBase):
|
|||||||
quote_currency: str
|
quote_currency: str
|
||||||
leverage: float | None
|
leverage: float | None
|
||||||
direction: str
|
direction: str
|
||||||
limit: float
|
limit: float # Deprecated, use order_rate instead
|
||||||
|
order_rate: float
|
||||||
open_rate: float
|
open_rate: float
|
||||||
order_type: str
|
order_type: str
|
||||||
stake_amount: float
|
stake_amount: float
|
||||||
@@ -87,7 +88,6 @@ class RPCExitMsg(__RPCEntryExitMsgBase):
|
|||||||
exit_reason: str | None
|
exit_reason: str | None
|
||||||
close_date: datetime
|
close_date: datetime
|
||||||
# current_rate: float | None
|
# current_rate: float | None
|
||||||
order_rate: float | None
|
|
||||||
final_profit_ratio: float | None
|
final_profit_ratio: float | None
|
||||||
is_final_exit: bool
|
is_final_exit: bool
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user