I've signed up with ANXBTC.com and I'm trying to learn the API (based off MTGOX v2 API):


In order to issue commands, there needs to be authentication.

I have a "Rest-Key", but I have no idea how to generate/find a "Rest-Sign".

On the link above, it says that "Rest-Sign is an HMAC hash constructed from your API secret, your API method path, your post data, and uses the SHA-512 algorithm."

Also on the above link, there is sample code (PHP, python etc) which can be tested - however it needs both the Rest-Key and Rest-Sign.

Part 2: Are these APIs meant to be run solely off a personal computer, or can it be used online? Eventually I want to try and create a website form where I can show the current exchange rate, as well as place orders. Is that possible?

If anyone has insight, help is greatly appreciated.

Thanks, Michael

1 Answer 1



To generate the Rest-Sign header, use the following code (example in PHP):

Rest-Sign function

 function hmac_512($msg, $secret)
        $secret = base64_decode($secret);
        $result = hash_hmac('sha512', $msg, $secret, true);
        return base64_encode($result);

Rest-Sign inputs $post_data should be an array with a nonce and any relevant API post data, and $api_path should be the portion of the API after https://anxbtc.com/api/2/ that you are calling.

       $post_data_encoded = http_build_query($post_data);
       $msg = $api_path . "\0" . $post_data_encoded;
       $rest_sign = $this->hmac_512($msg, $api_secret);

Regarding your second question, you can run this API from your personal computer or a server.

Hope this helps,



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.