GithubHelp home page GithubHelp logo

the-dawn-trader's Introduction

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

the-dawn-trader's People

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.