File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -2049,9 +2049,17 @@ def process_control_flags(self) -> None:
2049
2049
symbol = line .strip ()
2050
2050
if symbol in self .wallet :
2051
2051
logging .warning (f"control/SELL contains { symbol } " )
2052
- self .coins [symbol ].status = "CONTROL_FLAG"
2053
2052
self .sell_coin (self .coins [symbol ])
2054
2053
unlink ("control/SELL" )
2054
+ if exists ("control/BUY" ):
2055
+ logging .warning ("control/BUY flag found" )
2056
+ with open ("control/BUY" ) as f :
2057
+ for line in f :
2058
+ symbol = line .strip ()
2059
+ if symbol not in self .wallet :
2060
+ logging .warning (f"control/BUY contains { symbol } " )
2061
+ self .buy_coin (self .coins [symbol ])
2062
+ unlink ("control/BUY" )
2055
2063
if exists ("control/STOP" ):
2056
2064
logging .warning ("control/STOP flag found. Stopping bot." )
2057
2065
self .quit = True
You can’t perform that action at this time.
0 commit comments