Fork of @kdmukai's gdax_bot with the following changes:
- AWS SNS replaced with Pushover and added
--push_notify
option to send push notifications with Pushover - Replace storing secrets in
settings.conf
with use of environment variables --debug
option logs all HTTP requests for auditing and debugging
For additional information, refer to @kdmukai's documentation
- Create a Coinbase account
- Clone the repo and create a virtualenv
python3 -m venv gdax_bot_env
- Activate your newly created virtualenv
source gdax_bot_env/bin/activate
- Install dependencies
cd gdax_bot && pip install -r requirements.txt
- [Optional] Refer to @kdmukai's documentation, if you want to set up a dry run of the bot on Coinbase Pro's sandbox environment
- [Optional] Create an Pushover account to get push notifications whenever the bot is run
- [Optional] Create an application token on Pushover and copy your application token and user key
- [Optional] Set up environment variables for Pushover
export PUSHOVER_APP_TOKEN="paste your application token here"
export PUSHOVER_USER_KEY="paste your Pushover User key here"
- Set up environment variables for your Coinbase Pro
export COINBASE_PROD_API_KEY="paste your api key here"
export COINBASE_PROD_PASSPHRASE="paste your api passphrase here"
export COINBASE_PROD_API_SECRET_KEY="paste your api secret key (it should be some string in base64) here"
- Schedule the bot to run as a cron job
Suppose you want to buy €75 EUR of BTC every other day at 14:00, if you want to get push notifications and have set up Pushover, run
crontab -e
and add the following to your cronjobs:
23 17 * * 1 . /home/username/.profile; /path/to/gdax_bot_env/bin/python -u /path/to/repo/gdax_bot/gdax_bot.py -j ETH-USD BUY 50.00 USD --push_notify >> /path/to/coinbase-orders.log
If you don't want to use Pushover, exclude the --push_notify
option
23 17 * * 1 . /home/username/.profile; /path/to/gdax_bot_env/bin/python -u /path/to/repo/gdax_bot/gdax_bot.py -j ETH-USD BUY 50.00 USD >> /path/to/coinbase-orders.log
- [Optional] If you are using WSL, you may want to take the extra step to ensure cron service starts with Windows