Skip to content
This repository has been archived by the owner on Feb 19, 2022. It is now read-only.

Problem with orders in kraken #152

Open
Cloniko opened this issue Jan 16, 2018 · 7 comments
Open

Problem with orders in kraken #152

Cloniko opened this issue Jan 16, 2018 · 7 comments
Assignees

Comments

@Cloniko
Copy link

Cloniko commented Jan 16, 2018

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!!!

@deepbrook
Copy link
Collaborator

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?

@Cloniko
Copy link
Author

Cloniko commented Jan 17, 2018

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']}

@deepbrook
Copy link
Collaborator

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.

@Cloniko
Copy link
Author

Cloniko commented Jan 19, 2018

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']}

@deepbrook
Copy link
Collaborator

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.

@deepbrook
Copy link
Collaborator

@Cloniko , have you heard anything from support ? My ticket's still open, without a response, unfortunately.

@Cloniko
Copy link
Author

Cloniko commented Feb 10, 2018

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.

@deepbrook deepbrook self-assigned this Feb 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants