from polygon import RESTClient

client = RESTClient("RMq8MchVsVxXpKGlK8QVy5cRer5NWHHd") # api_key is used

aggs = client.get_aggs("AAPL", 1, "day", "2022-04-04", "2022-04-04")
print(aggs)
[Agg(open=174.57, high=178.49, low=174.44, close=178.44, volume=76545983.0, vwap=177.4855, timestamp=1649044800000, transactions=630374, otc=None)]