Roshani Nidhore
Published © LGPL

Bitcoin altert system using Bolt IOT

This is a system that can altert us about bitcoin pricing.

BeginnerFull instructions provided1 hour406
Bitcoin altert system using Bolt IOT

Things used in this project

Hardware components

Bolt WiFi Module
Bolt IoT Bolt WiFi Module
×1
USB-A to Micro-USB Cable
USB-A to Micro-USB Cable
×1
Male/Female Jumper Wires
Male/Female Jumper Wires
×1
Buzzer
Buzzer
×1

Software apps and online services

Bolt Cloud
Bolt IoT Bolt Cloud
boltiot python library
spyder with python 3.7

Story

Read more

Schematics

Hardware set up

hardware connections

Code

complete code of the project.

Python
import json
import requests
import time
from boltiot import Bolt



SELLING_PRICE  =  1708.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")
        time.sleep(60)
        bolt.digitalWrite("0", "LOW")

Credits

Roshani Nidhore

Roshani Nidhore

1 project • 2 followers

Comments