Keval Vora
Published © GPL3+

Bitcoin sell alert with monitoring

This is linux cloud script that monitors a cryptocurrency(here bitcoin) and recommends sell/buy when market price is more than sell price.

BeginnerProtip3 hours653
Bitcoin sell alert with monitoring

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
Buzzer
Buzzer
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud
Bolt IoT Android App
Bolt IoT Android App
digital ocean

Story

Read more

Schematics

Schematic

hardware circuit diagram

Code

crypto_alert.py

Python
run this file to get prediction of when to sell
import json
import requests
import time
from boltiot import Bolt



SELLING_PRICE  =  17082.93

API_KEY = "your_api_key"
DEVICE_ID  = "your_device_id"
bolt = Bolt(API_KEY, DEVICE_ID)


def price_check():
    url = "https://min-api.cryptocompare.com/data/price"

    querystring = {"fsym":"BTC","tsyms":"USD"}

    response = requests.request("GET", url, params=querystring)
    response = json.loads(response.text)
    current_price = response['USD']
    return current_price

while True:
    market_price = price_check()
    print "Market price is", market_price
    print "Selling price is", SELLING_PRICE
    time.sleep(4)
    if market_price > SELLING_PRICE:
        bolt.digitalWrite("0", "HIGH")
    else:
        bolt.digitalWrite("0", "LOW")
    time.sleep(10)

Credits

Keval Vora
1 project • 0 followers
Contact

Comments

Please log in or sign up to comment.