Trade bot using Alpaca as a bropker
$ yarn# development
$ yarn start
# watch mode
$ yarn start:dev
# production mode
$ yarn start:prod# unit tests
$ yarn test
# e2e tests
$ yarn test:e2e
# test coverage
$ yarn test:cov- Create an account on Alpaca.markets
- Go to
paper tradingon the left navigation - Obtain your API keys on that view.
- Add both
ALPACA_API_KEY&ALPACA_SECRET_KEYto the .env variables - Add the algorithm you want to try on the .env file. Example:
BOT_TYPE=LONG_SHORT - Run the app
Please have a look at .env.sample to get started
There are two different types of algorithms
MEAN_REVERSIONLONG_SHORT
This algorithm requires an additional env variable:
MEAN_REVERSION_STOCK
This variable should have the value of the name of the stock. Example Apple = AAPL
This project is done to test different trading strategies in a paper trading environment. If you want to try this to do live trading do it by your own risk.