in reply to Re^7: Invalid nonce
in thread Invalid nonce
The string you compute for your signature does not match the string from the example code.
For debugging, print out the string you compute the signature over, and compare that to the example code string.
message = 'BITSTAMP ' + api_key + \ 'POST' + \ 'www.bitstamp.net' + \ '/api/v2/user_transactions/' + \ '' + \ content_type + \ nonce + \ timestamp + \ 'v2' + \ payload_string
Your code should be:
my $msg = $apiKey.'POST'.$urlcb.$urlpath.$ContentType.$nonce.$timestam +p.$API_Version.$Query, $apiSecret; print "Computing signature over [$msg]\n"; my $signature = hmac_sha256_hex($msg, $apiSecret);
Then, compare the output of that part with the message as it is constructed in the documentation. There are differences between the two.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: Invalid nonce
by frank1 (Monk) on Jul 20, 2024 at 12:11 UTC | |
by Corion (Patriarch) on Jul 21, 2024 at 05:00 UTC | |
by frank1 (Monk) on Aug 20, 2024 at 19:23 UTC | |
by hippo (Archbishop) on Aug 21, 2024 at 10:28 UTC | |
by Corion (Patriarch) on Aug 21, 2024 at 16:12 UTC | |
by cavac (Prior) on Aug 21, 2024 at 06:19 UTC | |
by frank1 (Monk) on Aug 21, 2024 at 12:45 UTC |