- Use Python 3.7 or above (virtual environment recommended)
python3 -m venv .venv
source .venv/bin/activate
- Install requirements:
pip install -r requirements.txt
- Run
./trader.py --help
for CLI format- E.g.
./trader.py --brokerage dry_run --strategy vansh -d
- E.g.
./trader.py --brokerage dry_run --strategy vansh -e on_market_open
- E.g.
- Add any credentials to the
config
directory
To use the Alpaca brokerage (paper money or real money), follow these steps:
- Go to https://alpaca.markets/
- Create a new account
- Generate the Key ID and Secret Key
- Go to the
/config
directory and runtouch alpaca.json
- Paste your key id and secret in the following format:
{
"key_id": "<YOUR KEY HERE>",
"secret_key": "<YOUR SECRET HERE>"
}