# Integrate using AI

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

Product: Direct Trade API
Guides follow API reference 0.1.0 and event reference 0.1.0.
Canonical page: https://docs.axiym.io/direct-trade-api/integration-guide/integrate-with-ai

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

## AI-readable documentation

| Source                                                               | Use it for                                                                                      |
| -------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| [Direct Trade API llms.txt](/direct-trade-api/llms.txt)              | Finding guides, references and available versions.                                              |
| [Markdown pages](/direct-trade-api/integration-guide/quick-start.md) | Reading guides and examples. Use **View Markdown** or append `.md` to a documentation page URL. |
| [OpenAPI contracts](/direct-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 Direct Trade API conversion quoting to our treasury dashboard. Discover
> permitted pairs and show the returned quote for review using our existing
> backend client and UI patterns. Leave confirmation for a separate step.

For larger integrations, work incrementally through account discovery, conversion
review and confirmation, deposits, 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 Direct 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 Direct 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 Direct Trade API 0.1.0 and event reference 0.1.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/direct-trade-api/llms.txt
- Getting started: https://docs.axiym.io/direct-trade-api/integration-guide/quick-start.md
- Access and environments: https://docs.axiym.io/direct-trade-api/integration-guide/access-setup.md
- Sandbox validation: https://docs.axiym.io/direct-trade-api/integration-guide/sandbox-testing.md
- API contract: https://docs.axiym.io/openapi/direct-trade-api/0.1.0.yaml
- Event contract: https://docs.axiym.io/openapi/direct-trade-api/events/0.1.0.yaml

Read the guides relevant to the requested feature:
- Authentication: https://docs.axiym.io/direct-trade-api/integration-guide/fundamentals/authentication.md
- Idempotency: https://docs.axiym.io/direct-trade-api/integration-guide/fundamentals/idempotency.md
- Errors and retries: https://docs.axiym.io/direct-trade-api/integration-guide/fundamentals/error-handling-and-retries.md
- Pagination: https://docs.axiym.io/direct-trade-api/integration-guide/fundamentals/pagination-and-query-parameters.md
- Address book: https://docs.axiym.io/direct-trade-api/integration-guide/add-to-address-book.md
- Deposits: https://docs.axiym.io/direct-trade-api/integration-guide/deposit-funds.md
- Conversions: https://docs.axiym.io/direct-trade-api/integration-guide/execute-a-conversion.md
- Withdrawals: https://docs.axiym.io/direct-trade-api/integration-guide/withdraw-funds.md
- Reconciliation: https://docs.axiym.io/direct-trade-api/integration-guide/reconcile-activity.md
- Webhook registration: https://docs.axiym.io/direct-trade-api/webhooks/registration-management.md
- Webhook signatures: https://docs.axiym.io/direct-trade-api/webhooks/verifying-signatures.md
- Webhook processing: https://docs.axiym.io/direct-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. Operate in the company's own account context. Use the Direct Trade API contract paths without adding Client Trade API client scoping. Deposits and withdrawals use external accounts owned by the same company; third-party withdrawals are not supported.

2. Discover active accounts, permitted conversion pairs and active address book entries. Only ACTIVE address book entries may fund deposits or receive withdrawals. Match conversion direction by currency and payment rail, using the returned pairId. Do not reverse a pair or treat destinationId as an Axiym account identifier. Use the account's documented deposit instructions for its rail and network.

3. For conversions, retain the create response for review: an unconfirmed quote is not returned by later read operations. Keep confirmation as a separate explicit decision before the quote expires. Creation locks a rate; confirmation starts execution. An expired quote requires a new conversion.

4. For withdrawals, validate the source account and active destination's ownership, currency and network. Create, review, and explicitly confirm as separate steps. Preserve identifiers and distinguish pending execution from a terminal outcome.

5. Use distinct idempotency keys for creation and confirmation; retry each exact operation with its original key. Track events using the documented signature verification and deduplication rules, retrieve authoritative resource state where available, and reconcile conversion debits and credits and withdrawal debits with account statements. The conversion.created event is emitted before confirmation: use the retained create response for an unconfirmed conversion and fetch the resource only after confirmation. Confirm the supported sandbox bank simulations and blockchain 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 pair direction and payment-rail selection, ownership mismatches, quote expiry, creation without automatic confirmation, ambiguous responses, unsuccessful withdrawals, duplicate or out-of-order events, and statement 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](/direct-trade-api/integration-guide/quick-start) and
[sandbox testing guide](/direct-trade-api/integration-guide/sandbox-testing) to
validate your selected flows with provisioned access.
