bitex
bitex copied to clipboard
Problem with orders in kraken
Hello, i have a problem with orders in kraken. With Poloniex, bittrex and Bitfinex (with a little modification in bitfinex.py) work fine but dont work with Kraken. I has received the error "{'error': ['EGeneral:Invalid arguments']}" My code is:
KrakenAsk = Krakencfg.order_book(Krakenpair).json()['result'][Krakenpair]['asks'][0][0]
KrakenAskVol = Krakencfg.order_book(Krakenpair).json()['result'][Krakenpair]['asks'][0][1]
KrakenBid = Krakencfg.order_book(Krakenpair).json()['result'][Krakenpair]['bids'][0][0]
KrakenBidVol = Krakencfg.order_book(Krakenpair).json()['result'][Krakenpair]['bids'][0][1]
print('Compra en KrakenAsk a ' + str(KrakenAsk) + ' - Volumen ' + str(KrakenAskVol))
print('Venta en KrakenBid a ' + str(KrakenBid) + ' - Volumen ' + str(KrakenBidVol))
KrakenBase = Krakencfg.wallet().json()['result'][Krakbase]
KrakenQuote = Krakencfg.wallet().json()['result'][Krakquote]
print('\nBalance BTC Kraken ' + str(KrakenBase))
print('Balance XRP Kraken ' + str(KrakenQuote))
ERROR = Krakencfg.ask('XXRPXXBT', 0.0001309, 10)
error2 = ERROR.json()
if ERROR is not None:
print(error2)
Result in console:
Krakbase: XXBT - Krakquote: XXRP
Kraken Par: XXRPXXBT
Compra en KrakenAsk a 0.000124780 - Volumen 613.902
Venta en KrakenBid a 0.000124200 - Volumen 92.000
Balance BTC Kraken 0.0010000000
Balance XRP Kraken 10.00000000
{'error': ['EGeneral:Invalid arguments']}
Thanks!!!
Hey @Cloniko, Could you run the code with log level set to DEBUG and post the log? (make sure your keys arent visible) And what change did you have to make in bitfinex.py?
Hey @nlsdfnbch,
I hope this is how you say (DEBUG) if not, explain how I can do it to show the data you need
KRAKEN -------------- TEST 1 ------------------------------------------------------------------
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kraken.com 2018-01-17 02:31:36,352 - DEBUG - Starting new HTTPS connection (1): api.kraken.com DEBUG:urllib3.connectionpool:https://api.kraken.com:443 "GET /0/public/Depth?pair=XXRPXXBT HTTP/1.1" 200 None 2018-01-17 02:31:37,598 - DEBUG - https://api.kraken.com:443 "GET /0/public/Depth?pair=XXRPXXBT HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kraken.com 2018-01-17 02:31:37,602 - DEBUG - Starting new HTTPS connection (1): api.kraken.com DEBUG:urllib3.connectionpool:https://api.kraken.com:443 "GET /0/public/Depth?pair=XXRPXXBT HTTP/1.1" 200 None 2018-01-17 02:31:37,776 - DEBUG - https://api.kraken.com:443 "GET /0/public/Depth?pair=XXRPXXBT HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kraken.com 2018-01-17 02:31:37,781 - DEBUG - Starting new HTTPS connection (1): api.kraken.com DEBUG:urllib3.connectionpool:https://api.kraken.com:443 "GET /0/public/Depth?pair=XXRPXXBT HTTP/1.1" 200 None 2018-01-17 02:31:37,954 - DEBUG - https://api.kraken.com:443 "GET /0/public/Depth?pair=XXRPXXBT HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kraken.com 2018-01-17 02:31:37,960 - DEBUG - Starting new HTTPS connection (1): api.kraken.com DEBUG:urllib3.connectionpool:https://api.kraken.com:443 "GET /0/public/Depth?pair=XXRPXXBT HTTP/1.1" 200 None 2018-01-17 02:31:38,136 - DEBUG - https://api.kraken.com:443 "GET /0/public/Depth?pair=XXRPXXBT HTTP/1.1" 200 None Compra en KrakenAsk a 0.000105770 - Volumen 2043.996 Venta en KrakenBid a 0.000105150 - Volumen 6625.373 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kraken.com 2018-01-17 02:31:38,142 - DEBUG - Starting new HTTPS connection (1): api.kraken.com DEBUG:urllib3.connectionpool:https://api.kraken.com:443 "POST /0/private/Balance HTTP/1.1" 200 None 2018-01-17 02:31:39,195 - DEBUG - https://api.kraken.com:443 "POST /0/private/Balance HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kraken.com 2018-01-17 02:31:39,200 - DEBUG - Starting new HTTPS connection (1): api.kraken.com DEBUG:urllib3.connectionpool:https://api.kraken.com:443 "POST /0/private/Balance HTTP/1.1" 200 None 2018-01-17 02:31:40,648 - DEBUG - https://api.kraken.com:443 "POST /0/private/Balance HTTP/1.1" 200 None
Balance BTC Kraken 0.0010000000 Balance XRP Kraken 10.00000000 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.kraken.com 2018-01-17 02:31:40,653 - DEBUG - Starting new HTTPS connection (1): api.kraken.com DEBUG:urllib3.connectionpool:https://api.kraken.com:443 "POST /0/private/AddOrder HTTP/1.1" 200 None 2018-01-17 02:31:41,863 - DEBUG - https://api.kraken.com:443 "POST /0/private/AddOrder HTTP/1.1" 200 None {'error': ['EGeneral:Invalid arguments']}
That's the correct log, thanks! Since Kraken is currently testing their new trading engine, could you verify this happens for other pairs as well when posting an order? It's quite possible some of the parameters have changed when they moved to the new engine.
Hi, test with XLM.
Same problem.
KRAKEN -------------- TEST 1 ------------------------------------------------------------------
XXLMXXBT 2018-01-19 15:25:52,368 - DEBUG - Starting new HTTPS connection (1): api.kraken.com 2018-01-19 15:25:54,212 - DEBUG - https://api.kraken.com:443 "GET /0/public/Depth?pair=XXLMXXBT HTTP/1.1" 200 None 2018-01-19 15:25:54,217 - DEBUG - Starting new HTTPS connection (1): api.kraken.com 2018-01-19 15:25:54,408 - DEBUG - https://api.kraken.com:443 "GET /0/public/Depth?pair=XXLMXXBT HTTP/1.1" 200 None 2018-01-19 15:25:54,412 - DEBUG - Starting new HTTPS connection (1): api.kraken.com 2018-01-19 15:25:54,595 - DEBUG - https://api.kraken.com:443 "GET /0/public/Depth?pair=XXLMXXBT HTTP/1.1" 200 None 2018-01-19 15:25:54,601 - DEBUG - Starting new HTTPS connection (1): api.kraken.com 2018-01-19 15:25:54,779 - DEBUG - https://api.kraken.com:443 "GET /0/public/Depth?pair=XXLMXXBT HTTP/1.1" 200 None Compra en KrakenAsk a 0.000044800 - Volumen 5897.932 Venta en KrakenBid a 0.000044710 - Volumen 12000.000 2018-01-19 15:25:54,787 - DEBUG - Starting new HTTPS connection (1): api.kraken.com 2018-01-19 15:25:57,087 - DEBUG - https://api.kraken.com:443 "POST /0/private/Balance HTTP/1.1" 200 None 2018-01-19 15:25:57,092 - DEBUG - Starting new HTTPS connection (1): api.kraken.com 2018-01-19 15:25:58,718 - DEBUG - https://api.kraken.com:443 "POST /0/private/Balance HTTP/1.1" 200 None
Balance BTC Kraken 0.0000000000 Balance XLM Kraken 30.00000000 2018-01-19 15:25:58,724 - DEBUG - Starting new HTTPS connection (1): api.kraken.com 2018-01-19 15:26:00,164 - DEBUG - https://api.kraken.com:443 "POST /0/private/AddOrder HTTP/1.1" 200 None {'error': ['EGeneral:Invalid arguments']}
Unfortunately, I cannot find the error in my code. I've asked support if there is an issue with the API, but it's probably a good idea if you, too ask them what's going on.
Specifically, if anything changed since the upgrade is of interest.
@Cloniko , have you heard anything from support ? My ticket's still open, without a response, unfortunately.
Hi, im try this package and work perfectly. https://github.com/Endogen/Telegram-Kraken-Bot
All work perfect. Orders, balances, etc with the private api.
Kraken work fine throught the api.