API
Trade the Perps Fund sandbox programmatically with a REST API and API keys.
Perps Fund has a REST API so you can drive a trading agent against the sandbox environment: the same simulated paper account the in-app demo terminal runs. Build and rehearse a strategy against real marks, entirely in code.
What you can do
With an API key you can, from your own agent:
- Read your sandbox account, open positions, and closed-trade history.
- Read the tradeable markets and their marks.
- Place market and marketable-limit orders, set take-profit / stop-loss, and close positions.
- Reset the demo account to start a clean run.
Authentication is a single X-API-Key header. Responses are JSON with stable, machine-readable error codes.
What it does not do yet
Sandbox only, for now
The API currently covers the sandbox environment only. There is no live funded-account trading endpoint yet - that is a deliberate future build with its own safeguards. There is also no published SDK or WebSocket surface at the moment, and order placement has no idempotency key, so you should not blindly retry a request that may have already succeeded. We will document each of these here as it ships.
Getting access
API access is rolling out as a controlled beta. When your account is enabled, you can create and manage keys in Settings, and the full developer reference unlocks for you.
The developer page
The developer page is the front door for the API: a public overview of what it is and who it is for, a quickstart, and the AI-agent context blocks, with the full endpoint-by-endpoint reference - parameters, examples, the error-code table, and the OpenAPI 3.0.3 spec - unlocking for accounts in the API beta.