BitMEX-nodejs icon indicating copy to clipboard operation
BitMEX-nodejs copied to clipboard

Authentication: Invalid signature

Open lazzrov opened this issue 7 years ago • 1 comments

I'm getting the error message:

{
  "message": "Signature not valid.",
  "name": "HTTPError"
}

for the following code:

const r = require('bitmex-node');

const BITMEX_API_KEY = .....
const BITMEX_API_SECRET = .....

const bitmex = new r.BitmexAPI({
    "apiKeyID": BITMEX_API_KEY,
    "apiKeySecret": BITMEX_API_SECRET
});

!async function () {

    const position = await bitmex.Position
        .get({message: 'messageIncoming' })
        .catch(err => {console.log(err);
        });

}();

lazzrov avatar Dec 29 '18 15:12 lazzrov

Are you using testnet credentials?

Position takes different parameters: { "currency": "XBTUSD" , "columns": ... , "count": ... }

Gblumentals avatar Oct 29 '19 12:10 Gblumentals