mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Fix some type issues
This commit is contained in:
parent
a630799984
commit
dc7e834911
|
@ -947,7 +947,7 @@ class FreqtradeBot(LoggingMixin):
|
|||
|
||||
return enter_limit_requested, stake_amount, leverage
|
||||
|
||||
def _notify_enter(self, trade: Trade, order: Order, order_type: Optional[str] = None,
|
||||
def _notify_enter(self, trade: Trade, order: Order, order_type: str,
|
||||
fill: bool = False, sub_trade: bool = False) -> None:
|
||||
"""
|
||||
Sends rpc notification when a entry order occurred.
|
||||
|
@ -1852,7 +1852,7 @@ class FreqtradeBot(LoggingMixin):
|
|||
self.handle_protections(trade.pair, trade.trade_direction)
|
||||
elif send_msg and not trade.open_order_id and not stoploss_order:
|
||||
# Enter fill
|
||||
self._notify_enter(trade, order, fill=True, sub_trade=sub_trade)
|
||||
self._notify_enter(trade, order, order.order_type, fill=True, sub_trade=sub_trade)
|
||||
|
||||
def handle_protections(self, pair: str, side: LongShort) -> None:
|
||||
# Lock pair for one candle to prevent immediate rebuys
|
||||
|
|
|
@ -52,7 +52,7 @@ class __RPCBuyMsgBase(RPCSendMsgBase):
|
|||
direction: str
|
||||
limit: float
|
||||
open_rate: float
|
||||
order_type: Optional[str] # TODO: why optional??
|
||||
order_type: str
|
||||
stake_amount: float
|
||||
stake_currency: str
|
||||
fiat_currency: Optional[str]
|
||||
|
|
Loading…
Reference in New Issue
Block a user