Bitcoin Forum
May 14, 2024, 07:51:12 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Cryptsy API authentication error  (Read 478 times)
Veggy Toe (OP)
Newbie
*
Offline Offline

Activity: 2
Merit: 0


View Profile
January 26, 2014, 04:32:19 PM
 #1

So I'm having a problem authenticating on the cryptsy api (with python) here's my code:

            req['method'] = method # in this case, method is getinfo
            req['nonce'] = int(time.time())
            post_data = urllib.urlencode(req)
            sign = hmac.new(self.Secret, post_data, hashlib.sha512).hexdigest()
            headers = {
                'Sign': sign,
                'Key': self.APIKey
            }

            try:
                ret = urllib2.urlopen(urllib2.Request('https://www.cryptsy.com/api', post_data, headers))
                jsonRet = json.loads(ret.read())
                return self.post_process(jsonRet)
            except:
                print "server unresponsive"

and it's returning as unsuccessful.  Thank you in advance  Smiley
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!