Generate a series of amounts & prices for creating laddered cryptocurrency buy orders.
Requires stack
:
# Spend $100 in 4 steps of -0.25% at a current price of $50,000
$ stack run 0.25 4 50000 100
+--------++------------+----------+
| || Amount | Price |
+========++============+==========+
| -0.25% || 0.00050125 | 49875.00 |
| -0.50% || 0.00050251 | 49750.00 |
| -0.75% || 0.00050378 | 49625.00 |
| -1.00% || 0.00050505 | 49500.00 |
+========++============+==========+
| Total || 0.00201259 | |
| Avg || | 49687.11 |
+--------++------------+----------+
$ stack run -- --help
TODO:
- Add config file with default precisions & fees per currency.
- Add Coinbase/Binance/Gemini integrations for auto-placing orders.
You can install the CLI exe by running stack install
. This lets you call the
executable directly instead of through stack:
stack install
export PATH="${HOME}/.local/bin/:${PATH}"
crypto-dca-calculator
You can build the project with stack:
stack build
For development, you can enable fast builds with file-watching, documentation-building, & test-running:
stack test --haddock --fast --file-watch --pedantic
To build & open the documentation, run:
stack haddock --open crypto-dca-calculator
BSD-3