BTCMarkets / API

API
119 stars 30 forks source link

Please document trading free response #64

Closed mason-larobina closed 6 years ago

mason-larobina commented 6 years ago

Hey folks!

I saw some unexpected fields in the trading fee response:

-> "https://api.btcmarkets.net/account/BTC/AUD/tradingfee"
<- {"success":true,"errorCode":null,"errorMessage":null,"tradingFeeRate":849999,"volume30Day":0}

Can you include an example response in the trading fee section: https://github.com/BTCMarkets/API/wiki/Account-API#get-trading-fee

It's not clear why 'success', 'errorCode', 'errorMessage' fields are present (or if I should ever check them?).

It's also not clear what units the trading fee rate is in.

Thanks!

martin-nginio commented 6 years ago

Hi @mason-larobina ,

Thanks for your feedback.

The current APIs use "success" and "errorCode"/"errorMessage" fields to indicate if the API returned a successful response. In the case of issues (e.g. passing invalid argument) "success":false will be returned and errorCode/Message will provide more information about the cause of the error.

Regards, Martin

mason-larobina commented 6 years ago

Thanks!

gatapia commented 6 years ago

Anyone knows what "tradingFeeRate":849999 means?

Edit: Ok so looking at the fees page we see that basic fees are

0.85% | $0.01 - $500.

So tradingFeeRate is the fee * 1000000