Can't get basic authentication working or other issue #226
-
I feel like an idiot. I copied the demo code for API V2 here: and here in a separate file: I am having issues getting things to work in each of those examples. In the
unless I delete that whole section. Once that's fixed, I get errors on authentication checks. My keys are fine. I just created the key for this today. On Attempted "sell" code: `await client_auth.send_message(
)` I managed to get it to run without an error and it returned "None" as a message... I think. My output was "None," but I don't know if it was the response from Kraken or not. More changes using other example code in the readthedocs.io site left me with a number of errors that evenutally leads me to believe the keys aren't being passed or I'm not authenticated. How do I get authenticated? I have my Public and Private keys in their fields. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Update... attempting to ignore the above and do REST I get the following issues. I realize this might need to be broken up into individual threads, but I'm also not sure if it's a single issue (installation, corrupted install, something I'm missing that is causing multiple issues) that is affecting multiple points or if there are separate issues. I can't imagine it being this many separate issues though because I don't see other issues on simple tasks like this in the QA tags here, and I would expect a lot of threads if there were "a lot of issues," but python-kraken-sdk seems to be made very well... just not running well on my computers.
Gives the following:
Taking volume out gives the following:
|
Beta Was this translation helpful? Give feedback.
-
Hey @mdrich-com, thanks for reaching out! which version of the python-kraken-sdk are you using? v2.2.0 is the latest version which I'm using below. I just tried both template bots you mentioned at https://python-kraken-sdk.readthedocs.io/en/stable/src/examples/trading_bot_templates/spot_bot_templates.html and they just run through. You may forgot to provide the environment variables SPOT_API_KEY and SPOT_SECRET_KEY (https://github.com/btschwertfeger/python-kraken-sdk/blob/v2.2.0/examples/spot_trading_bot_template_v2.py#L235-L236)? SPOT_API_KEY=<our-public-key> SPOT_SECRET_KEY=<your-secret-key> python3 examples/spot_trading_bot_template_v2.py
2024/06/05 05:30:24 spot_trading_bot_template_v2,line: 210 INFO | Client credentials are valid.
2024/06/05 05:30:24 connectors,line: 191 INFO | Websocket start connect/reconnect
2024/06/05 05:30:24 connectors,line: 191 INFO | Websocket start connect/reconnect
2024/06/05 05:30:25 connectors,line: 514 INFO | Recover authenticated subscriptions []: waiting
2024/06/05 05:30:25 connectors,line: 121 INFO | Websocket connected!
2024/06/05 05:30:25 connectors,line: 521 INFO | Recover authenticated subscriptions []: done
2024/06/05 05:30:25 spot_trading_bot_template_v2,line: 76 INFO | {'channel': 'status', 'data': [{'api_version': 'v2', 'connection_id': 9218230092259195900, 'system': 'online', 'version': '2.0.5'}], 'type': 'update'}
2024/06/05 05:30:26 connectors,line: 514 INFO | Recover public subscriptions []: waiting
2024/06/05 05:30:27 connectors,line: 121 INFO | Websocket connected!
2024/06/05 05:30:27 connectors,line: 521 INFO | Recover public subscriptions []: done
2024/06/05 05:30:27 spot_trading_bot_template_v2,line: 76 INFO | {'channel': 'status', 'data': [{'api_version': 'v2', 'connection_id': 16948663002661699511, 'system': 'online', 'version': '2.0.5'}], 'type': 'update'} Alternativly you can just hardcode the API keys if passing via the environment is not the desired way. About the For your error regarding the volume - of course, the volume is required when placing an order. I'm not 100% sure why you experience this error but It may has to do with the size of your order. Kraken's error messages are not that good and not consistent in any case. One can't open an order with this small volume (1x1DOGE=$1). You can review the minimum order sizes here: https://support.kraken.com/hc/en-us/articles/205893708-Minimum-order-size-volume-for-trading or get them via |
Beta Was this translation helpful? Give feedback.
Hey @mdrich-com, thanks for reaching out!
which version of the python-kraken-sdk are you using? v2.2.0 is the latest version which I'm using below.
I just tried both template bots you mentioned at https://python-kraken-sdk.readthedocs.io/en/stable/src/examples/trading_bot_templates/spot_bot_templates.html and they just run through.
You may forgot to provide the environment variables SPOT_API_KEY and SPOT_SECRET_KEY (https://github.com/btschwertfeger/python-kraken-sdk/blob/v2.2.0/examples/spot_trading_bot_template_v2.py#L235-L236)?