Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't run the script #10

Open
CharlesChow opened this issue Jan 9, 2019 · 1 comment
Open

can't run the script #10

CharlesChow opened this issue Jan 9, 2019 · 1 comment

Comments

@CharlesChow
Copy link

Hi Alpaca team
I love to use the platform and try the tutorial and want to use paper trading api I already follow the tutorials replace the key id and secret key but the result still popup value error can someone teach me how to fix it?
Thank you

line 2, in <module>
    from . import algo_polygon as algo
  File "C:\Users\samplealgo01\samplealgo\algo_polygon.py", line 13, in <module>
    api = tradeapi.REST()
  File "C:\Users\.virtualenvs\samplealgo01--SgOClMC\lib\site-packages\alpaca_trade_api\rest.py", line 57, in __init__
    self._key_id, self._secret_key = get_credentials(key_id, secret_key)
  File "C:\Users\.virtualenvs\samplealgo01--SgOClMC\lib\site-packages\alpaca_trade_api\common.py", line 17, in get_credentials
    raise ValueError('Key ID must be given to access Alpaca trade API')
ValueError: Key ID must be given to access Alpaca trade API
@cujo0072
Copy link

You need to generate your personal key-based authentication. Here are the docs:
https://docs.alpaca.markets/api-documentation/web-api/#authentication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants