founction-btc-today
v1.0.2
Published
A simple express application to fetch the current price of Bitcoin in USD.
Downloads
7
Maintainers
Readme
获取BTC价格的函数
以下是我们用来获取BTC价格的函数:
def get_btc_price():
response = request.get("https://api.coindesk.com/v1/bpi/currentprice/BTC.json")
return response.json()["bpi"]["USD"]["rate"]