Popular Posts

Tuesday, February 14, 2023

Bitcoin Price Checker Ver 1.0

Hello Python developer,

Today, I will code Bitcoin price checker with requests module.

Python module is file set of python codes - functions.

I showed module declaration from the Python Glossary


You can use codes in the Python module using 'import' keyword.

import Python module name

We will use 'requests' module for web-scrapping from the 'Binance' cryptocurrency exchange.

Here is the executed result.

'requests.get' code get the current Bitcoin price with USDT symbol from the Binance server.

There are two ways to print out the Bitcoin price.

 - Print content variable from the current_price 

 - Using JSON module with json function to print out the current Bitcoin price 

I also uploaded this code in my GibHub.

I hope you to enjoy above codes.

Have a nice day, Python developer!

No comments:

Post a Comment

Python - Web crawling exercises

Hello Python developer! How are you? Hope you've been good and had wonderful time with Python. There are 10 Python requests module exerc...