BTCMarkets / API

API
120 stars 30 forks source link

API v3 InvalidAuthSignature on accounts/me/transactions path #176

Closed jbcl-io closed 5 years ago

jbcl-io commented 5 years ago

I'm getting { code: 'InvalidAuthSignature', message: 'invalid signature' } response when GET-ing https://api.btcmarkets.net/v3/accounts/me/transactions?assetName=BTC&limit=10.

Keys are correct and signature is also signed correctly. I can call other paths such as

https://api.btcmarkets.net/v3/markets and https://api.btcmarkets.net/v3/markets/tickers?marketId=BTC-AUD.

Both of those return success.

What am I doing wrong here? Maybe it has something to do with pagination?

jbcl-io commented 5 years ago

Looks like calling anything under accounts/me/* responds with the error.

martin-nginio commented 5 years ago

Hi @jeffbocala

Thanks for your feedback.

This is probably due to how string to sign is created when building the authentication signature. please note the string to sign is "GET" + path + timestamp and the path here does not include query string.

Alternatively, we have sample authentication code in few programming languages here: https://github.com/BTCMarkets

Also, feel free to share code snippet (only parts of the code that can be shared publicly) and we will try to help.

Thanks.

Regards, Martin

martin-nginio commented 5 years ago

I assume you can call other private APIs fine (e.g. v3/markets is a public and does not need authentication)

jbcl-io commented 5 years ago

@martin-nginio — ah yes that would be because of the path part of the message string not being correct. Thank you for your help 👍