BitcoinBitcoinBTC DAPP

Bitcoinaverage

We are starting a new series of guides with awesome ways to use our new API.

Tags:

Hi everyone.

We are starting a new series of guides with awesome ways to use our new API.

The first installment in the series is going to cover building a script for tracking your Bitcoin profits (or losses 😉

We often find ourselves checking the bitcoin price multiple times a day, waiting for the next peak or valley. We all want to make some profit.
Often times this becomes distracting and time consuming, but not anymore.
We will be building a script which automatically checks the price at your favorite exchange and notifies you of the profit you’ve made.

Quick Start Guide/TL;DR:

If you just want to run the script without digging into it you can find the github link at the end with the full code.
So just copy and paste the code into a file and run it via terminal:

$ python bitcoin-profits.py

The script will prompt you to enter some data.

  1. Your exchange – the exchange you want to check at, this is the exchange where you plan to sell the bitcoin eventually, or just your favorite one.
  2. Bitcoin starting price – The price at which you bought your coins.
  3. Bitcoin amount – The amount of bitcoin you bought.
  4. Your currency (default USD) – The fiat currency in which you are buying/selling.
  5. Check every (seconds) – The script performs the calculation in an infinite loop, so this parameter tells it how much to wait between executions.
  6. Choose to be notified when a certain limit is reached 1) Percent limit: 2) Amount limit. Here you specify when you want to be notified of the change in price in Bitcoin.
    If you choose 1 (percent), then you will be asked to enter the amount of percent. Say you enter 10, this means that when the price of Bitcoin changes 10% from your starting price, you will receive a notification.
    The second option allows you to specify the exact amount, here if you enter 10 you will be notified when the Bitcoin price deviates 10 US dollars from the starting price (if you’ve chosen dollars for your currency).

data statistics

Relevant Navigation

No comments

No comments...