Invalid Polygon credentials

I used the code from\

I created key_id and secret_key on Alpaca Dashboard.
I don’t have live trading account.

args.key_id = ‘PKKZYL5NHY81YGMFDP53’
args.secret_key = ‘HeuDduUJt8kG2UqFrETG7a7N3T7K1Tp5Rzw2UdKg’
args.base_url = ‘

Error is like below:
ValueError: Invalid Polygon credentials, Failed to authenticate: {‘ev’: ‘status’, ‘status’: ‘auth_failed’, ‘message’: ‘authentication failed’}

Any help is appreciated.

Is there an error trace in your output? Can you post that?

I would suggest try these

  1. Double check your api key and secret
  2. argparse is supposed to be used as command line input. In you terminal/console, you may want to run this
    python --key_id <your_api_key> --secret_key <your_api_secret> --base_url