Fetch Historical Trades data

Hi Champs,

I am looking for Python API for getting the historical trade and quote price for a symbol.

I tried below code and its failing.

import alpaca_trade_api as tradeapi
api = tradeapi.REST(key, secret_key, api_version=‘v2’)
api.get(‘AAPL’) ← Failing
api.get.stocks ← AttributeError: ‘function’ object has no attribute ‘stocks’

Basically I am planning to use from:

Fetching Historical Quote data

GET /v2/stocks/{symbol}/quotes

BTW, below did not give me useful info:
help(‘alpaca_trade_api.REST.get’)
Help on function get in alpaca_trade_api.REST:
alpaca_trade_api.REST.get = get(self, path, data=None)

Not sure what is wrong in my python command.

Your timely input will be greatly appreciated.

Thanks and Regards,