/api/v3. Check the address in the quickstart. For requests under /api/v3/private, include the Bearer token and an HMAC v2 signature.
Send a request
- Find the method, path, and fields in the API reference.
- Set
Accept: application/json. For a JSON body, setContent-Type: application/json. For file uploads, send multipart as specified by the operation. - For a private request, sign the actual request bytes or the contents of the file.
413 http_error when the body exceeds it. Multipart uses the upload operation’s limits. See files and verification.
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.
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.
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 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.
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
- Set
X-Request-Idfor 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-. - Set
X-Correlation-Idin the same format to trace the requests and webhook for one operation. The API returns both IDs in the response headers andmeta. When no valid request ID is provided, the API generates a UUID. Without a valid correlation ID, the request ID is used. - To choose a locale, use
?locale=ruorX-Locale: ru. The API checks for a supportedlocalequery value first, thenX-Locale. For a private request, it next uses the account’s language when there is no explicit choice. It then considersAccept-Languageand the application’s default language. When signing, includelocalein the canonical query if it is present in the URL.
Lists and pagination
Check each operation’s supported parameters in the reference. For operations withper_page, use an integer from 1 to 100. The default is 25.
- Pages. Start with
page=1&per_page=25. You can specifypagination=page. Incrementpagewhilemeta.pagination.has_moreistrue. Readtotalandlast_pagefrommeta.pagination. - Cursor. When the operation supports cursors, start with
pagination=cursor&per_page=25. For the next batch, use the fullmeta.pagination.next_cursorascursorand retain the filters and sort direction. Stop atnext_cursor: nullorhas_more: false.
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
Usefilter[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.
meta.filters and meta.sort show the applied settings. Unsupported fields and malformed filters return invalid_filter.