Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API:Invalid signature #52

Open
kopax opened this issue Mar 11, 2018 · 1 comment
Open

API:Invalid signature #52

kopax opened this issue Mar 11, 2018 · 1 comment

Comments

@kopax
Copy link

kopax commented Mar 11, 2018

Problem

I am having the following code in index.js and I'm trying to call a private api endpoint:

const key          = 'FWdFaXOLt8B4ihmGC6a....4kTEMH8LffmLWt'; // API Key
const secret       = 'fo1Ck2I5VRwqZBWcE1FCcwqdqC....IReqqwd8C9r...A=='; // API Private Key
const KrakenClient = require('kraken-api');
const kraken       = new KrakenClient(key, secret');
(async () => {
	try {
		// Display user's balance
		console.log(await kraken.api('Balance'));
		// Get Ticker Info
		console.log(await kraken.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)

Reproduction:

Version used : [email protected]
Node: v9.6.0
Npm: 5.6.0

Extract an API key with read permissions.

@hackmin
Copy link

hackmin commented Aug 16, 2018

It could be the 2 factor authentification. I have the same issue meanwhile the same code worked before double authent. Did you resolve that ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants