Hello i am developing a bot in python using the polonix api
I am trying to make request to private api the server reply my this error message: {'error': 'Invalid command.'}
this is my code someone coudl help me to fix it? is all the day that i try but It still dosent works!!!
def getOpenOrders(self,url,comand, market):
nonce = int(time.time())
print(comand)
urlrequest = url + '?apikey=' + self.apiKey +'&command='+comand + '&nonce=' +str(nonce) + '&market=' + str(market)
print(urlrequest)
param = 'command='+comand + 'nonce=' +str(nonce) +str(market)
signature = hmac.new(self.Secret.encode(),param.encode(), hashlib.sha512).hexdigest()
headers = {
'Sign':signature,
'Key': self.apiKey
}
self.r = requests.post(urlrequest,headers= headers,)
print(self.r)
print(self.r.json())
I think there is problem with the signature but i dont know where.
ps this is the official documentation
https://temp.poloniex.com/support/api/