I’m totally new to API’s and coding and I’m struggling to understand the documentation page. I’m trying to import BTC bar data from the start of 2018 - end of 2022. But when I run my crypto bars request I’m only getting data from 2020-04-08 onward.
Any help would be greatly appreciated. I’m using python in a jupyter notebook. This is what I have:
client = CryptoHistoricalDataClient(alpaca_api_key, alpaca_secret_key) request_params = CryptoBarsRequest( symbol_or_symbols=["BTC/USD"], timeframe=TimeFrame.Day, start="2018-01-01", end="2022-01-01", limit='10000', ) bars = client.get_crypto_bars(request_params) # convert to dataframe bars_df = bars.df # access bars as list - important to note that you must access by symbol key # even for a single symbol request - models are agnostic to number of symbols #bars["BTC/USD"] bars_df