Sai
Sai

Reputation: 608

Poloniex API error using postman

  1. Step1-Body enter image description here
  2. Step2-Pre-req script to apply HMACSHA512. enter image description here
  3. Step3-Headers for the POST Request. The hmacd in Step2 is applied to the request as header. enter image description here I am facing a 403 Forbidden { "error": "Invalid API key/secret pair." } as above. Any suggestions to get the hit the right path is appreciated.

Upvotes: 3

Views: 485

Answers (1)

KarsonOdette
KarsonOdette

Reputation: 76

Instead of

var hashInBase64 = CryptoJS.enc.Base64.stringify(hash);
pm.environment.set("hmacd", hashInBase64);

You should use

var hashInHex = CryptoJS.enc.Hex.stringify(hash);
pm.environment.set("hmacd", hashInHex);

As Poloniex uses Hex encoding instead of Base64 encoding for the signature.

Upvotes: 4

Related Questions