v0.1.0-draft

Specification

The APEX Protocol defines how AI agents communicate with financial brokers via MCP (Model Context Protocol). The spec is organized into a mandatory core and modular asset-class profiles.

Layer 1 — Required

Core Specification

The mandatory baseline that every APEX-compliant broker must implement. Covers five capability domains:

apex.session.* Authentication (pass-through), capability negotiation, heartbeat
apex.account.* Account summary, balances, positions, open orders, transaction history
apex.order.* Place, modify, cancel orders. Market, limit, stop, stop-limit. SL/TP.
apex.market.* Quotes, OHLCV snapshots, instrument search, contract details
apex.risk.* Pre-trade risk checks, margin requirements, account limits
Read the core spec on GitHub
Layer 2 — Profile

FX

Spot FX, CFD FX, rollovers, swap rates, currency exposure, pip calculations.

v0.1-draft
Layer 2 — Profile

CFD

Equity CFDs, index CFDs, commodity CFDs, corporate actions, dividend adjustments.

v0.1-draft
Layer 2 — Profile

Crypto

Spot crypto, perpetual futures, funding rates, cross/isolated margin modes.

v0.1-draft
Layer 2 — Profile

Derivatives

Listed options, futures contracts, greeks, exercise/assignment.

planned
Layer 2 — Profile

Fixed Income

Bonds, yield, duration, coupon schedules.

planned

Instrument Taxonomy

The spec defines a canonical identifier format for tradeable instruments. A universal ID means the same thing at every broker — no per-broker symbol mapping.

ID Format

APEX:{ASSET_CLASS}:{SUB_CLASS?}:{SYMBOL}
APEX:FX:EURUSD Euro / US Dollar spot
APEX:CFD:IDX:SPX500 S&P 500 index CFD
APEX:CFD:EQ:AAPL.US Apple equity CFD
APEX:CRYPTO:BTCUSDT Bitcoin / Tether spot
View the taxonomy on GitHub

Design Principles

Credential pass-through

Tokens are validated by the broker and held only in memory with TTL. No third party ever stores credentials.

No recommendations

No APEX tool may return a directional trading recommendation. Protocol-level prohibition, non-negotiable.

Consistent errors

Every error follows a standard envelope: code, category, message, details, request_id, retry_after.

MCP-native annotations

Every tool declares readOnlyHint, destructiveHint, and idempotentHint for safe agent behavior.