Skip to main content

A tool querying Bitvavo.com to retrieve all trades and calculate overall results

Project description

getTrades v1.6

Read trades and calculate overall profit/loss

usage: python getTrades.py [option]

where [option] can be:

option explanation
-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

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, and can be called directly from the commandline.

Best (and tested) operation is achieved using pipx ( https://pipx.pypa.io/stable/installation/ )

  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.6.12-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gettrades-1.6.12-py3-none-any.whl
  • Upload date:
  • Size: 11.4 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.6.12-py3-none-any.whl
Algorithm Hash digest
SHA256 6eb31c597e4d7a7a458948f091533f9be2373df3ac9403eccd2ac8be2c6c2a3c
MD5 4541abe8f3869932fb1f8447f9e4dd91
BLAKE2b-256 1d3d2816eb6211889883893addca3048369134743a1871f9c8b702b00b95e23f

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