python3-krakenex icon indicating copy to clipboard operation
python3-krakenex copied to clipboard

How to get available balance information?

Open mburiankova opened this issue 4 years ago • 1 comments

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

mburiankova avatar Feb 12 '21 20:02 mburiankova

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.

veox avatar Feb 28 '21 14:02 veox