Can't use REST API

Hello fellow Alpacas,

I am 100% new here but looking to stay for a long long time! Thanks for your help.

Have a question, I downloaded the alpaca_trade_api (python) and am cruising through the defined functions. I was able to set up the REST API using my paper account key and password.

However, when I start using the basic api functions, I can’t seem to have them work.

for example:
api.get_last_trade(‘AAPL’)

AttributeError Traceback (most recent call last)

in () ----> 1 api.get_last_trade(‘AAPL’)

AttributeError: ‘REST’ object has no attribute ‘get_last_trade’

I’m not very sure, but maybe double check your alpaca_trade_api is up-to-date?

get_last_trade was added two months ago, if your package is older than that, it will not have that function.

I downloaded alpaca_trade_api_0.1 version yesterday. Was that the reason? I was experienting and able to use functions like all_tickers and list_assets etc. Thanks.