Abhishek
Abhishek

Reputation: 637

Poloniex api 403 error

I am using this code to write a bottrader,in python3 (converted 2to3) https://pastebin.com/fbkheaRb

except that i have change secret string and post_data string to byte

sign = hmac.new(self.Secret.encode("ASCII"), post_data.encode("ASCII"), hashlib.sha512).hexdigest()

but getting below error

urllib.error.HTTPError: HTTP Error 403: Forbidden

have checked key and secret key multiple time and it is correct Also deleted the existing key and created new Also relaxed all IP

then also got the same problem, please help

Upvotes: 1

Views: 1082

Answers (1)

A. STEFANI
A. STEFANI

Reputation: 6737

You don't need to encode to ASCII, so you may try:

sign = hmac.new(self.Secret, post_data, hashlib.sha512).hexdigest()

Upvotes: 1

Related Questions