For Agents
Open and close trading positions, place working orders, and stream market data on Capital.com for CFDs and spread betting. Supports live and demo accounts via a session-based auth flow.
Get started with Capital.com Trading API in minutes using your preferred integration method.
# Add to your MCP client config (Claude Desktop, Cursor, Windsurf)
{
"jentic": {
"url": "https://api.jentic.com/mcp",
"auth": "oauth"
}
}
# Then ask your agent:
"open a Capital.com CFD position"
# → Jentic returns the GET /events tool with parameter schema, agent executes.What an agent can do with Capital.com Trading API API.
Open a market or limit position on a specific epic with size, direction, and stop-loss
Place a working order at a target level and amend or cancel it before execution
Retrieve historical price candles for an instrument across configurable resolutions
Read account balance, transaction history, and activity logs for reconciliation
GET STARTED
Use for: Open a long CFD position on EURUSD with a stop loss, Place a working order to buy GOLD at 2350, Retrieve the last 200 hourly candles for GBPJPY, Get the current account balance and available margin
Not supported: Does not handle KYC onboarding, payment processing, or tax reporting — use for session creation, market data, position and order management on Capital.com only.
Jentic publishes the only available OpenAPI document for Capital.com Trading API, keeping it validated and agent-ready.
Jentic publishes the only available OpenAPI specification for Capital.com Trading API, keeping it validated and agent-ready. The Capital.com Trading API exposes the full retail trading surface for CFDs and spread betting: session creation, account state, opening and closing positions, placing working orders, retrieving market metadata and price history, polling client sentiment, and managing watchlists. It supports both live and demo trading servers and uses a three-token auth flow (API key plus session-derived CST and X-SECURITY-TOKEN). Trading bots, portfolio dashboards, and algorithmic strategies use it as their execution and market-data feed.
Inspect client sentiment percentages on instruments to inform a strategy
Manage watchlists and add or remove epics to track instruments of interest
Patterns agents use Capital.com Trading API API for, with concrete tasks.
★ Algorithmic CFD Execution
Quant strategies execute CFD trades programmatically via POST /api/v1/positions, supplying epic, direction, size, and stop/limit levels. The endpoint returns a dealReference that GET /api/v1/confirms/{dealReference} resolves to the final fill or rejection. The same flow handles demo and live accounts by switching the base URL.
POST /api/v1/positions with epic, direction=BUY, size, and stopLevel, then GET /api/v1/confirms/{dealReference} to confirm the fill.
Portfolio Snapshot Dashboard
A trader-facing dashboard pulls account state, open positions, and transaction history every minute to render P&L and margin utilisation. GET /api/v1/accounts, GET /api/v1/positions, and GET /api/v1/history/transactions provide the structured data, and the dashboard refreshes the session token before it expires using POST /api/v1/session.
Fetch GET /api/v1/accounts and GET /api/v1/positions every minute and render the combined balance and unrealised P&L.
Sentiment-Informed Strategy
Strategies that fade or follow retail sentiment poll GET /api/v1/clientSentiment/{epic} to read the long/short percentage on a given instrument. The signal feeds directly into a sizing rule before placing or scaling a position. Combined with price history from GET /api/v1/history/prices, this builds a self-contained signal pipeline against a single broker API.
GET /api/v1/clientSentiment/EURUSD and GET /api/v1/history/prices for the same epic, then size the next order based on the combined signal.
AI Agent Trading Assistant
An agent that tracks portfolio positions and executes user-approved trades uses Capital.com via Jentic. It searches for the open-position operation, loads the schema, and submits the trade once the user confirms. Session tokens stay encrypted in Jentic's vault and are refreshed automatically.
Search Jentic for 'open a Capital.com position', load the createPosition schema, and execute POST /api/v1/positions after the user confirms the size and direction.
36 endpoints — jentic publishes the only available openapi specification for capital.
METHOD
PATH
DESCRIPTION
/api/v1/session
Create a trading session and get CST and X-SECURITY-TOKEN headers
/api/v1/positions
Open a new position
/api/v1/workingorders
Place a working order
/api/v1/positions
List all open positions
/api/v1/history/prices
Retrieve historical price candles
/api/v1/clientSentiment/{epic}
Get client sentiment for an instrument
/api/v1/confirms/{dealReference}
Confirm the status of a deal
/api/v1/session
Create a trading session and get CST and X-SECURITY-TOKEN headers
/api/v1/positions
Open a new position
/api/v1/workingorders
Place a working order
/api/v1/positions
List all open positions
/api/v1/history/prices
Retrieve historical price candles
Three things that make agents converge on Jentic-routed access.
Credential isolation
The X-CAP-API-KEY and the session-derived CST and X-SECURITY-TOKEN headers are stored encrypted in the Jentic vault. Jentic's MAXsystem refreshes the session tokens before they expire, so the agent never sees the raw key or session secrets.
Intent-based discovery
Agents search Jentic by intent (e.g., 'open a Capital.com position' or 'retrieve price history') and Jentic returns the matching operation with its input schema, so the agent picks the right one of the 36 endpoints without browsing the docs portal.
Time to first call
Direct Capital.com integration: 2-3 days for session bootstrap, three-header auth, working orders, and confirm polling. Through Jentic: under 2 hours — search, load schema, execute.
Alternatives and complements available in the Jentic catalogue.
Capital.com (alternate)
Alternate Capital.com spec variant in the Jentic catalog
Some integrations may pin to the alternate slug; prefer the capital.com/main spec unless your existing pipeline references the other.
CaptureIQ
Document capture for trading-related paperwork and statements
Use CaptureIQ when ingesting brokerage statements; Capital.com when executing trades against a Capital.com account.
canibuild API
Unrelated domain data; pair only when a workflow spans both
Most trading workflows will not need canibuild; included only as a domain-adjacent pairing within the catalog.
Specific to using Capital.com Trading API API through Jentic.
Why is there no official OpenAPI spec for Capital.com Trading API?
Capital.com publishes documentation but not an OpenAPI specification on its developer portal. Jentic generates and maintains this spec so that AI agents and developers can call Capital.com Trading API via structured tooling. It is validated against the live API and kept up to date. Get started at https://app.jentic.com/sign-up.
What authentication does the Capital.com Trading API use?
It uses a three-header flow. POST /api/v1/session with the X-CAP-API-KEY header returns CST and X-SECURITY-TOKEN response headers; both must be sent on subsequent calls. Through Jentic the API key and session tokens are stored encrypted in the vault and rotated automatically.
Can I open a CFD position on a specific instrument with the Capital.com API?
Yes. POST /api/v1/positions with epic, direction, size, and optional stopLevel and limitLevel returns a dealReference. Resolve the final state by calling GET /api/v1/confirms/{dealReference}.
How do I retrieve historical price candles through Jentic?
Search Jentic for 'Capital.com price history', load the getPriceHistory operation, and execute GET /api/v1/history/prices with the epic, resolution, and date range. The response returns OHLC candles for the requested window.
What are the rate limits for the Capital.com Trading API?
Capital.com applies per-account rate limits that are not enumerated in the OpenAPI spec — its public docs cite 10 requests per second for general endpoints and tighter limits on session creation. Implement client-side backoff on 429 responses.
Can I use a demo account before going live?
Yes. The spec lists both servers: live (https://api-capital.backend-capital.com) and demo (https://demo-api-capital.backend-capital.com). Switch the base URL when instantiating the client to test against the demo environment first.
/api/v1/clientSentiment/{epic}
Get client sentiment for an instrument
/api/v1/confirms/{dealReference}
Confirm the status of a deal