Open cryptoeax opened 6 years ago
Be aware that ctrl-c would only make a difference if it's running in the terminal - for users using systemd, a service restart would still take effect. So might be better to just check for ctrl-c, kill, HUP, etc. and notify the user that it will exit after the transaction completes.
The way this would be implemented would be by handling SIGINT and a similar SIGKILL handler can be added just as easily...
This can result in a trade that is half recorded in the DB. For example, the
profit_loss
table may not get updated properly, etc. It's better to disable Ctrl+Cing at the times that's not safe to do so.