# Integrate using AI

Use Axiym documentation and an optional integration prompt with your coding agent.

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/integrate-with-ai

Use the sources below with your coding agent to build a Client Trade API integration.

## AI-readable documentation

| Source                                                        | Use it for                                                                                      |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| [Client Trade API llms.txt](/trade-api/llms.txt)              | Finding guides, references and available versions.                                              |
| [Markdown pages](/trade-api/integration-guide/quick-start.md) | Reading guides and examples. Use **View Markdown** or append `.md` to a documentation page URL. |
| [OpenAPI contracts](/trade-api/api-reference#downloads)       | Versioned operations and request/response schemas.                                              |

Markdown is generated from the same sources as this site. Give your agent the
relevant links; `llms.txt` is not automatically read by every tool. If it cannot
fetch a page, paste the Markdown instead.

## Describe one feature at a time

Include your feature goal and application constraints. For example:

> Add Client Trade API balance viewing to our client dashboard. Keep each
> client's resources isolated and follow our existing backend authorization
> and UI patterns.

For larger integrations, work incrementally through client onboarding, account
discovery, conversion confirmation, and withdrawals.

## Optional integration prompt

Copy the prompt into your coding agent with your repository open. Add your
feature goal; the prompt supplies documentation links and Client Trade API guidance.

**AI assistance does not guarantee a correct integration**

Generated code may contain errors or miss requirements. Review it against
the API documentation and validate it in the sandbox before production use.
This prompt does not validate or certify your integration.



```text
Help me integrate the Axiym Client Trade API into the application in this repository.

Implement only the feature I describe alongside this prompt. If I have not supplied a feature goal, ask what I want to build before choosing the scope. Follow the application's existing architecture and conventions.

## Start with the application

Inspect the repository's instructions, language, framework, HTTP client, configuration, authentication and authorization, persistence, background jobs, and tests. Find any existing Axiym integration before adding another one. Reuse the project's established components and libraries.

Explain where the integration will fit and then implement it. Ask focused questions only when a missing decision materially changes the implementation. If no application repository is available, ask which project to use before creating a new application. If this is a backend-only project, implement the appropriate service/API interfaces and document how a caller supplies the review and confirmation decision.

## Read the Axiym sources

Target Client Trade API 0.3.0 and event reference 0.2.0. These versions were selected when this prompt was copied. Use matching contracts and verify that current guides still describe those versions. Flag any mismatch and establish the intended version before implementing.

Start with:
- Documentation index: https://docs.axiym.io/trade-api/llms.txt
- Getting started: https://docs.axiym.io/trade-api/integration-guide/quick-start.md
- Access and environments: https://docs.axiym.io/trade-api/integration-guide/access-setup.md
- Sandbox validation: https://docs.axiym.io/trade-api/integration-guide/sandbox-testing.md
- API contract: https://docs.axiym.io/openapi/trade-api/0.3.0.yaml
- Event contract: https://docs.axiym.io/openapi/trade-api/events/0.2.0.yaml

Read the guides relevant to the requested feature:
- Authentication: https://docs.axiym.io/trade-api/integration-guide/fundamentals/authentication.md
- Idempotency: https://docs.axiym.io/trade-api/integration-guide/fundamentals/idempotency.md
- Errors and retries: https://docs.axiym.io/trade-api/integration-guide/fundamentals/error-handling-and-retries.md
- Pagination: https://docs.axiym.io/trade-api/integration-guide/fundamentals/pagination-and-query-parameters.md
- Client onboarding: https://docs.axiym.io/trade-api/integration-guide/client-onboarding.md
- Client context: https://docs.axiym.io/trade-api/integration-guide/client-context.md
- Address book: https://docs.axiym.io/trade-api/integration-guide/add-to-address-book.md
- Deposits: https://docs.axiym.io/trade-api/integration-guide/deposit-funds.md
- Conversions: https://docs.axiym.io/trade-api/integration-guide/execute-a-conversion.md
- Withdrawals: https://docs.axiym.io/trade-api/integration-guide/withdraw-funds.md
- Reconciliation: https://docs.axiym.io/trade-api/integration-guide/reconcile-activity.md
- Webhook registration: https://docs.axiym.io/trade-api/webhooks/registration-management.md
- Webhook signatures: https://docs.axiym.io/trade-api/webhooks/verifying-signatures.md
- Webhook processing: https://docs.axiym.io/trade-api/webhooks/overview.md

Use these sources for endpoints, schemas, scopes, states, signature verification and retry rules. Follow linked operation and schema references for field details. If sources conflict or cannot be retrieved, identify the gap and ask for the missing information. Do not invent endpoints, an Axiym SDK or undocumented behavior.

## Implement the requested functionality

Apply only the guidance relevant to the requested feature, in manageable steps. Use the existing server-side HTTP stack and configuration or secret store. Derive authentication and environment URLs from the documentation. Keep credentials and tokens server-side, omit secrets from logs, and supply empty example configuration values. Represent monetary values without floating-point rounding errors.

1. Preserve client ownership throughout the integration. The partner token authenticates the integration; clientId in business-resource paths selects the owner. Store the Axiym clientId alongside your client reference and enforce application authorization before selecting it. Keep accounts, conversion pairs, destinations, events and reconciliation records in that same client context.

2. Use existing onboarded clients or the documented API/manual onboarding process as required by the feature. Wait for activation and provisioned resources before money movement. Client Trade onboarding does not require PNSL financial underwriting. Do not invent document-upload operations or use another product's onboarding statuses.

3. Discover active client accounts, active address book entries and permitted conversion pairs. Select the returned pairId for the intended currency and payment-rail direction. Only ACTIVE address book entries may fund deposits or receive withdrawals. Deposits and withdrawals must use external accounts owned by the same client; validate destination ownership, currency and network.

4. Retain a conversion's create response for review because an unconfirmed quote is not available through later reads. Keep confirmation as a separate explicit decision before quote expiry. Apply the withdrawal create, review and confirm flow separately; do not infer withdrawal states from conversion states.

5. Use distinct creation and confirmation idempotency keys, preserving clientId, path, body and key when retrying each operation. Route verified partnership webhook events by clientId, deduplicate them and retrieve current state under that client's paths where available. The conversion.created event is emitted before confirmation: use the retained create response for an unconfirmed conversion and fetch the resource only after confirmation. Reconcile statements and related resources within the same client context. Confirm the available sandbox simulations and test networks with Axiym.

## Verify and hand over

Use mocked responses and synthetic fixtures derived from the selected contracts. Test authentication, authorization, pagination and error handling as relevant, plus cross-client access attempts, onboarding not yet active, wrong-client accounts or destinations, quote expiry, creation without automatic confirmation, retries in the same client context, event routing, and reconciliation. For webhook features, cover invalid signatures and recovery from missed notifications.

Run the project's relevant checks and fix failures caused by your changes. Code generation and local tests should not require real credentials. Leave live API calls, webhook registration, deployment and money movement for separately requested setup or validation.

Finish with changed files, configuration instructions, checks actually run, assumptions and remaining gaps. Distinguish passing local tests from a verified sandbox integration, and list the provisioning and application decisions still needed.
```



## Review and validate

Passing local tests does not verify an Axiym integration. Use the
[quickstart](/trade-api/integration-guide/quick-start) and
[sandbox testing guide](/trade-api/integration-guide/sandbox-testing) to
validate your selected flows with provisioned access.
