-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
I have tripple checked my API key and secret and are correct but still gives me the following error:
errorCode: 301, error: 'API Key must be of length 64.'
const createSignature = function (timestamp, method, url, body) {
let string = timestamp + method + '/v2' + url;
if (Object.keys(body).length !== 0) {
string += JSON.stringify(body);
}
let signature = crypto
.createHmac('sha256', process.env.API_SECRET)
.update(string)
.digest('hex');
return signature;
};var sig = createSignature(Date.now(), 'GET', '/balance', {});
bitvavo.balance(
{
headers: {
'Bitvavo-Access-Key': process.env.API_KEY,
'Bitvavo-Access-Signature': sig,
'Bitvavo-Access-Timestamp': Date.now(),
'Bitvavo-Access-Window': 10000,
},
},
(error, response) => {
if (error === null) {
console.log(response);
} else {
console.log(error);
}
});Note: even without setting the headers it gives me the same error
bitvavo.balance({}, (error, response) => {
if (error === null) {
console.log(response);
} else {
console.log(error);
}
});I can access all other endpoints from the API just fine
timrijkse and Alifar
Metadata
Metadata
Assignees
Labels
No labels