EAPI:Invalid key
Closed this issue · 1 comments
Deleted user commented
Hello !
I'm trying to make real trades but I get this error.
I tried remaking a key, it didn't work.
I have valide="False" in my code.
I don't kow what to do now. I'll ask Kraken support, to see if it's on their side or on the implementation of the API (or if it's my fault, which I suppose it is but I don't understand it)
If someone as an idea here, can you share it please ?
EDIT (23/10/2019) : I reinstalled everything and made a little script :
import krakenex
from pykrakenapi import KrakenAPI
from pykrakenapi.pykrakenapi import KrakenAPIError
krakenkey = "kraken.key"
api = krakenex.API()
api.load_key(krakenkey)
k = KrakenAPI(api)
res = k.get_account_balance()
print("res :", res)
res = k.add_standard_order("XXBTZEUR", 'buy', 'market', "0.002", price=None, price2=None, leverage=2,
oflags=['viqc', 'fciq'], starttm=0, expiretm=0, userref=None, validate=False,
close_ordertype='stop-loss', close_price='-' + "0.5" + '%', close_price2=None)
print("res :", res)
Here's the output :
res : vol
ZEUR a number
XXBT a number
XXRP a number
XLTC a number
XETH a number
XETC a number
BCH a number
Traceback (most recent call last):
File "F:\Mega\testApiKraken\test.py", line 11, in <module>
res = k.add_standard_order("XXBTZEUR", 'buy', 'market', "0.002", price=None, price2=None, leverage=2,
File "C:\Users\MyName\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pykrakenapi\pykrakenapi.py", line 1897, in add_standard_order
raise KrakenAPIError(res['error'])
pykrakenapi.pykrakenapi.KrakenAPIError: ['EAPI:Invalid key']
So it seem that only adding an order is raising an error.
I probably did something wrong, but I can't see what.
Deleted user commented
Alright. oflags=['viqc', 'fciq']
should be oflags='viqc,fciq'