A better solution instead of using Yahoo Finance API would be to use Python library yfinance. You can install it using "pip install yfinance" command from terminal.
After installing it use this code to downlaod bitcoin historical data as pandas.DataFrame.


import yfinance as yf

Stock = "BTC-USD"
StartDate = "2020-01-01"
EndDate = "2021-01-01"
#Stock data period will not contain day specified in EndDate

StockData = yf.download(Stock, StartDate, EndDate)


The StockData object is of tpye pandas.DataFrame and contains daily stock data with colums: Date, Open, High, Low, Close, AdjClose, Volume, from 2020-01-01 to 2020-12-31.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence