Author

Topic: Cryptsy API help (Read 535 times)

full member
Activity: 213
Merit: 100
August 04, 2015, 09:20:14 PM
#3
I'm not sure if that's correct. This is my hmac function: https://gist.github.com/anonymous/23f2597b19da01f36297

And, for example, this is what it returns: Br7UX6pke+gzxmEP8HUFXzNuIqPJlU+qfqMZiXeJ7N3oZ+fynQZ3g1D12nxNHFZDo0KWZZZ+Qxy4K7+OlUHBFw==

I don't think I need to change it into hexadecimal, I tried using your function and I get the same error.
sr. member
Activity: 392
Merit: 268
Tips welcomed: 1CF4GhXX1RhCaGzWztgE1YZZUcSpoqTbsJ
August 04, 2015, 06:44:05 PM
#2
Please also show the code of generateHMAC, with any private API keys removed/replaced with placeholders.

Edit: I dug up some old code. Here's how I've been doing it:

https://gist.github.com/hexafraction/83ffdf08ed7b44d004b9

In order to construct the parameter 'data', I've been creating a POST parameter string by way of String.format:

Code:
String params = String.format("foo=%s&bar=%s&number=%d", valOfFoo, valOfBar, System.currentTimeMillis());

This ensures that the parameters are in the same order as would be expected with HMAC.
full member
Activity: 213
Merit: 100
August 04, 2015, 03:59:03 PM
#1
Hey guys,

I'm trying to use the Cryptsy API and everything seems to be working except for the methods that require authentication...

Here is my current code: https://gist.github.com/anonymous/8c128bdab19b44eec2f7

Yet everytime I receive this response: {"success":false,"error":["Must be authenticated"]}

Can someone please help me, I cannot for the life of me figure out what I'm doing wrong.
Jump to: