The exchange is a machine-discoverable API. Everything a trader can do, an autonomous agent can do — authenticate, read markets, place orders, and stream state, all over plain HTTP and WebSocket, direct or through the official Rust, Python, TypeScript, CLI, and MCP clients. This page is the agent-readable map of that surface, with an honest account of what is live today and what is still being built.
https://exchange.nexus.xyz/api/exchangeCalls through the /api/exchange/* gateway are HMAC-signed on your behalf. The full contract lives in the OpenAPI spec, browsable at /api-docs.
Four machine-readable documents let an agent learn the API without a human in the loop. They are advertised at the paths below, relative to the base URL.
Known gap: these documents are served by the indexer today, but the gateway proxy does not yet forward them, so they currently return 404 at the advertised /api/exchange/* path. Until the fix lands, treat the links below as the advertised contract rather than as confirmed-resolving URLs.
/openapi.jsonThe full machine-readable contract — OpenAPI 3.1. The source of truth for every endpoint, schema, and auth mode.
/llms.txtAn agent-facing quickstart written for a code-execution agent: real curl calls, client install one-liners, honest live/partial/not-built markers.
/.well-known/nexus-exchangeA small JSON discovery index — the entry point an agent fetches first to find the spec, the quickstart, the stream, and the auth schemes.
/.well-known/oauth-protected-resourceRFC 9728 metadata. Scaffold only: no live authorization server yet. Today's auth is HMAC / EIP-712 agent keys / session bearer, not OAuth.
Three credential classes, all live. For an autonomous agent, an EIP-712 agent key is the recommended path — it needs no session token.
An Ethereum-derived keypair authorized by a one-time EIP-712 signature from your wallet. No session token. The recommended path for an autonomous agent.
An HMAC-SHA256 key pair created from a session token. Sign each request with timestamp + method + path + body hash.
A 24-hour token from an EIP-191 personal_sign login. Used only for key management — not for trading.
Market summaries, tickers, and order books. Public, IP-rate-limited, no credential required.
Register an EIP-712 agent key or mint an HMAC key from a session token.
Limit and market orders across 32 perpetual-futures markets, with batch submit and cancel.
Subscribe to orders, fills, positions, balances, trades, the book, and candles over WebSocket, with a monotonic sequence cursor for resume.
Credit synthetic USDX collateral (daily-capped) to a test account to start trading immediately.
An on-chain deposit target for funding an account with real USDX is not built yet. The MCP tool returns a clear not-yet-available message rather than faking one.
The raw HTTP surface needs no SDK, but five official clients wrap it — all pinned to released versions of the same OpenAPI spec.
Full REST + WebSocket surface; what Nexus's own market-making bots trade through. On crates.io.
Typed REST client (market data, trading, wallet auth, CCXT adapter); WebSocket not yet. PyPI publish pending — install from source.
Typed REST + WebSocket streaming, browser and Node. npm publish pending — build from source until the first release.
The `nexus` command — market data, trading, streaming. Signed prebuilt binaries; Homebrew and Windows installers too.
Stdio MCP server for Claude Desktop / Claude Code — see the MCP section below.
A stdio MCP server exposes the exchange as tools an AI agent (Claude Desktop / Claude Code) can call — market data and demo tools with zero config, account and trading tools with HMAC credentials. It talks to the live public gateway. Clone and build it from nexus-xyz/nexus-exchange-mcp, then register it with claude mcp add nexus-exchange -- node dist/index.js.
The hosted Streamable HTTP server is code-complete — same tool surface as the stdio server, with MVP header auth (your HMAC credential as request headers; OAuth-minted scoped keys are the planned follow-up) — but its public endpoint is still pending DNS/ingress, so no remote MCP URL resolves yet. Until it is reachable, use the local stdio server above.
Status markers reflect the live surface as of this build: Live works against the deployed exchange today, Partial is built but not yet reachable at its advertised public path or registry, and Not built yet names the tracking issue rather than faking a result. The machine-readable contract is always the OpenAPI spec.