modified on_close following the changes in the frontend event
This commit is contained in:
parent
52124ee64f
commit
dc382cd2cd
10
main.py
10
main.py
@ -54,12 +54,12 @@ def entry():
|
||||
# Socker.IO callbacks
|
||||
###################################
|
||||
|
||||
@socketio.on("close")
|
||||
def on_message(message: dict):
|
||||
position_id = message['id']
|
||||
|
||||
print("I would close position {}".format(position_id))
|
||||
@socketio.on("close_position")
|
||||
def on_close_position(message: dict):
|
||||
position_id = message['position_id']
|
||||
symbol= Symbol.from_str(message['symbol'])
|
||||
|
||||
bot.close_position(symbol, position_id)
|
||||
|
||||
@socketio.on('connect')
|
||||
def on_connect():
|
||||
|
Loading…
Reference in New Issue
Block a user