SOS get open orders
Hello i am a young developer this is my first time with the api of poloniex, I am developing a python bot for Poloniex , but is all the day that i try to make a request to get the open order but it fails!! My code is very similar to your but I dont know, why it dosent works the request status is 200 but this is the reply: {'error': 'Invalid command.'}
this is my code:
Returns open orders for a given market
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. coudl you help me?
,
maybe it can help you :https://github.com/s4w3d0ff/python-poloniex
2016-09-29 8:00 GMT+08:00 Emanuele Cesari [email protected]:
Hello i am a young developer this is my first time with the api of poloniex, I am developing a python bot for Poloniex , but is all the day that i try to make a request to get the open order but it fails!! My code is very similar to your but I dont know, why it dosent works the request status is 200 but this is the reply: {'error': 'Invalid command.'}
this is my code: Returns open orders for a given market
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. coudl you help me?
,
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lra/poloniex/issues/3, or mute the thread https://github.com/notifications/unsubscribe-auth/AEMq1lzO4KqvN9mJvcSJKG7schX4bblyks5quv-xgaJpZM4KJcZn .
still problem with my code :(