Giter Site home page Giter Site logo

vyteniss / crypto-recurring-transaction Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 2.0 15 KB

This tool allows traders to create and execute recurring transactions on the exchanges which does not support it in their native interfaces

JavaScript 100.00%
bitcoin cryptocurrency crypto trading dollar-cost-averaging bitstamp kraken transaction reccurence

crypto-recurring-transaction's Introduction

crypto-recurring-transaction code style: prettier

This tool allows traders to create and execute recurring transactions on the exchanges which does not support it in their native interfaces (Kraken and Bitstamp are currently supported). The tool allows the users to execute Dollar cost average strategies.

USE AT OWN RISK

Not my fault if you lose everything.

I suggest you investigate the code before using it. Create sub-accounts on the exchanges with restricted permissions whenever possible.

Getting Started

  • Clone the repo
  • Install dependencies
    • npm install
  • Copy sample-config.json to config.json and add configuration of the exchanges.
  • Copy sample-transactions.json to transactions.json and add configuration of the transactions.
  • run app.js with node
    • node app.js

Running in the background

In order for transactions to be executed crypto-recurring-transaction needs to be running all the time. Consider running it with pm2 to put it to background:

pm2 start app.js --name crt -- --ui

Then to see the logs:

pm2 info crt

Exchange configuration

Keys and secrets need to be added to config.json

Transaction configuration

Open transactions.json and add a new object containing your transaction configuration with same fields as this transaction example:

  • "exchange": "bitstamp" One of the supported exchanges (Currently "bitstamp" or "kraken")
  • "currencyPair": "etheur" Currency pair in which you want your recurring transaction to be executed. Please refer to Bitstamp and Kraken documentation for the lists of supported currency pairs
  • "recurrence": "* * */10 * * *" Cron expression instructing how often transaction should be executed. Consider using crontab expression generator to generate this expression.
  • "amount": 5 Amount of the cryptocurrency to be bought with this transaction.
  • "action": "buyMarket" Available Options:
    • buyMarket - Will buy as much currency as specified in the amount property at the market price
    • buyMarketWithAmountToSpend - Treats amount property as the value that should be spent to buy as much of the currency as possible at the current market price. E.g., combination of properties "currencyPair": "etheur" and "amount": 5 together with "action": "buyMarketWithAmountToSpend" means that 5 EUR will be spent to buy as much of Ethereum as possible at the market price at the time of transaction execution. WARNING! In times of high volatility, this might mean that you will spend much more or much less than initially anticipated.

Prerequisites

Tested with node v8.4.0, should be fine with any of the newer version as well.

TODOS and Limitations

  • Only buy market orders supported. Sell orders to be implemented.
  • Kraken API and the service is way better after the update, should be safe to use.

Acknowledgments

  • askmike and the perfect job on the bitstamp API wrapper.

crypto-recurring-transaction's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

jamiepg20

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.