alpacahq / example-scalping

A working example algorithm for scalping strategy trading multiple stocks concurrently using python asyncio
763 stars 184 forks source link

How do I link this to Alpaca to test? #10

Open GreengageLTD opened 3 years ago

GreengageLTD commented 3 years ago

I don't see where to enter api keys for either Alpaca or Polygon in the code? Can you point me to what I'm missing?

GreengageLTD commented 3 years ago

From a forum answer. This worked just by pasting them in as commands.

Assuming you have your API keys If you are using windows do this on your terminal SET APCA_API_KEY_ID=** SET APCA_API_SECRET_KEY=** SET APCA_API_BASE_URL =https://paper-api.alpaca.markets

or Linux : export APCA_API_KEY_ID=** export APCA_API_SECRET_KEY=** export APCA_API_BASE_URL=https://paper-api.alpaca.markets

elliotvilhelm commented 3 years ago

Right here https://github.com/alpacahq/example-scalping/blob/master/main.py#L13