Bitcoin Alert System Code problem

I couldn’t run the code shown successfully. I am unable to figure out what went wrong.

P.S.: Does anybody have a clue how to copy paste a code in vmware?

@kanakkharbanda
you have to provide the variable where you have to store the values for your desired output
querystring = {“fysm”:“BTC”, “tsyms”:“USD”}
still not clear then go through the link provided
https://www.hackster.io/rahulkumarsingh/crypto-alert-system-using-bolt-iot-d62df1

Thank you for the help but I’m still facing a few troubles. Could you help me resolve it?

@kanakkharbanda
you have entered the wrong URL. Your URL should be look like this as per your requirement.
https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=INR
If this solves your problem do let me know.


The problem still exists.

@kanakkharbanda
error is the arrow marked instead of fsym you have mention fsyms which gives you the error

your get_bitcoin_price() can be written in 2 ways:
No.1
def get_bitcoin_price():
URL = “https://min-api.cryptocompare.com/data/price
querystring = {“fsym”:“BTC”, “tsyms”:“INR”}
response = requests.request(“GET”,URL, params=querystring)
response = json.loads(response.text)
current_price = response[‘INR’]
return current_price

No.2
def price_check():
URL = “https://min-api.cryptocompare.com/data/price?fsym=BTC&tsyms=USD
querystring = {“fysm”:“BTC”, “tsyms”:“USD”}
response = requests.request(“GET”,URL, params=querystring)
response = json.loads(response.text)
current_price = response[“USD”]
return current_price

Hope this will help you. Do let me know.

1 Like

Thank you so much that worked but now the only prob is it is unable to send the message on telegram.There was that typing error . thank you for resolving it.

@kanakkharbanda
check the bot_id and chat_id once again for typo-error because lot of this type of error are coming due to the configuration in providing bot_id and chat_id.
This this error persist then share me the whole code.

Hey guys! it great that it is possible to get help on this forum. Maybe you know if there are some crypto-related threads here. Where do you usually trade crypto? Have you ever tried to convert usd to btc on switchere.cоm/exchange/usd-to-btc? I have searched the web and many users approve switchere.com/exchange/usd-to-btc. Maybe someone here used this service?

Yesterday I looked through the latest news related to the bitcoin rate on the network and this is what I found on the Cryptocurrency Blog. As I understand it, pools will continue to pay miners for processing blocks (not new issuers, but transaction blocks)? And I think this will happen before the emission of bitcoins stops altogether. Some pools are already doing this, but so far these are quite ridiculous amounts.