Broker API HubMenu

Broker API

Capital.com API: limits, auth and errors

Public REST API and WebSocket feed for Capital.com CFD accounts, live and demo.

Independent and unofficialNewest reading Official documentation

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

Quickstart: key to first call36 endpoints7 messages24 error codes

Capital.com API rate limits and allowances

One record per limit. The scope is part of the limit: a figure without its scope is not a figure you can pace against.

LimitValueScopeSource
Headline limit10/s per useruseropen-api.capital.comchecked

Capital.com API rate limits in full, with pacing advice and the related error codes.

Access, authentication and streaming

API types listed in the record: REST, WebSocket.

How you get a key

Enable 2FA, then Settings > API integrations > Generate new key, with a custom key password.

Capital.com Public APIchecked

Who can use it

Any Capital.com account (demo or live) with 2FA enabled. Regional limits not published.

Capital.com Public APIchecked

Demo

Yes: separate demo base URL.

Capital.com Public APIchecked

Authentication

POST /session with the X-CAP-API-KEY header plus login credentials returns CST and X-SECURITY-TOKEN, sent on later calls. The session expires after 10 minutes of inactivity.

Capital.com Public APIchecked

Streaming

WebSocket wss://api-streaming-capital.backend-capital.com/connect, maximum of 40 epics per subscription; the session lasts 10 minutes and is kept alive with ping.

Capital.com Public APIchecked

History depth

Candles: max 1,000 per request (default 10), MINUTE to WEEK. Activity history: max 1 day per from/to call. Transactions default to last 10 minutes.

Capital.com API referencechecked Capital.com official Postman collectionchecked

Rate limits, as worded

Re-verified verbatim on 19 Sep 2026. 10 requests per second per user; 1 request per 0.1 seconds per user when opening positions or creating orders, which is an order limit and not a session limit; POST /session 1 request per second per API key; on demo, POST /positions and /workingorders are capped at 1000 requests per hour; API key generation 100 attempts per 24 hours. HTTP 429 when exceeded. New on 20 Sep 2026: the demo topUp endpoint is capped at 10 requests a second and 100 requests per account a day.

Capital.com Open API documentationchecked

Capital.com API endpoints

36 documented endpoints. Grouped by what they do

Capital.com messages

7 documented messages and subscriptions of the Capital.com WebSocket API. They are not HTTP endpoints: none has a method or a path, and each travels over a connection that stays open. Grouped by what they do, each with its summary

Capital.com API error codes

24 decoded error codes. All Capital.com errors

Platform APIs an account here can reach

Platform APIOfferedNoteSource
MetaTrader 4 (MQL4)YesMT4 offered; Expert Advisors allowed ('Expert advisors execute according to rules set in advance'), with a disclaimer that Capital.com is not responsible for EA performance.Capital.com UK MT4checked
MetaTrader 5 (Python package and MQL5)Not verifiedNot listed on the UK platforms page (lists web, app, TradingView, MT4, API). The MetaQuotes MT5 broker directory lists a 'Capital.com UK' card, so status is unclear; the en-gb MT5 URL returned 404.UnverifiedMetaTrader 5 find a broker (MetaQuotes)checked
cTrader Open APINocTrader not listed on the broker's UK platforms page; absence from an overview page is not proof, so unverified.UnverifiedCapital.com UK trading platformschecked
TradeLocker APINoTradeLocker not listed on the broker's UK platforms page; absence from an overview page is not proof, so unverified.UnverifiedCapital.com UK trading platformschecked
Match-Trader Platform APINoMatch-Trader not listed on the broker's UK platforms page; absence from an overview page is not proof, so unverified.UnverifiedCapital.com UK trading platformschecked
DXtrade APIsNoDXtrade not listed on the broker's UK platforms page; absence from an overview page is not proof, so unverified.UnverifiedCapital.com UK trading platformschecked

Capital.com API SDKs and wrappers

LibraryLanguageOfficialNoteSource
capital-api-postmanPostmanOfficialOfficial Postman collection; 14 forks, 4 open issues.github.comchecked
capital-mcpPythonCommunityMCP server for the Open API, published on Capital.com's own GitHub organisation while the README disclaims Capital.com's control, development, endorsement and liability. Trading tools are disabled by default.github.comchecked
api-java-samplesJavaOfficialNot recordedUnverifiedgithub.com
capitalcom-pythonPythonCommunityUnofficial wrapper, no release since 0.2.3 (Dec 2023).pypi.orgchecked

Capital.com API: questions and answers

Each answer is read from the record on this page, not written separately. Where the record is unverified, the answer says so.

Does Capital.com have an API?

Yes. This register records Capital.com as having its own API (REST and WebSocket), with availability marked as active. Public REST API and WebSocket feed for Capital.com CFD accounts, live and demo.

Capital.com: public API docschecked

Capital.com API key: how do I get one?

Enable 2FA, then Settings > API integrations > Generate new key, with a custom key password.

Capital.com Public APIchecked

Who can use the Capital.com API?

Any Capital.com account (demo or live) with 2FA enabled. Regional limits not published.

Capital.com Public APIchecked

Capital.com API demo: is there a demo or sandbox?

Yes: separate demo base URL.

Capital.com Public APIchecked

What are the Capital.com API rate limits?

Headline limit: 10/s per user. Scope: user. As the record words it: Re-verified verbatim on 19 Sep 2026.

open-api.capital.comchecked Capital.com Open API documentationchecked

How does Capital.com API authentication work?

POST /session with the X-CAP-API-KEY header plus login credentials returns CST and X-SECURITY-TOKEN, sent on later calls. The session expires after 10 minutes of inactivity.

Capital.com Public APIchecked

Does the Capital.com API support streaming?

WebSocket wss://api-streaming-capital.backend-capital.com/connect, maximum of 40 epics per subscription; the session lasts 10 minutes and is kept alive with ping.

Capital.com Public APIchecked

How much history does the Capital.com API return?

Candles: max 1,000 per request (default 10), MINUTE to WEEK. Activity history: max 1 day per from/to call. Transactions default to last 10 minutes.

Capital.com API referencechecked Capital.com official Postman collectionchecked

Is there a Python library for the Capital.com API?

This register lists these Python libraries for the Capital.com API. capital-mcp (community, Python): MCP server for the Open API, published on Capital.com's own GitHub organisation while the README disclaims Capital.com's control, development, endorsement and liability. Trading tools are disabled by default. capitalcom-python (community, Python): Unofficial wrapper, no release since 0.2.3 (Dec 2023).

capital-mcpchecked capitalcom-pythonchecked

Which platform APIs work with an account at Capital.com?

Recorded as offered, with a source: MetaTrader 4. Not verified either way: MetaTrader 5, cTrader, TradeLocker, Match-Trader and DXtrade.

Capital.com UK MT4checked

Capital.com API questions, each answered in a sentence or two.

The capability tables read one feature at a time across every broker and platform record, Capital.com included.

Everything this site records for Capital.com, as one JSON file. Each section of the file states its own licence. About the files. This page as Markdown.

Capital.com API guides and reference

Capital.com API compared

The same fields from two records, side by side. No winner is picked.

What changed recently for the Capital.com API

The newest entries are shown. Every dated change, all brokers and platforms. Follow Capital.com changes by RSS

Sample apps that use the Capital.com API

Every app and sample

Partner programme

No published figure. The Capital.com partner programme record. The programme register holds every record. This site carries no affiliate links.

How to cite this

Capital.com API: limits, auth and errors. Broker API Hub, https://openbrokerapi.com/brokers/capital-com, newest check .

Where you rely on a single figure, cite the source and the checked date printed beside it as well.

Sections