BTCMarkets / API

API
120 stars 30 forks source link

API V3 get ticker 400 response #177

Closed 2pd closed 5 years ago

2pd commented 5 years ago

In https://api.btcmarkets.net/doc/v3#tag/Market-data-APIs/paths/~1v3~1markets~1{marketId}~1ticker/get

There is another response when market pair is not existing


curl -v https://api.btcmarkets.net/v3/markets/BTC/ticker

...
* Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
< HTTP/2 400
< date: Sat, 02 Nov 2019 11:27:32 GMT
< content-type: application/json;charset=UTF-8
....

{"code":"InvalidMarketId","message":"invalid marketId"}
martin-nginio commented 5 years ago

Hi @2pd

Thanks for your feedback.

The error code for invalid market Id was incorrect indeed (when marketId is part of the resource path) and we have just fixed it today. It now returns http error 404 and MarketNotFound error code.

Thanks.

Regards, Martin