Skip to main content

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

  1. make sure pipx is installed and operating correctly
  2. make sure python3 --version says Python 3.13.3
  3. open a command window and run pipx run getTrades
  4. when no config.ini file exists it will be created, user is asked to provide name, API key and API secret. the program exits
  5. the AES key with which the config.ini file is encrypted, is stored in the system keyring, as such you will be prompted for your system's password.
  6. 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: result.jpg

  1. in the leftmost column the token symbol is given, EUR_Wallet denotes the current real EURO balance in your wallet.
  2. Token Balance is the current amount of tokens in your wallet
  3. EUR(realized) is the result of all previous trades, result-investment per token
  4. EUR(unrealized) is the Euro value of your current wallet tokens (including kept Euro's)
  5. EUR(total) = EUR(realized) + EUR(unrealized)
  6. price is the current market price of the token
  7. BE-price (break-even price) is the EUR(realized) amount divided by Token Balance. This provides the price at which the remaining amount of tokens has a price that makes up for the investment in EUR(realized) (this metric is only relevant for situations where the EUR(realized) balance is negative (so (still) at a loss)
  8. BE% is the % a token value has to increase to reach break-even

Happy trading

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gettrades-1.7.2-py3-none-any.whl (11.2 kB view details)

Uploaded Python 3

File details

Details for the file gettrades-1.7.2-py3-none-any.whl.

File metadata

  • Download URL: gettrades-1.7.2-py3-none-any.whl
  • Upload date:
  • Size: 11.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for gettrades-1.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cb39b5cd7b289bebc41b398c8e4913bdc4f2bc3af2647e9d040886c5f57be53c
MD5 e506faa8c41c1cb0c8e6e876e93ca216
BLAKE2b-256 eb94befcef3666d605aea2a58e8e51808d58cdb65b866b668dd2450271f6b21e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page