financelurker / crypto-trades-firefly-iii

This service lets you import your movements on supported crypto trading platforms to your Firefly III account. Keep an overview of your traded crypto assets.
GNU General Public License v3.0
23 stars 3 forks source link
binance bitcoin crypto-trade-platform cryptocurrency exchange finance-management firefly-iii public-ledger

crypto-trades-firefly-iii

This service lets you import your movements on supported crypto trading platforms to your Firefly III account. Keep an overview of your traded crypto assets.

Overview

Big Picture

Imported Movements from Crypto Trading Platform to Firefly III

The following movements on your crypto trading platform account will be imported to your Firefly III instance:

Executed trades

Received interest through savings (lending/staking)

Withdrawals and deposits in crypto

On-/Off-ramping from or to SEPA asset accounts

How to Use

This module runs stateless next to your Firefly III instance (as Docker container or standalone) and periodically processes new data from your configured crypto trading platform. Just spin it up and watch your trades being imported right away.

If you have used binance-firefly-iii before

Just configure this service as you configured binance-firefly-iii and run it. All "notes identifier" will be migrated for using crypto-trades-firefly-iii. binance-firefly-iii will not find any accounts within Firefly-III afterwards.

"notes identifier" are used so that crypto-trades-firefly-iii services can find and match your correct exchange accounts.

Prepare your Firefly III instance for supported exchanges

To import your movements from Binance your Firefly III installation has to be extended as follows:

Run as Docker container from Docker Hub

Pull the image and run the container passing the needed environmental variables.

docker pull financelurker/crypto-trades-firefly-iii:latest
docker run --env.... financelurker/crypto-trades-firefly-iii:latest

Run as Docker container from repository

Check out the repository and build the docker image locally. Build the container and then run it by passing the needed environmental variables.

git clone https://github.com/financelurker/crypto-trades-firefly-iii.git
cd crypto-trades-firefly-iii
docker build .
docker run --env....

Run it standalone

Check out the repository, make sure you set the environmental variables and start thy python script:

git clone https://github.com/financelurker/crypto-trades-firefly-iii.git
cd crypto-trades-firefly-iii
python -m pip install --upgrade setuptools pip wheel
python -m pip install --upgrade pyyaml
python -m pip install Firefly-III-API-Client
python -m pip install python-binance
python -m pip install cryptocom-exchange
python main.py

If you are having any troubles, make sure you're using python 3.9 (the corresponding Docker image is "python:3.9-slim-buster" for version referencing).

Working environments

Configuration

Multiple Exchanges

As the whole functionality runs in a single blocking thread for all configured exchanges it is recommended to configure a new instance/docker container for each crypto exchange you're using. Otherwise the maintenance of one exchange will impact the import of all other exchanges as well.

Environmental Variables

This image is configured via environmental variables. As there are many ways to set them up for your runtime environment please consult that documentation.

Make sure you have them set as there is no exception handling for missing values from the environment.

For the configuration of relevant supported exchanges please read here

How to extend this service

Add supported Exchanges

Please see the documentation on how to add supported exchanges.

Add supported Blockchains

Please see the documentation on how to add supported Blockchains.

Disclaimer

This app needs access tokens for your Firefly III instance, and access tokens/API-Keys for your crypto trading platform account. It is absolutely okay to only give read-permissions to that access tokens/API-Keys, as there will be no writing actions to crypto trading platform by this service.