> ## Documentation Index
> Fetch the complete documentation index at: https://exchanger-api.iexexchanger.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Request and response format

> Send Exchanger API JSON requests, read responses and errors, preserve decimal precision, and retrieve lists using filters, pages, or cursors.

Send Exchanger API requests over HTTPS to your exchanger's domain under `/api/v3`. Check the address in the [quickstart](https://exchanger-api.iexexchanger.com/en/start/quickstart.md). For requests under `/api/v3/private`, include the Bearer token and an [HMAC v2 signature](https://exchanger-api.iexexchanger.com/en/start/authentication.md).

## Send a request

1. Find the method, path, and fields in the [API reference](https://exchanger-api.iexexchanger.com/en/api.md).
2. Set `Accept: application/json`. For a JSON body, set `Content-Type: application/json`. For file uploads, send multipart as specified by the operation.
3. For a private request, sign the actual request bytes or [the contents of the file](https://exchanger-api.iexexchanger.com/en/start/authentication.md#json-and-file-uploads).

The default JSON body limit is 1 MiB (1,048,576 bytes). The exchanger can configure a different limit. The API returns `413 http_error` when the body exceeds it. Multipart uses the upload operation's limits. See [files and verification](https://exchanger-api.iexexchanger.com/en/guides/exchange/files-and-verifications.md).

## Response format

Check the HTTP status first. In JSON, `state: 0` means success and `result` contains the operation's data. For example, `GET /api/v3/ping` returns a response like this.

```json theme={null}
{
  "state": 0,
  "message": "OK",
  "result": {
    "status": "ok",
    "site_name": "iEXExchanger",
    "time": "2026-01-01T12:00:00+00:00"
  },
  "meta": {
    "request_id": "9d0fb640-3af1-4b1d-9392-108dd39d2464",
    "correlation_id": "9d0fb640-3af1-4b1d-9392-108dd39d2464",
    "timestamp": "2026-01-01T12:00:00.125000Z"
  }
}
```

When `state: 1`, the top-level `code` matches the HTTP status. Use `error.code` in your application and display `message` to the user. The fields in `error.details` depend on the error. See [errors and retries](https://exchanger-api.iexexchanger.com/en/guides/reliability/errors.md).

Private responses include `Cache-Control: private, no-store`. On `429`, check `error.code`. For a rate limit, follow `Retry-After`. When a quota is exhausted, check its reset time. See [API errors](https://exchanger-api.iexexchanger.com/en/guides/reliability/errors.md) for IP and key limits.

The `/api/v3` prefix selects the route version. Check `X-Api-Version` in the response to confirm it. `X-Api-Signature-Version: v2` identifies the request signing protocol. Use `GET /api/v3/public/contracts` on your exchanger to check individual contract versions. See [production readiness](https://exchanger-api.iexexchanger.com/en/guides/reliability/production.md).

On a `401` response the API sends a `WWW-Authenticate` challenge. Its default is `Bearer realm="exchanger-api"`. Read `error.code` for the reason, including signature errors.

## Amounts, dates, and content types

Send amounts as decimal strings with a period, such as `"1250.005"`. Use the operation's schema to read amounts and rates. Use decimal arithmetic for calculations. In JavaScript, keep amounts as strings or pass them to a decimal library.

Dates generally use ISO 8601. Use the time zone in the string. Preserve `null` as a distinct value for nullable fields.

## Tracing and locale

1. Set `X-Request-Id` for one HTTP attempt. Use a UUID or a string of up to 128 ASCII characters. Start with a letter or digit, then use letters, digits, `.`, `_`, `:`, or `-`.
2. Set `X-Correlation-Id` in the same format to trace the requests and webhook for one operation. The API returns both IDs in the response headers and `meta`. When no valid request ID is provided, the API generates a UUID. Without a valid correlation ID, the request ID is used.
3. To choose a locale, use `?locale=ru` or `X-Locale: ru`. The API checks for a supported `locale` query value first, then `X-Locale`. For a private request, it next uses the account's language when there is no explicit choice. It then considers `Accept-Language` and the application's default language. When signing, include `locale` in the canonical query if it is present in the URL.

## Lists and pagination

Check each operation's supported parameters in the [reference](https://exchanger-api.iexexchanger.com/en/api.md). For operations with `per_page`, use an integer from 1 to 100. The default is 25.

1. **Pages.** Start with `page=1&per_page=25`. You can specify `pagination=page`. Increment `page` while `meta.pagination.has_more` is `true`. Read `total` and `last_page` from `meta.pagination`.
2. **Cursor.** When the operation supports cursors, start with `pagination=cursor&per_page=25`. For the next batch, use the full `meta.pagination.next_cursor` as `cursor` and retain the filters and sort direction. Stop at `next_cursor: null` or `has_more: false`.

Cursor mode supports `sort=id` or `sort=-id`. The first batch defaults to descending ID. If you omit `sort` on later requests, the cursor supplies the direction. An incompatible direction or combining a cursor with explicit `pagination=page` returns `invalid_cursor`.

### Filters and sorting

Use `filter[field]=value` for one condition. Filters on different fields combine with AND. For multiple values of a supported field, send a list such as `filter[status][0]=paid&filter[status][1]=completed`.

Pass comma-separated `sort` fields. Prefix a field with `-` for descending order. This signed request asks for paid orders, newest first.

```http theme={null}
GET /api/v3/private/orders?page=1&per_page=25&filter%5Bstatus%5D=paid&sort=-created_at,id
```

When present, `meta.filters` and `meta.sort` show the applied settings. Unsupported fields and malformed filters return `invalid_filter`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.