For Agents
Open and close trading positions, place working orders, and stream market data on Capital.com for CFDs and spread betting. Mirrors the canonical Capital.com Trading API with the same endpoints and auth model.
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 with size, direction, stop loss, and take profit on a chosen epic
Place, amend, or cancel a working order ahead of execution
Pull historical OHLC candles by resolution and date range for any tradable instrument
Read account balance, recent activity, and transaction history for reconciliation
GET STARTED
Use for: Open a short CFD position on USDJPY with a take-profit, Place a working order to sell GOLD if it crosses 2300, Retrieve daily candles for AAPL CFD over the last 90 days, List all working orders on the live account
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. This is the second indexed variant of the Capital.com REST trading surface — it covers session creation, account state, positions and working orders, market metadata and price history, client sentiment, and watchlists for CFDs and spread betting. It targets the same live and demo trading servers as the canonical capital.com spec and uses the same three-header auth flow built around the X-CAP-API-KEY plus session-derived CST and X-SECURITY-TOKEN. Trading apps that pin to this slug stay supported even as the canonical spec evolves.
Inspect client sentiment percentages on instruments to inform a trading rule
Maintain watchlists and add or remove epics to track instruments of interest
Patterns agents use Capital.com Trading API API for, with concrete tasks.
★ CFD Strategy Execution
Strategies execute trades programmatically via POST /api/v1/positions, supplying epic, direction, size, and stop or limit levels. The endpoint returns a dealReference that GET /api/v1/confirms/{dealReference} resolves to the final fill or rejection. The same flow runs against demo or live servers by switching the base URL.
POST /api/v1/positions with epic, direction=SELL, size, and stopLevel, then GET /api/v1/confirms/{dealReference} to verify the fill.
Working Order Management
Pending orders are managed through POST /api/v1/workingorders to create and PUT/DELETE on /api/v1/workingorders/{dealId} to amend or cancel before execution. This supports breakout strategies where the entry price triggers off a level rather than being executed at market.
POST /api/v1/workingorders with epic, direction, size, level, and orderType=LIMIT, then DELETE /api/v1/workingorders/{dealId} if the level is no longer valid.
Market Data Ingestion
Backtesting and research tools pull historical candles via GET /api/v1/history/prices for any epic and resolution, plus market metadata via GET /api/v1/markets/{epic}. The combination feeds data warehouses or notebooks without scraping the trading platform.
GET /api/v1/history/prices?epic=GBPJPY&resolution=HOUR&from=...&to=... and write the returned candles into the analytics warehouse.
AI Agent Trading Assistant
An agent watching a portfolio uses Capital.com via Jentic to act on user-confirmed signals. It searches for the open-position operation, loads the schema, and submits the trade. Session tokens stay encrypted in the Jentic vault and are refreshed automatically.
Search Jentic for 'open a Capital.com position', load the createPosition schema, and execute POST /api/v1/positions with the user-approved size and direction.
36 endpoints — jentic publishes the only available openapi specification for capital.
METHOD
PATH
DESCRIPTION
/api/v1/session
Create a session and obtain 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 session and obtain 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 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 docs.
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 Trading API
Canonical Capital.com spec slug — prefer this for new integrations
Default to capital.com/main for new integrations; use capitalcom/main only when an existing pipeline already pins to it.
CaptureIQ
Document capture for trading-related paperwork and statements
Use CaptureIQ to ingest brokerage statements; Capital.com to execute trades against the account.
Captivated
Customer messaging that pairs with trading account notifications
Use Captivated to message a trader about an account event; Capital.com to read or change the underlying state.
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. 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?
POST /api/v1/session with the X-CAP-API-KEY header returns CST and X-SECURITY-TOKEN response headers, which must be sent on every subsequent request. Through Jentic the API key and session tokens are stored encrypted and rotated automatically.
Can I open a working order on a future level with the Capital.com API?
Yes. POST /api/v1/workingorders with epic, direction, size, level, and orderType (LIMIT or STOP). The order rests until the level is reached or you cancel it via DELETE /api/v1/workingorders/{dealId}.
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 contains OHLC candles for the requested window.
What are the rate limits for the Capital.com Trading API?
Capital.com applies per-account rate limits — its public docs cite 10 requests per second for general endpoints and tighter limits on session creation. The OpenAPI spec does not enumerate them, so implement client-side backoff on 429 responses.
Is there a way to test against a demo account?
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 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