Node-RED node to interact with Kraken.
Run the following command in the root directory of your Node-RED instance:
npm install --save node-red-contrib-kraken
This is a Kraken API client node. It makes API requests by sending msg.payload
data to the specified API endpoint and outputs the response data as msg.payload
.
You first need to create a new API Key:
- Go to API Key Management on your Kraken account
- Click the
Generate New Key
button - Enter a description and set permissions based on what API methods you'd execute
- Click the
Generate Key
button
Now you need to configure your Kraken client:
- Open your Node-RED instance
- Drag & drop the
kraken api
node from the palette to the workspace and double-click on it, to open the node editor - In the
Client
dropdown menu pick theAdd New kraken-api-config
option and press the pencil button at the right to add a new API configuration - Copy-paste
API Key
andPrivate Key
from the key page on Kraken to the node editor - Push
Update
To make requests using the kraken-api
node, you need to pick the api method the node will call. This can be either specified in the node settings, or provided in msg.method
(if the method set to "via msg.method"). And msg.payload
is the api input data.
After executing a request the node returns a message with the response data set to msg.payload
.
This example enables to get your account balance by clicking the inject button. The "Balance Data" node outputs your balance data to Debug window.
Flow json for Node-RED: kraken-getting-balance.json
This example implements a simple way to add pre-configured (in the "🔨 Order params" node) orders by clicking the inject button. The "Order Confirmation" node outputs the order description info to Debug window.
Flow json for Node-RED: kraken-adding-orders.json
Kraken API Reference: https://www.kraken.com/features/api
[Donate] Thank you for your support! 🙌
Build & Test in Watch mode:
yarn dev
Read Node-RED docs on how to install the node set into your Node-RED runtime.
MIT © Alex Kaul