diff --git a/bot.py b/bot.py index 253b44b..c614308 100644 --- a/bot.py +++ b/bot.py @@ -87,10 +87,8 @@ def on_trade(message: dict, orderman: OrderManager, state: StateManager): state.set_last_price(symbol, price) - print("포지션 괴리율", orderman.positions["VALE"] - orderman.future_positions["VALE"], orderman.positions["VALBZ"] - orderman.future_positions["VALBZ"]) - - - execute_arb(orderman, state) + if orderman.positions["VALE"] - orderman.future_positions["VALE"] == 0 or orderman.positions["VALBZ"] - orderman.future_positions["VALBZ"] == 0: + execute_arb(orderman, state) def execute_arb(orderman: OrderManager, state: StateManager):