> ## Documentation Index
> Fetch the complete documentation index at: https://api-trading-docs.vexprofx.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.

export const PartnerGuideDownload = ({language = 'es'}) => {
  const spanish = language === 'es';
  const download = async event => {
    const button = event.currentTarget;
    button.disabled = true;
    button.textContent = spanish ? 'Preparando descarga…' : 'Preparing download…';
    try {
      const response = await fetch('/assets/partners-ai-guide.json');
      if (!response.ok) throw new Error('Download unavailable');
      const guide = await response.json();
      if (typeof guide.content !== 'string' || !guide.content.startsWith('# Vexpro Trading API')) {
        throw new Error('Invalid guide');
      }
      const url = URL.createObjectURL(new Blob([guide.content], {
        type: 'text/markdown;charset=utf-8'
      }));
      const link = document.createElement('a');
      link.href = url;
      link.download = 'PARTNERS_AI_GUIDE.md';
      document.body.appendChild(link);
      link.click();
      link.remove();
      setTimeout(() => URL.revokeObjectURL(url), 1000);
      button.textContent = spanish ? 'Descargar de nuevo (.md)' : 'Download again (.md)';
    } catch {
      button.textContent = spanish ? 'No se pudo descargar. Reintentar' : 'Download failed. Retry';
    } finally {
      button.disabled = false;
    }
  };
  return <div className="not-prose" style={{
    padding: '1.25rem',
    margin: '1.5rem 0',
    border: '1px solid #B78C32',
    borderRadius: '12px'
  }}>
      <h3 style={{
    fontSize: '1.2rem',
    fontWeight: 600,
    marginBottom: '0.5rem'
  }}>
        {spanish ? 'Guía para Claude, Codex y otras IA' : 'Guide for Claude, Codex and other AI assistants'}
      </h3>
      <p style={{
    marginBottom: '1rem'
  }}>
        {spanish ? 'Un documento con las 15 operaciones de partners, ejemplos y flujos completos de integración. Descárgalo y adjúntalo a tu IA.' : 'One document covering all 15 partner operations, examples and integration workflows. Download it and attach it to your AI assistant. Document in Spanish.'}
      </p>
      <button type="button" onClick={download} style={{
    background: '#B78C32',
    color: '#111',
    borderRadius: '8px',
    padding: '0.7rem 1rem',
    fontWeight: 600,
    cursor: 'pointer'
  }}>
        {spanish ? 'Descargar guía de partners (.md)' : 'Download partner guide (.md)'}
      </button>
    </div>;
};

<div className="vexpro-hero">
  <div className="vexpro-kicker">Trading API · Partner guide</div>
  <h2>Connect your backend to MetaTrader 5</h2>
  <p>Verify accounts, query the market, and manage each trade with clear workflows and integration examples.</p>
</div>

<PartnerGuideDownload language="en" />

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

## Integration workflow

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

The partner API does not include account creation, deposits, withdrawals, password changes,
order modification, trade history, or symbol specifications.
Signal generation and user acceptance belong to your application.

<CardGroup cols={2}>
  <Card title="First queries" href="/quickstart" icon="zap">Connect and verify an account without submitting trades.</Card>
  <Card title="Trading workflow" href="/trading/overview" icon="arrow-right-left">Prepare, submit, confirm, and close a trade.</Card>
</CardGroup>
