2.0.0 • Published 6 months ago

dcanod v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

DCANod

Simple Open Source CLI application to DCA with Nexo Pro & Ghostfolio

GitHub package.json version (branch) Shield: Contributions Welcome Shield: License: AGPL v3 GitHub issues GitHub pull requests GitHub code size in bytes

Intro

DCANod is an easy-to-use and lightweight command-line application built using Node.js and TypeScript. It offers a hassle-free setup process, allowing users to quickly start performing recurring cryptocurrency purchases on the Nexo Pro exchange. Additionally, the application seamlessly imports these transactions into their Ghostfolio instance, providing a smooth and efficient experience for managing their crypto investments.

Install

pnpm i -g dcanod

Setup command

To configure DCANod to work with Nexo Pro and Ghostfolio, simply execute:

dcanod-cli setup
✔ [Nexo] key:  … <nexo-api-key>
✔ [Nexo] secret:  … <nexo-api-secret>
✔ [Ghostfolio] hostname:  … <ghostfolio-hostname>
✔ [Ghostfolio] port:  … <ghostfolio-port>
✔ [Ghostfolio] secret:  … <ghostfolio-secret-token>
✔ [Ghostfolio] (optionnal) account id :  … <account-id>
✔ Configuration saved

This will create a config.json file in ~/.config/dcanod by default. You can use another config file using option -c.

dcanod-cli setup -c /tmp/dcanod/newconfig.json

Buy command

Buy a specific amount of crypto.

dcanod-cli buy BTC/USDT 15

Automating with Crontab

To automate the execution of DCANod on a recurring schedule, we can use the crontab utility on Unix-like systems. Crontab allows us to set up scheduled tasks, such as running DCANod at specific intervals.

Edit the crontab file by executing the following command:

crontab -e

To run DCANod every Monday at 8 AM, add the following line to the crontab:

0 8 * * 1 dcanod-cli BTC/USDT 20

Build locally

pnpm build

Tests

pnpm test
pnpm prettier