dominiktraxl / pykrakenapi

A python implementation of the Kraken API.
GNU Lesser General Public License v3.0
224 stars 53 forks source link

get_account_balance() not working. #41

Closed danwatson16 closed 3 years ago

danwatson16 commented 3 years ago

3c6e1dfaa43608f5fe1144b91a199536

dominiktraxl commented 3 years ago

Works without a problem on my setup. Did you resolve the problem in the meantime?

tsferro2 commented 3 years ago

I am completely new to this/was wondering if either of you might be able to offer assistance... for example, when I run:

KrakenAPI(api).get_account_balance() where api is my private key or public key, it throws:

AttributeError: 'str' object has no attribute 'query_private'

any pointers would be much appreciated, and thanks for the useful library

mans17 commented 3 years ago

$ /usr/bin/python3 Python 3.9.2 (default, Feb 20 2021, 18:40:11)


>>> from pykrakenapi import KrakenAPI
>>> api = krakenex.API()
>>> api.load_key("YOUR_KEY_IN_A_FILE_HERE")
>>> k = KrakenAPI(api)
>>> bal = k.get_account_balance()
>>> print (bal)
dominiktraxl commented 3 years ago

The issue seems to be resolved thanks to @mans17, please reopen if I'm mistaken.