Skip to content
martin-nginio edited this page May 22, 2019 · 15 revisions

Are there any restrictions on API calls?

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.

Default limit: 50 calls per 10 seconds

  • /order/open

  • /order/cancel

  • /order/detail

  • /account/balance

  • /market/{instrument}/{currency}/tick

  • /market/{instrument}/{currency}/orderbook

  • /market/{instrument}/{currency}/trades

Lower limit: 20 calls per 10 seconds

  • /order/create
  • /order/history
  • /order/trade/history
  • /account/tradingfee
  • /fundtransfer/withdrawEFT
  • /fundtransfer/withdrawCrypto

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.

Why Do I Get a Cloudflare Message When Attempting To Access the API?

Make sure you have a valid user agent set in your code.

Why do some of my requests like order creation fail authentication while others do not?

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.

Why are the numbers returned by the API so large?

The API does not use decimals, so the numbers returned are in the converted format mentioned in the question above.

Error handling

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:

list of error codes

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 detail about 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)

Introduction updated 9/28/18

Authentication

Pagination

WebSocket v2

WebSocket v1 deprecated

Market Data API updated 7/24/19

Trading API updated 08/19/19

Transaction API

Account API updated 3/14/19

Fund Transfer API updated 08/06/19

FAQ

Clone this wiki locally