Code Monkey home page Code Monkey logo

coinbase-pro-dca's Introduction

coinbase-dca

Deploy

A simple app for making buys from Coinbase Pro at a user-configured interval. Useful for entering a market via over a long period of time via "dollar cost averaging".

Strategy

  • Runs daily/hourly/monthly at a predefined interval.
  • Places each of a set of pre-declared buys for a given amount based on any valid trading pair on Coinbase Pro.
  • Supports "best effort" limit buys, placing limit buys when possible but falling back to the "market" if the trade would fail.

Setup

To install the app you will need the following requirements:

  • A Coinbase Pro Account
  • A Heroku Account

After setting up at each of the following โ˜๏ธ, you can press the "deploy to heroku" button above and move on to the next section.

Configuration

In order to setup the app you will need to request an API key for your Coinbase Pro account. You can retrieve a key by following the Official Coinbase Guide.

After retrieving a key, you can configure the bot to make buys on your behalf using the following settings (available upon installation or in the "settings / config variables" section of the heroku dashboard).

COINBASE_API_KEY

The API Key for your coinbase account.

COINBASE_API_SECRET

The secret for your Coinbase API key.

COINBASE_API_PASSPHRASE

The passphrase for your coinbase API key.

COINBASE_API_SANDBOX

Whether or not the coinbase sandbox should be used.

ORDERS

"Hash of orders that you wish to place. Must be of the form{\"<order_type>\": []}

Each buy/sell can be made up of multiple orders, which must be of the form

{
  product: "the name of the product you are buying"
  amount: "the amount of the base trading pair which you wish to use"
}

For example: a buy of $20 USD of Bitcoin and $10 USD of Ethereum would be represented by the following:

{"buy": [{"product": "BTC-USD", "amount": 20}, {"product": "ETH-USD", "amount": 10}]}

CURRENCY

The base currency which you want to transact in - normally USD.

COINBASE_LIMIT

The multiplier of the current market price which you want to use for limit orders.

For example, if the current market price for BTC-USD is $100, and your COINBASE_LIMIT is set to 0.95 a LIMIT order for $95 will be placed.

Limitations

The following features are not supported. If you would interested in seeing them implemented please feel free to create a PR or Issue!

  • Automatic deposits to Coinbase from an external bank account.
  • "Absolute" limit price for small cap assets
  • Configurable limits for different assets

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.