You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am having the following code in index.js and I'm trying to call a private api endpoint:
constkey='FWdFaXOLt8B4ihmGC6a....4kTEMH8LffmLWt';// API Keyconstsecret='fo1Ck2I5VRwqZBWcE1FCcwqdqC....IReqqwd8C9r...A==';// API Private KeyconstKrakenClient=require('kraken-api');constkraken=newKrakenClient(key,secret');(async()=>{try{// Display user's balanceconsole.log(awaitkraken.api('Balance'));// Get Ticker Infoconsole.log(awaitkraken.api('Ticker',{pair : 'XXBTZUSD'}));}catch(e){console.log(e);}})();
When I run node index.js;
Expected
To read the Balance
Result
Error: General:Permission denied
at rawRequest (home/me/worpskace/project-kraken/node_modules/kraken-api/kraken.js:54:9)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:160:7)
Problem
I am having the following code in
index.js
and I'm trying to call a private api endpoint:When I run
node index.js
;Expected
To read the Balance
Result
Reproduction:
Version used :
[email protected]
Node:
v9.6.0
Npm:
5.6.0
Extract an API key with read permissions.
The text was updated successfully, but these errors were encountered: