I am freshman at Alpaca. I’ve got my API key and security code. I am trying to pull out historical market data from alpaca. Here is the code:
import alpaca_trade_api as tradeapi
import pandas as pd
api = tradeapi.REST(‘PKWEMPVQJAIQ72S9J3T8’, ‘rJxmKxVtRKEjh6ru1AUCEV8ibjv3yap34UgKghua’, base_url=‘https://paper-api.alpaca.markets’)
aapl = api.get_barset(‘AAPL’, ‘1min’)
the problem is I am getting an error in console - APIError: 1min is not a supported timeframe.