# Client context

Product: Client Trade API
Guides follow API reference 0.3.0 and event reference 0.2.0.
Canonical page: https://docs.axiym.io/trade-api/integration-guide/client-context

Every Client Trade API business operation is performed on behalf of an onboarded
client. Your partner access token remains the same; `clientId` in the path
selects the resource owner.

Read [Clients and onboarding](/trade-api/concepts/client-scope) before
implementing this guide.

## 1. Store the client identifier

Store the Axiym-issued `clientId` provided through your onboarding process.
Use [List clients](/trade-api/api-reference/0.3.0/clients/listClients) to
reconcile your client records with Axiym, or [Get
client](/trade-api/api-reference/0.3.0/clients/getClient) to check one client's
current status. Attach the identifier to each account, conversion pair,
address book entry, deposit, conversion, withdrawal, event, and
reconciliation record.

## 2. Discover resources for that client

List the client's address book entries, Axiym accounts, and conversion
pairs. These responses define the resources and capabilities available in that
client context.

Do not copy permissions or identifiers from another client.

## 3. Keep ownership consistent

* Deposit from an external account registered for the same client.
* Use deposit instructions from that client's receiving Axiym account.
* Convert using a `pairId` returned for that client.
* Withdraw using an Axiym account and `destinationId` belonging to that client.

## 4. Retry in the same context

Keep the `clientId`, endpoint, request body, and `Idempotency-Key` unchanged
when retrying a state-changing request.

## 5. Reconcile by client

Retrieve statements and related resources through the same client's paths.
Route partnership webhook events using their `clientId`, then fetch the
authoritative resource from the endpoint under `/clients/{clientId}`.
