API

Authentication

Production and sandbox mode

All API calls expect an API key. The API key must be sent in an HTTP header named x-api-key.

For development and testing purposes, you can use the API in sandbox mode. This way, you can start playing with the API right away, without sending real funds. Simply use DEADBEEFDEADBEEF as API key to work in sandbox mode!

To use fox.exchange's API in production, you need a personal API key. Please contact us to receive an API key.

Important: If you intend to use the API key in any kind of public environment (for example, client-side code on a website, a mobile app, etc.), you should let us know. We will then enable the secret token feature. This feature requires an additional piece of authentication information, the secret token, to be sent in a header x-secret-token when privileged operations are requested (which should not be accessible by anyone who can get hold of your API key). Currently, the only privileged operation is GET /orders, which lists previous orders.

Differences between production and sandbox mode

In sandbox mode, the following restrictions apply:

  • Rates returned are randomly modified and don't reflect the real rates on the exchange.
  • Orders created in sandbox mode behave in a special way:
    • They have an automated fake lifecycle:
      • Funds will appear as received after one minute.
      • Funds will appear as confirmed after another minute.
      • The transaction will appear as completed after 15 more seconds.
    • They are volatile and may vanish anytime. In general, they will never exist longer than 15 minutes.
    • They will report dummy deposit addresses and transaction IDs.

Rate limiting

To protect our infrastructure from abuse, the API is rate-limited.

In sandbox mode, the rate limit is 30 requests per IP address.

In production mode, a personalized rate limit is set. The default is 100 requests per minute (from any IP), but this limit can be changed by contacting us.

In case you reached the rate limit, you will see responses with HTTP status 429 returned.


Continue reading: Request & Response Formats

Back to documentation overview