Using HTTP node for Kraken API with encrypted signature

Description

I want to use Kraken API that require an API signature using encryption (Kraken REST API Documentation) in order to track orders and to generate automatic orders based on some conditions.

I’m confident that my workflow is right for the following components:

  • nonce creation based on current date/time is fine
  • python code for encryption and encoding is fine
  • API key is valid and can be used based on my settings on kraken account
  • HTTP node is fine as the payload is received as long as I’m not using more than 1 parameter

Problem

When I try to use an API endpoint with multiple parameters, I get an error (0: EAPI:Invalid key). This error code is the same for all endpoints where I want to use more than the nonce parameter in the body. Of course, the API key is valid as I’m using the same key for other endpoints, and, for testing purposes, I’m also using the same key on the same endpoint with only nonce parameter set-up.

  • I’ve been trying to change parameter order as n8n HTTP node seems to reorder parameters by alphabetical order automatically, but same error.
  • I’ve tried with the parameter as parameter instead of body and it did not worked
  • I’ve tried multiple endpoints

Anyone got experience with Kraken API or coinbase as their API works with similar security system base on encrypted signature.

Information on your n8n setup

  • n8n version: 1.1.1
  • Running n8n via: npm
  • Operating system: linux Debian (AWS ec2)

Thanks for your help, Rémi

  • I’ve been trying to change parameter order as n8n HTTP node seems to reorder parameters by alphabetical order automatically, but same error.

Hi @Remi_BAUBY, I don’t have experience with this particular service, but if the parameter order is the problem you could consider sending a JSON body instead of individual parameters like so:

In this example, foo will always be the first parameter, despite bar coming first in alphabetical order. You can verify this by sending your request to a service such as webhook.site showing the incoming request:

image