Skip to content

duncancarroll/the-dawn-trader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

The Dawn Trader

I got tired of forgetting to buy crypto so I wrote this script to buy a fixed USD amount once a week from a weighted list of specified coins. The only thing you have to do manually is get USD into your Kraken account somehow, usually wire (ideally your bank offers recurring wire transfers.) The script will also transfer all coins into a specified wallet of your choice every month, so as not to keep them on the exchange. Uses the Kraken Exchange API

See: The Dawn Treader (C.S. Lewis)

Configure

  • Add the coins you want to buy plus weights into ASSETS_AND_WEIGHTS and the weekly spend amount into SPEND_PER_RUN
  • Set ALWAYS_BUY_MINIMUM to False if you don't want to overspend, or leave at True if you still want to buy even when the minimum amount exceeds the weight you set.
  • Set LOCAL_WALLET_IDS to empty if you don't want it to transfer your coins out every month, or enter the correct ticker symbols and Kraken string names of your wallets that you want to transfer each coin into (must be created as standard outbound wallets in Kraken web UI first.)
  • Create a Kraken API key with permission to buy coins and add KRAKEN_KEY and KRAKEN_SECRET to env vars.
  • $ virtualenv venv
  • $ ./venv/bin/activate
  • $ pip install -r requirements.txt
  • $ python trader.py

Deploy

  • Can be deployed to anything that runs Python. Does not need cron b/c we tie up a thread lol
  • Ensure env var IS_DEBUG to False in cloud
  • Remove my Sentry API key (whoops)
  • Digital Ocean has a nice 1-click app deploy via commit hook which works great for this.
  • Also note: unit_price is set to buy at market ask, but this can be modified if you're feeling lucky.

Libraries

About

Index-style trading script for the Kraken API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages