-
Notifications
You must be signed in to change notification settings - Fork 30
faq
Users can call any public or private APIs and below limits are enforced. For private APIs the limit is based on API key and for public APIs the limit is based on the IP address.
We may decide to change those limits or add new ones depending on usage patterns and traffic.
By default and if not specified, all APIs (public or private endpoints) are rate limited at 50 calls per 10 seconds.
/order/create
The following APIs allow higher limit given the requirement of automated trading bots. They are rate limited at 100 calls per 10 seconds:
/market/{instrument}/{currency}/tick
/market/{instrument}/{currency}/orderbook
/market/{instrument}/{currency}/trades
/v2/market/{instrument}/{currency}/trades
In case if your application is calling above APIs with higher rate then you will receive the following error message:
Throttle limit exceeded.
If you have specific requirements please contact our support desk.
Make sure you have a valid user agent set in your code.
All numbers, specifically for price and volume, must be converted to an integer for use in API requests. The conversion is 100000000, or 1E8. For strongly typed programming languages, use of integer variable types is strongly recommended, as decimals will not be accepted by the API.
The API does not use decimals, so the numbers returned are in the converted format mentioned in the question above.
All API calls return the following 3 attributes as part of the response:
success
, errorCode
, errorMessage
success
is a boolean attribute and represents if the API call was successful or not. If it's true
then errorCode
and errorMessage
will be null. When success
is false
then errorCode
and errorMessage
attributes should have values as per below:
errorCode
is an integer number with the following values
- 1: Authentication errors (see authentication for more detail)
- 2: Authorization errors (your api key is does not have enough permission to access specific resource)
-
3: Input validation errors (e.g.
invalid amount
or order type or currency input) - 4: Insufficient funds
- 5: Internal server errors (error happed at BTC Markets' servers)
- 6: Throttle error (see call limits for more detail)
- 7: Resource not found
In above cases, the errorMessage
attribute provides more information about the the underlying issue (e.g. in case of authentication issue due to the requesting sending an invalid time stamp, you will get appropriate message that can be useful for troubleshooting).
- Note: 08/15/2019
Whilst
errorMessage
above provided detail in some cases, however also in some other cases it only provided generic error message (e.g. Invalid argument.) which is not so helpful when troubleshooting.
We have recently added a new attribute called errorDetail
that appears part of the response and provides more detail about the underlying error. For instance when receiving response code of 3
and errorMessage: invalid argument.
it was difficult to determine exactly what argument/input would have been wrong. Now errorDetail
would provide more description (e.g. invalid currency).
Introduction updated 9/28/18
WebSocket v1 deprecated
Market Data API updated 7/24/19
Trading API updated 08/19/19
Account API updated 3/14/19
Fund Transfer API updated 08/06/19