Giter Site home page Giter Site logo

boshdmg / crypto-unit-cost-averager Goto Github PK

View Code? Open in Web Editor NEW
20.0 5.0 8.0 7 MB

Automatically buys currency at regular intervals on Coinbase Pro. (Unit cost averaging)

License: MIT License

JavaScript 100.00%
gdax es6-javascript jest cryptocurrency litecoin bitcoin ethereum

crypto-unit-cost-averager's Introduction

Crypto-Unit-Cost-Averager

Automatically buy an amount of cryptocurreny at regular intervals on Coinbase Pro, to support unit cost averaging investment stratergy.

Written to run on Node.

npm run start

Create a gdaxrc. file in root of project in this shape:

{
    "url" : "https://api.pro.coinbase.com",
    "key" : "api-key-from-coinbase-pro",
    "secret" : "api-secret-from-coinbase-pro",
    "passphrase" : "api-passphrase-from-coinbase-pro",
    "buy" :[
        {"product":"ETH-EUR","amount" : "10","interval" : "1" , "limit":240},
        {"product":"LTC-USD","amount" : "10","interval" : "24", "limit": 40}
    ]
}

This will buy 10 Euros worth of Ethereum ever hour unless the price exceeds 240 EUR, and 10 Dollars of LiteCoin every 24 hours unless the price exceeds 40 USD.

For BTC trades there is currently a minimum purchase of 0.01 coins imposed by gdax, so if Bitcoins value is 5000, your amount value must be at least 50.

You can generate an api key,secret and passphrase under your Coinbase Pro account, you will need to grand View and Trade permission. amount => is the amount you want to spend. interval => is the intervals in hours you want to buy (whole numbers only) limit => is the maximum price you are willing to buy at.

Up coming features

  • Purchasing coins as soon as they drop below the limit - using websock api

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.