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

# API versioning

> Select a REST API contract and pin the request and response format for your integration.

Requests to `https://api.qfex.com` select a contract with the `api_version` query
parameter. A contract defines the request fields, validation, and response format.
The date identifies a published contract; it does not select historical market data.

## Select a version

| Request | Behavior |
| - | - |
| No `api_version` | Uses the latest published contract. |
| `api_version=latest` | Uses the latest published contract. |
| `api_version=2026-10-29` | Pins the request to the `2026-10-29` contract. |

For integrations that need a stable format, send an explicit date on every
request. Requests without a date follow future contract changes automatically.

```sh theme={null}
curl -i 'https://api.qfex.com/md/contracts?api_version=2026-10-29'
```

Keep the endpoint path unchanged. If a URL already has query parameters, append
`&api_version=2026-10-29`. Authentication requirements are the same for every version.

The `Qfex-Api-Version` response header identifies the selected contract, including
when you omit the parameter or send `latest`.

## Supported contracts

| Contract | Reference | OpenAPI |
| - | - | - |
| `2026-10-29` | [Contract guide](https://docs.qfex.com/api-reference/versions/2026-10-29.md) | [JSON](https://api.qfex.com/contracts/2026-10-29/openapi.json) · [YAML](https://api.qfex.com/contracts/2026-10-29/openapi.yaml) |

Only published dates are accepted. Empty, repeated, malformed, or unsupported
`api_version` values return HTTP `400`; the API does not round dates to a release.

## Browse and try a contract

Use the top-level version dropdown to choose **Latest** or a published date,
then open the API Reference tab. **Latest** follows the current
public specification. A dated selection loads that contract's specification and
has its own reference URLs.

> [!WARNING]
>
> Selecting a documentation version does not add a version to your API requests.
> When using the playground or copying a request, explicitly set `api_version` to
> the date you are reading. Leaving it empty sends a request to latest.

The [latest OpenAPI specification](https://api.qfex.com/openapi.yaml) moves with
new releases. Use a dated OpenAPI link from the table above for client generation
against a specific contract. Your generated client must also send the date on
its requests.

## Upgrade an integration

1. Read the [API changelog](https://docs.qfex.com/websocket/changelog.md) and the target contract's reference.
2. Update your request construction and response parsing for the target contract.
3. Test requests with the target `api_version`, including validation and error handling.
4. Change the pinned date in your integration once those checks pass.

Versioning preserves the selected wire contract. Responses still reflect current
market and account state, and requests run current business logic.

## Scope

This parameter applies to the REST API on `api.qfex.com`. The
[Funding API](https://docs.qfex.com/api-reference/programmatic-funding.md) on `banker.qfex.com` and the
[WebSocket API](https://docs.qfex.com/websocket/main.md) have separate interfaces and do not use this
version selector. Health checks and dated contract metadata URLs are outside
query-based contract selection.


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