Giter VIP home page Giter VIP logo

bitcoin-dca's Introduction

Bitcoin DCA

Bitcoin-DCA: Automated self-hosted Bitcoin DCA tool for multiple Exchanges

Docker Pulls Quality Gate Status Coverage Lines of Code Maintainability Rating Security Rating

Requirements

  • You need to have an account on a supported exchange;
  • You need to have Docker installed: https://docs.docker.com/get-docker/;
  • You need to have an API key active on a supported exchange. It needs read, trade and withdraw permission.

Supported Exchanges

Exchange URL Currencies XPUB withdraw supported
BL3P https://bl3p.eu/ EUR Yes
Bitvavo https://bitvavo.com/ EUR No *
Kraken https://kraken.com/ USD EUR CAD JPY GBP CHF AUD No
Binance https://binance.com/ USDT BUSD EUR USDC USDT GBP AUD TRY BRL DAI TUSD RUB UAH PAX BIDR NGN IDRT VAI Yes

* Due to regulatory changes in The Netherlands, Bitvavo currently requires you to provide proof of address ownership, thus temporarily disabling Bitcoin-DCA's XPUB feature.

About this software

The DCA tool is built with flexibility in mind, allowing you to specify your schedule of buying and withdrawing. A few examples that are possible:

  • Buy each week, never withdraw.
  • Buy monthly and withdraw at the same time to reduce exchange risk.
  • Buy each week but withdraw only at the end of the month to save on withdrawal fees.

Documentation

Format Location
Online https://bitcoin-dca.readthedocs.io/en/latest/
PDF https://bitcoin-dca.readthedocs.io/_/downloads/en/latest/pdf/
ZIP https://bitcoin-dca.readthedocs.io/_/downloads/en/latest/htmlzip/
ePub https://bitcoin-dca.readthedocs.io/_/downloads/en/latest/epub/

Support

You can visit the Bitcoin DCA Support channel on Telegram: https://t.me/bitcoindca

Contributing

Contributions are highly welcome! Feel free to submit issues and pull requests on https://github.com/jorijn/bitcoin-dca.

 

Bitcoin DCA Logo

bitcoin-dca's People

Contributors

bassim avatar bufo24 avatar dependabot[bot] avatar jorijn avatar mijndert avatar mvanduijker avatar sebastix avatar styxit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

bitcoin-dca's Issues

Support for the Binance exchange

Is your feature request related to a problem? Please describe.
I'd like to use Bitcoin-DCA using the funds that are present on my account on the Binance exchange.

Describe the solution you'd like
I am able to connect Bitcoin-DCA using Binance(.com) API credentials

docker build . -t ghcr.io/jorijn/bitcoin-dca:latest fails

@Jorijn I ran into this error:

