Coder Social home page Coder Social logo

emengkeng / binance-dca-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mlkmahmud/binance-dca-bot

0.0 0.0 0.0 7.27 MB

A dollar cost averaging bot for the Binance Cryptocurrency Exchange.

License: MIT License

Shell 0.03% JavaScript 0.45% TypeScript 99.53%

binance-dca-bot's Introduction

binance-dca-bot

A dollar cost averaging bot for the Binance Cryptocurrency Exchange.

About

This bot allows you to schedule recurring buy orders for any trading pair available on the Binance cryptocurrency exchange.

What is dollar cost averaging? Dollar cost averaging DCA refers to the practice of investing fixed amounts at regular intervals (for instance, $20 every week). This is a strategy used by investors that wish to reduce the influence of volatility over their investment and, therefore, reduce their risk exposure.

Getting Started

Prerequisites

Installation

  1. Get your Binance API keys. You can learn how to from this tutorial

  2. Clone the repo

    git clone https://github.com/MlkMahmud/binance-dca-bot.git
  3. Install dependencies

    cd binance-dca-bot
    npm install

Configure environment varibles

Environment Key Description Sample Value Required
BINANCE_API_KEY Binance API key from Binance True
BINANCE_API_SECRET Binance API secret from Binance True
BINANCE_TESTNET_ENABLED Enable/Disable Binance test mode (defaults to true). You must explicitly set this value to false if you want to run the bot in live mode true/false False
DB_URL A valid MongoDB connection string. Learn more mongodb://mongodb0.example.com:27017 True
JWT_SECRET A string or buffer containing either the secret for HMAC algorithms, or the PEM encoded public key for RSA and ECDSA helloiamasecretkey True
PORT The port you want your server to listen on 3000 False
SENTRY_AUTH_TOKEN The authentication token to use for all communication with Sentry. from Sentry False
SENTRY_DSN The Data Source Name (DSN) to use to connect to Sentry from Sentry False
SENTRY_ENABLED Enable/Disable Sentry true False
SENTRY_RELEASE A release is a version of your code deployed to an environment. When you notify Sentry about a release, you can easily identify new issues, regressions, whether an issue is resolved in the next release, and apply source maps. Learn more v0.0.1 False
SENTRY_ORG The slug of the organization to use for a command from Sentry False
SENTRY_PROJECT The slug of the project to use for a command. from Sentry False
SLACK_ENABLED Enable/Disable Slack notifications true False
SLACK_WEBHOOK_URL Your Slack webhook URL from Slack False
TELEGRAM_ENABLED Enable/Disable Telegram notifications true False
TELEGRAM_BOT_TOKEN Authentication token for your Telegram Bot from Telegram False
TELEGRAM_CHAT_ID The ID for your Telegram Group/Channel from Telegram False
TIMEZONE The default timezone to use for the job scheduler (must be moment compatible) Africa/Lagos False

Run the bot

To start the bot in developement mode run

npm run dev

N.B. This command loads environment variables from the .env, if it exists

To start the bot in production mode run

npm run build
npm start

N.B. This command does not load env variables from the .env file, even if it exists.

Deployment

There are no strong constraints regarding deployments. The bot is a Next.js application powered by a custom Express server, so there are a myriad of options to choose from. I personally host my mine on an Azure Virtual Machine and I automate my deployments using GitHub Actions.

Some of my personal favourite options for deployment:

Features

Portfolio

View up to date balance of all assets in your portfolio

Authentication

Enable password

Update password

Disable password

Jobs

Create a new job

Edit an existing Job

Pause/Resume a Job

Delete a job

View Job order history

Notifications

Enable Slack and Telegram Notifications

Todo

  • Fix: unpausing a job causes the job to run immediately, instead of waiting for next scheduled interval.

Built with

Disclaimer

Please, use at your own discretion. I will not be liable for any losses or hardship incurred from using this bot. โœŒ

License

Distributed under the MIT License. See LICENSE for more information.

binance-dca-bot's People

Contributors

mlkmahmud avatar dependabot[bot] 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.