A tool querying Bitvavo.com to retrieve all trades and calculate overall results
Project description
getTrades v1.7
Read trades and calculate overall profit/loss
usage: python getTrades.py [option]
where [option] can be:
| option | explanation |
|---|---|
| -h | this help message |
| -a | add a config section |
| -d # | delete a config section (asks for config number if no config section nr is given) |
| -l | list all config section and their numbers |
| -u # | use a specific config section (by number found by -l option) |
| -k | (Advanced) use saved result set, don't query Bitvavo again |
| -v | verbose, show debug information |
When no option is provided, a standard run will be executed, when more than one config exist, a config number is asked to run the program with
Initial run will ask for API and Secret to api.bitvavo.com and store this information encrypted in a config.ini file.
This will be the default and does not need to be specified further until there are more than 1 configs
Operations
getTrades is build to perform like an application python -m getTrades, and can be called directly from the commandline.
Best (and tested) operation is achieved using pipx ( https://pipx.pypa.io/stable/installation/ )
pipx run getTrades
- make sure pipx is installed and operating correctly
- make sure
python3 --versionsaysPython 3.13.3 - open a command window and run
pipx run getTrades - when no
config.inifile exists it will be created, user is asked to provide name, API key and API secret. the program exits - the AES key with which the
config.inifile is encrypted, is stored in the system keyring, as such you will be prompted for your system's password. - when run a second time, getTrades will call out to Bitvavo.com and retrieve all trades, wallet balances and current prices of assets.
Analysis
sample results:
- in the leftmost column the token symbol is given, EUR_Wallet denotes the current real EURO balance in your wallet.
- Token Balance is the current amount of tokens in your wallet
- EUR(realized) is the result of all previous trades, result-investment per token
- EUR(unrealized) is the Euro value of your current wallet tokens (including kept Euro's)
- EUR(total) = EUR(realized) + EUR(unrealized)
- price is the current market price of the token
- BE-price (break-even price) is the
EUR(realized)amount divided byToken Balance. This provides the price at which the remaining amount of tokens has apricethat makes up for the investment inEUR(realized)(this metric is only relevant for situations where theEUR(realized)balance is negative (so (still) at a loss) - BE% is the % a token value has to increase to reach break-even
Happy trading
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gettrades-1.7.3-py3-none-any.whl.
File metadata
- Download URL: gettrades-1.7.3-py3-none-any.whl
- Upload date:
- Size: 212.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b876c916c8c4af099af89e906f121bfbf3f2447297e6823d2a848e6f21fcef23
|
|
| MD5 |
40696643e62b82860a076c6240388088
|
|
| BLAKE2b-256 |
05329abba5f2cdc7e80d95bdae8d0cf4775633476cdb23203c0db0f18883ab71
|