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

# Trading API for partners

> Integration guide for verifying MT5 accounts, reading account data, and managing trades.

Trading API · Partner guide

## Connect your backend to MetaTrader 5

Verify accounts, query the market, and manage each trade with clear workflows and integration examples.

### Guide for Claude, Codex and other AI assistants

One document covering all 18 partner operations, examples and integration workflows. Download it and attach it to your AI assistant. Document in Spanish.

Download partner guide (.md)

This documentation covers only the 18 operations in the
[Partner Portal](https://api-trading.ap-markets.com/docs/partners).
The base URL for requests is `https://api-trading.ap-markets.com`, without `/docs/partners`.

## Integration workflow

| Process | What you do | What to check |
| - | - | - |
| [Authentication](https://api-trading-docs.ap-markets.com/authentication.md) | Send the token issued by the provider | Your token is allowed to access the route |
| [Availability](https://api-trading-docs.ap-markets.com/health.md) | Check the API and MT5 connection | The service and connection respond |
| [Verification](https://api-trading-docs.ap-markets.com/accounts-passwords.md) | Validate the account's master password | `valid: true`, `verified: true`, and `expires_at` |
| [Account queries](https://api-trading-docs.ap-markets.com/accounts.md) | Read the account, positions, and active orders | Current state of the verified account |
| [Market data](https://api-trading-docs.ap-markets.com/market-data.md) | Retrieve ticks for the broker's exact symbol | Current price to prepare a trade |
| [Opening a trade](https://api-trading-docs.ap-markets.com/trading/orders.md) | Submit an order with its idempotency key | MT5 request ID for follow-up |
| [Pending orders](https://api-trading-docs.ap-markets.com/trading/pending.md) | Place limit, stop, or stop-limit orders | Confirmed placement and subsequent tracking in MT5 |
| [Cancel pending order](https://api-trading-docs.ap-markets.com/api-reference/cancel-order.md) | Send the order ticket and verified account login | Cancellation result and updated orders |
| [Tracking results](https://api-trading-docs.ap-markets.com/trading/results.md) | Query the result and reconcile the account | Confirmed execution or rejection |
| [Closing a position](https://api-trading-docs.ap-markets.com/trading/close.md) | Submit the opposite direction using the actual position ticket | Position reduced or closed after execution is confirmed |
| [Revocation](https://api-trading-docs.ap-markets.com/accounts-passwords.md) | Remove your token's verification for the account | `revoked: true`, or `false` if no revocable binding existed |

The token, account login, MT5 request ID, and position ticket are different identifiers.
Each has its own purpose.

> [!WARNING]
>
> HTTP 200 when submitting an opening or closing order does not confirm execution.
> Save the returned ID and complete the follow-up before considering the trade complete.

The partner API does not include account creation, deposits, withdrawals, password changes,
or symbol specifications. [Deal history](https://api-trading-docs.ap-markets.com/deals.md) is available for verified accounts.
Signal generation and user acceptance belong to your application.

> [card] [First queries](https://api-trading-docs.ap-markets.com/quickstart.md)
>
> Connect and verify an account without submitting trades.

> [card] [Trading workflow](https://api-trading-docs.ap-markets.com/trading/overview.md)
>
> Prepare, submit, confirm, and close a trade.

[Volume: lots and MT5 units](https://api-trading-docs.ap-markets.com/trading/volume.md): conversion, contract size, limits and units by endpoint.


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