Object is not subscriptable

I am just getting started with Alpaca in python but I am running into a problem of not being able to select certain data points. I get an error of ‘TypeError: ‘Trade’ object is not subscriptable’. Which I know means that it is not a list, directory or any subscriptable version. Just wondering if there is a way to get a subscriptable version on a GET call? Thank you.

Here is my code:
import alpaca_trade_api as tradeapi

api = tradeapi.REST(

def get_quote(ticker):
    quote = api.get_last_trade(ticker)


Try quote.prce instead of quote['price']. If you need a raw json access, you can do quote._raw['price']