configure: error: rtnetlink.h is required, install the linux-headers package: apk add --update linux-headers
ERROR: `/tmp/pear/temp/xdebug/configure --with-php-config=/usr/local/bin/php-config' failed
The command '/bin/sh -c apk --no-cache update     && apk --no-cache add autoconf g++ make     && pecl install pcov xdebug     && docker-php-ext-enable pcov xdebug' returned a non-zero code: 1

I managed to get it to build again by specifying the xdebug pecl version:

# php code coverage & development
RUN apk --no-cache update \
    && apk --no-cache add autoconf g++ make \
    && pecl install pcov xdebug-3.1.5 \
    && docker-php-ext-enable pcov xdebug

I am not certain whether this the correct fix or the correct version (3.1.5) though.

On opt-in basis, keep track of DCA performance

Someone opted the idea to let Bitcoin DCA report how your DCA strategy is performing. Ideally the app would write the transactions to some sort of database and when the user would request statistics, fetch the current price and show how much % the user has progressed.

Error on RPi during withdrawal from Bitvavo

Hello Jorijn,

First of all, thanks for making this script available! And I used your affiliate link on Bitvavo.

Unfortunately, I am getting an error running this command on RPi:
$(command -v docker) run --rm -it --env-file=/home/pi/Docker/bitcoin-dca/.bitcoin-dca ghcr.io/jorijn/bitcoin-dca:latest withdraw --all --yes --no-ansi

Error:

PHP Fatal error:  Uncaught TypeError: Argument 2 passed to Jorijn\Bitcoin\Dca\EventListener\XPubAddressUsedListener::__construct() must be an instance of Jorijn\Bitcoin\Dca\Component\AddressFromMasterPublicKeyComponent, instance of Jorijn\Bitcoin\Dca\Component\ExternalAddressFromMasterPublicKeyComponent given, called in /app/var/cache/container.php on line 509 and defined in /app/src/EventListener/XPubAddressUsedListener.php:28
Stack trace:
#0 /app/var/cache/container.php(509): Jorijn\Bitcoin\Dca\EventListener\XPubAddressUsedListener->__construct()
#1 /app/var/cache/container.php(174): BitcoinDcaContainer->getEventListener_XpubAddressUsedService()
#2 /app/vendor/symfony/event-dispatcher/EventDispatcher.php(267): BitcoinDcaContainer->{closure}()
#3 /app/vendor/symfony/event-dispatcher/EventDispatcher.php(230): Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}()
#4 /app/vendor/symfony/event-dispatcher/EventDispatcher.php(59): Symfony\Component\EventDispatcher\EventDispatcher->callList in /app/src/EventListener/XPubAddressUsedListener.php on line 28

I already found an issue with a similar error but it was related to Kraken.

Thanks for helping me!

Withdraw error kraken

Running this command on RPI4 results in an error:

docker run --rm -it --env-file=/home/xxx/docker/bitcoin-dca/config/bitcoin-dca.conf jorijn/bitcoin-dca:latest withdraw --all

In KrakenClient.php line 77:
EGeneral:Invalid arguments

Unable to use Bitcoin-DCA with Kraken as a German resident

Is your feature request related to a problem? Please describe.
As a German resident, I'm unable to use Bitcoin-DCA with the Kraken exchange. They require me to accept a separate "trading agreement".

Describe the solution you'd like
I'd like for Bitcoin-DCA to signal Kraken I have accepted the trading agreement.

Additional context
Information about implementing this can be found here:

Make bitcoin-dca work for more coins than just... bitcoin

First and foremost: Thanks a lot for this great dca solution!
But since you can always make a great tool even "better", I'd like to address the following feature request:

It would be great if we could dca more coins than "just" Bitcoin using your solution.
In a "best case scenario" the supported coins would be those enlisted within your integrated Exchanges.

Create a wizard that helps the user set up a new configuration file

As a user, I'd like to execute a wizard subcommand which will ask me several questions what I would like to accomplish using the DCA tool. After these questions, the tool will test and verify the created configuration and help me where I should put it and what the contents should be.

Probable questions:

  • Which exchange would you like to use
  • What is your API key
  • What is your API secret

Calculation for Bitvavo-Access-Timestamp header on Bitvavo is wrong on 32-bits PHP systems

Describe the bug
Calculation for Access-Window header on Bitvavo is wrong on 32-bits PHP systems.

To Reproduce
Steps to reproduce the behavior:

Execute echo time() * 1000.

Expected behavior
I expect an integer of length 13.

Screenshots
Screen Shot 2020-12-21 at 7 10 57 AM

Platform (please complete the following information):

  • OS: Raspbian ARMv7

Additional context
The Bitvavo connection is failing because the Bitvavo-Access-Timestamp header is incorrect.

Documentation for XPUB is missing code blocks

Describe the bug
The documentation page for XPUB is missing its code samples, making the steps impossible to reproduce.

(I was able to find the needed code samples by editing the file on Github, so all good for me)

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://bitcoin-dca.readthedocs.io/en/latest/xpub-withdraw.html#verifying-the-configured-xpub or its Git counterpart
  2. See the page is missing all its (code) samples.

Expected behavior
See all (code) samples as all the other documentation page.

Dockerless version?

Hey, would like to use the tool, but I have a love-hate relationship with Docker.

If I am the only one who'd like a standalone version, then ignore me, but I would really like to be able to run dca without needing docker ;).

Wonder what you think.

Method for alerting that an upgrade is available

I need to think of a way to alert the user that a new version is available. Maybe something with JSON file on Github and a tiny alert when a command gets executed, or a separate command check-update.

Add to the docs how to DRY on multiple crontab lines and use a shell script instead

When setting up multiple lines in crontab, repeating $(command -v docker) run --rm --env-file=/home/bob/.bitcoin-dca ghcr.io/jorijn/bitcoin-dca:latest [arguments...] is annoying and error prone.

Proposed solution
I'd recommend to add to the Tips section of the docs file cron examples how to create a shell script file to reference in the crontab and pass the arguments from the crontab to this shellscript.

[ERROR] Couldn’t resolve host name for <location>

Describe the bug
With Bitcoin-DCA 1.2.2, the container is unable to resolve any URLs and therefore is unable to communicate with any external exchange API.

To Reproduce
Steps to reproduce the behavior:

  1. Pull 1.2.2: docker pull jorijn/bitcoin-dca:v1.2.2
  2. Run against any exchange: $ docker run --rm --env-file=.env jorijn/bitcoin-dca:latest balance

Expected behavior
I was expecting Bitcoin-DCA to function like before. Being able to communicate with external exchange APIs.

Screenshots

pi@raspberrypi:~ $ docker run --rm --env-file=.env jorijn/bitcoin-dca:latest balance

 [ERROR] Couldn't resolve host name for
         "https://api.kraken.com/0/private/Balance".

Platform (please complete the following information):

  • Raspbian 32-bit
  • Version 1.2.2 of Bitcoin-DCA

Additional context
It looks like this particular bug is only affecting people on 32-bit ARM architecture (Raspberry Pis). I tested it on my 64-bit Raspberry Pi and was unaffected.

More information here:

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.