python3-krakenex
python3-krakenex copied to clipboard
How to get available balance information?
Versions
OS:
Python:
krakenex:
What are you trying to achieve?
Hi!
The balance endpoint only gives info on asset pair and volume and doesn't give info on current price and value (all the info you can get on the kraken welcome page...)
Is there an endpoint which can give all the following information somultaneously?
- asset
- amount
- price
- 24Hchg
- value
# code sample
What do you expect to happen?
Is there an endpoint which can give all the following information somultaneously?
- asset
- amount
- price
- 24Hchg
- value
What happens instead?
# error message
No, not to my knowledge.
(all the info you can get on the kraken welcome page...)
Getting this requires:
- retrieving the full balance;
- retrieving open orders and positions;
- subtracting the latter from the former while converting units to the same reference, e.g. a fiat currency.
See examples/print-available-balances.py for a primitive example.