我想用C来验证我自己-CEX.com网站,访问测试account's wallet information。在
我仔细地遵循了the documentation,并在web上搜索了示例代码,但是没有任何效果(除了this过时的库),结果总是这样:
>>>make_sign_and_request('getbalances')
{'success': False, 'result': None, 'message': 'INVALID_SIGNATURE'}
整个过程更加复杂,因为似乎找不到Python示例,and authentication is explained in PHP only(我下面的代码就是基于这个例子)。在
我的签名功能:
^{pr2}$现在,我不是PHP
向导,但我很有信心在python中非常准确地复制了代码。嗯,显然不行,否则这个信号会被接受的。在
api密钥已启用,应按预期工作。在
预期结果应该如下所示,according to the documentation:
{"success":true,"message":"","result":{"Currency":"BTC","Balance":0.00000000,"Available":0,"Pending":0.00000000,"CryptoAddress":""}}
问题已解决:
在
hmac
对象上添加对hexdigest()
的调用可以解决此问题。在相关问题 更多 >
编程相关推荐