samplealgo01 icon indicating copy to clipboard operation
samplealgo01 copied to clipboard

can't run the script

Open CharlesChow opened this issue 6 years ago • 1 comments

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

CharlesChow avatar Jan 09 '19 18:01 CharlesChow

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

cujo0072 avatar Feb 14 '19 08:02 cujo0072