The triggering of sell bitcoin

  1. Initially, we should set the sell threshold as lower than the current price. So, for example, let's set the threshold for 6400 and execute the script again. The following code shows that the sell_thresh is set to 6400:
# define buy and sell thresholds for bitcoinbuy_thresh = 6400sell_thresh = 6400

Now, the sell alert should execute. Verify it in the email again.

  1. After verifying this, we should see that we have received the email alert advising us to sell bitcoin because the current asking price is higher than what we are willing to sell for:

  1. The script is ready. You can now set it to run automatically on ...

Get Hands-On Bitcoin Programming with Python now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.