alpacahq / alpaca-backtrader-api

Alpaca Trading API integrated with backtrader
https://pypi.org/project/alpaca-backtrader-api/
Apache License 2.0
615 stars 143 forks source link

Authorization Error #7

Closed phal0r closed 5 years ago

phal0r commented 5 years ago

Hey everyone,

thanks for this nice tool. I would like to use alpaca paper trading data, but I always get the following error:

nats.aio.errors.NatsError: nats: 'Authorization Violation'

I am just running a basic example with (triple checked) valid api key and api secret for the paper api. Could you point me in the right direction to resolve this issue?

I am using the latest backtrader, Python 3.7 and pipenv.

Any help is appreciated. Thanks!

taiconley commented 5 years ago

I'm having the same error. Latest backtrader. Running Linux Mint 19, Python 3.6.7. Do you have an update?

taiconley commented 5 years ago

This now runs fine. You need access to polygon, which you get when you setup a live account.

phal0r commented 5 years ago

Thanks for figuring this out. It is nowhere mentioned in the docs unfortunately.

deveArt commented 5 years ago

Why it isn't possible to use alpaca-backtrader-api in paper mode as it described in readme ?? And in fact the code contains paper API urls... But I get nats.aio.errors.NatsError: nats: 'Authorization Violation' error and I want to use just paper-api without access to polygon