Closed stevenmasci closed 5 years ago
Hi @stevenmasci
Thanks for your feedback.
Please see below for number formats (e.g. price, volume) when working with APIs. https://github.com/BTCMarkets/API/wiki/Trading-API#number-conversion
Please note that the number format has always stayed the same.
Regards, Martin
Thanks for your reply @martin-nginio
Sorry for being vague, yes the app does multiply it by 1E8 as described in that link. I just represented the prices as AUD values in that post.
So the "invalid" create order is being submitted with a price of 13620000 and volume 138108760000
Where as these create orders worked: price: 13650000, volume: 138358700000 price: 14370000, volume: 138608760000
please note that GNT has a minimum order volume as 0.15 or 15000000 (after multiplied by IE8). when submitting orders with less amounts then you will get invalid amount.
I believe this has been the case since introduction of GNT last year.
The order is greater than the minimum order volume.
Any idea why one of the create order requests failed but the other two were successful?
I can confirm that for GNT/AUD market, placing orders with up to 4 decimal points for price should work on both the website and also API. (sorry if the documentation is not clear and generic. )
For instance calling the API to create an order (order to buy with volume of 1.0 ) with the price of 0.1234
(12340000) should work. There is no restriction on the specific price you mentioned 13620000
compared to other prices.
If you are still getting issues with specific order, please can you add all other detail (with exception of private key and signature) and we should be able to investigate further.
Thanks.
Hi @stevenmasci
I'm closing the issue but if you still have questions please let us know.
By the way, we have developed new generation of API that comes with several improvements and new features (including better error handling). Please feel free to check it below and If you have any questions please let us know.
https://api.btcmarkets.net/doc/v3#section/Introduction
Thanks again.
Hi,
When creating an order with the following details I receive the error below.
{"success":false,"errorCode":3,"errorMessage":"Invalid amount.","id":0,"clientRequestId":"XXXXXXX"}
However, previously I have created orders with these details with no issue
I assume "invalid amount" is referring to the price, is this correct?
I've also read on the trading API that states:
But that doesn't explain why it worked previously and why submitting price values of $X.XXXX AUD works on the website.
Any idea whats happening or what I'm doing wrong? Thank you.