Skip to content

Commit ffd773f

Browse files
authored
Binance exchange support for Bitcoin-DCA (#53)
* add interface implementations for binance * add tests for 3 services * created unit test for BinanceClient * fixing some code smells * fixing some code smells * also test for hash * resolved some code smells in the unit test * fixed a code smell and rearranged assertions * fixed a code smell and rearranged assertions * creates documentation for the binance api connection
1 parent daf8a4c commit ffd773f

26 files changed

+1419
-475
lines changed

.env.dist

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,14 @@ WITHDRAW_ADDRESS=
1212
# WITHDRAW_XPUB=
1313

1414
# Choose the cryptocurrency exchange this Bitcoin DCA tool will operate on. The default value is "bl3p".
15-
# Available options: bl3p, bitvavo, kraken
15+
# Available options: bl3p, bitvavo, kraken, binance
1616
EXCHANGE=bl3p
1717

1818
# This setting is for the base currency you're buying in. Options are:
1919
# BL3P: EUR
2020
# Bitvavo: EUR
2121
# Kraken: USD EUR CAD JPY GBP CHF AUD
22+
# Binance: USDT BUSD EUR USDC USDT GBP AUD TRY BRL DAI TUSD RUB UAH PAX BIDR NGN IDRT VAI
2223
BASE_CURRENCY=EUR
2324

2425
##################################################################################
@@ -82,3 +83,13 @@ BL3P_PRIVATE_KEY=
8283
# See https://support.kraken.com/hc/en-us/articles/360036157952
8384
#
8485
# KRAKEN_TRADING_AGREEMENT=agree
86+
87+
##################################################################################
88+
# Binance exchange settings
89+
##################################################################################
90+
91+
# This is the identifying part of the API key that you created on the Binance exchange.
92+
# BINANCE_API_KEY=
93+
94+
# This is the private part of your API connection to Binance. It’s a secret granting access to your Binance account.
95+
# BINANCE_API_SECRET=

README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<img src="/resources/images/logo.png?raw=true" alt="Bitcoin DCA Logo">
33
</p>
44

5-
# Automated Bitcoin DCA tool for multiple Exchanges
5+
# Automated self-hosted Bitcoin DCA tool for multiple Exchanges
66

77
![Docker Pulls](https://img.shields.io/docker/pulls/jorijn/bitcoin-dca)
88
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=Jorijn_bitcoin-dca&metric=alert_status)](https://sonarcloud.io/dashboard?id=Jorijn_bitcoin-dca)
@@ -19,14 +19,15 @@
1919
## Supported Exchanges
2020
| Exchange | URL | Currencies | XPUB withdraw supported |
2121
|------|------|------|------|
22-
| BL3P | https://bl3p.eu/ | EUR | No * |
22+
| BL3P | https://bl3p.eu/ | EUR | Yes |
2323
| Bitvavo | https://bitvavo.com/ | EUR | No * |
2424
| Kraken | https://kraken.com/ | USD EUR CAD JPY GBP CHF AUD | No |
25+
| Binance | https://binance.com/ | USDT BUSD EUR USDC USDT GBP AUD TRY BRL DAI TUSD RUB UAH PAX BIDR NGN IDRT VAI | Yes |
2526

26-
\* Due to regulatory changes in The Netherlands, BL3P and Bitvavo currently require you to provide proof of address ownership, thus temporarily disabling Bitcoin-DCA's XPUB feature.
27+
\* 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.
2728

2829
## About this software
29-
The DCA tool is built with flexibility in mind, allowing you to specify your own schedule of buying and withdrawing. A few examples that are possible:
30+
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:
3031

3132
* Buy each week, never withdraw.
3233
* Buy monthly and withdraw at the same time to reduce exchange risk.
@@ -46,4 +47,4 @@ You can visit the Bitcoin DCA Support channel on Telegram: https://t.me/bitcoind
4647
## Contributing
4748
Contributions are highly welcome! Feel free to submit issues and pull requests on https://github.com/jorijn/bitcoin-dca.
4849

49-
Like my work? Buy me a 🍺 by sending some sats on https://jorijn.com/donate/
50+
Like my work? Please buy me a 🍺 by sending some sats on https://jorijn.com/donate/

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "jorijn/bitcoin-dca",
3-
"description": "Tool for automatically buying and withdrawing Bitcoin on Bl3P",
3+
"description": "Tool for automatically buying and withdrawing Bitcoin",
44
"type": "project",
55
"license": "MIT",
66
"authors": [
@@ -38,7 +38,6 @@
3838
"test": "vendor/bin/phpunit --testdox"
3939
},
4040
"require-dev": {
41-
"roave/security-advisories": "dev-master",
4241
"friendsofphp/php-cs-fixer": "^2.16",
4342
"phpunit/phpunit": "^9.1"
4443
}

0 commit comments

Comments
 (0)