tudorelu / pyjuque

⚡ Open Source Algorithmic Trading Bot for Python.
MIT License
456 stars 90 forks source link

NULL value in match_order_id #30

Open hlford opened 2 years ago

hlford commented 2 years ago

I noticed the bot forgot to update match_order_id in the order table. I'm trying to figure out how to add some maintenance function in the bot to let it populate the match_order_id from current_order_id from pair table when it detects the match_order_id is blank...

Once in a while, the stop loss is putting a the buy match_order_id in sell match_order_id during cancel sell but the bot didn't notice it forgot to submit the order, which caused the match_order_id different from the order.id.

I was able to copy and paste the id into match_order_id manually to get the bot to stop screaming about orders not found. There's a lot of manual update on the database by hand because I can't seem to find the codes to fix the bott so it won't have mismatch id or NULL id.