Closed camstuart closed 4 years ago
Hi @camstuart ,
Thanks for bringing this up. I'm adding it as a topic of consideration for our dev team, and I'll let you know (as well as update the documentation, if needed) as soon as I have an answer.
Regards, Justin
Is there an update on this issue? I have just started to use to API and find that I also get a 200 when my authentication is incorrect.
Hi @camstuart and @Yoosh94
Thank you for your patience.
We are now releasing a new generation of API that is more compatible with REST guidelines in general (e.g. correct http status codes) and delivers several other improvements so I'd encourage you to take a look.
https://api.btcmarkets.net/doc/v3#section/Introduction
Thanks for your feedback agian.
Regards, Martin
closing the issue.
Hi,
I'm writing a client in Go, a strongly typed language. (IE requires me to specify the request and response structures of 'structs' made up of primitive data types)
So when I make a request to an endpoint such as
/account/balance
I am expecting a particular json response structure such as:Along with a
200
http status codeHowever, if I have not encoded the request correctly (an issue regarding timestamp at my end), I will get a response structure of:
But the http status code is still
200
.In this scenario I would expect a http status of
401
. Which would allow me to decode the message structure accordingly.Go requires the response json to conform to a declared
struct
type. In my software, I would like to decode the response json to a structure based on the response code.200
-> decode message as expected401
-> decode message with error style response and handle accordingly