Description
n8n-nodes-capitalcom
> 🧪 Beta (v0.2.0). Stable and in real use. It’s still 0.x, so node parameters
> may change between minor versions — pin a version if you need stability. Trades real
> money: use a demo Capital.com account first, and please
> report issues.
>
> Unofficial. Independent community project — not affiliated with, endorsed by, or
> supported by Capital.com.
   
An n8n community node for the Capital.com Open API — market data,
accounts, watchlists, and trading (positions & working orders), plus a WebSocket Trigger
for live price and candle streams.
It mirrors the functional surface of the
capitalcom-cli (a Python CLI/SDK for the
same API), reimplemented natively in TypeScript for n8n. Need the same capabilities outside
n8n? See that project.
Highlights
- Full API coverage — Session, Market, Account, Watchlist, Position, Order, and
- Safe by default — Dry Run is on out of the box, with Max Size and Allowed-EPIC
- Reliable sessions — automatic login, token caching, refresh, and rate-limit handling.
- Proven against the live demo API — an opt-in integration suite exercises the real
Confirmation, plus a WebSocket Trigger for live prices and candles.
guards enforced before any order is sent.
Capital.com demo endpoints (including a live WebSocket quote).
Maintained & open to contributions
I use this node against the live Capital.com API and keep it current as the API
evolves. It’s MIT-licensed and the source is public — **issues and pull requests are
welcome**. See CONTRIBUTING and start a thread in
Discussions.
Example workflows
Ready-to-import workflows live in examples/ — market data, a guarded
(Dry-Run) position open, and a live price-alert Trigger.
The Capital.com (Unofficial) node in the n8n editor:
!The Capital.com (Unofficial) node in the n8n editor
An example workflow built with the node:
!An example workflow built with the Capital.com (Unofficial) node
Installation
> Beta (0.x): node parameters may still change between minor versions.
> Pin a version (n8n-nodes-capitalcom@0.2.0) if you need stability between updates.
Community Nodes (self-hosted n8n): Settings → Community Nodes → Install, enter
n8n-nodes-capitalcom, and confirm. Restart n8n if prompted.
Manual: in your n8n custom-nodes directory (~/.n8n/custom):
npm install n8n-nodes-capitalcom
Requires n8n with Node.js ≥ 20.15.
Credentials
Create an API key in your Capital.com account settings, then add a Capital.com API
credential in n8n:
| Field | Notes |
| ————— | ————————————— |
| Environment | demo or live |
| API Key | the API key from Capital.com |
| Identifier | your Capital.com login email |
| Password | the custom password set for the API key |
Use the credential’s Test button to confirm the keys log in. Sessions are cached and
refreshed automatically.
Nodes
Capital.com (action node)
| Resource | Operations |
| ——————- | ———————————————————————————————– |
| Session | Get Details · Get Server Time · Ping · Switch Account |
| Market | Search · Get · Get Prices · Get Sentiment · Navigation Root · Navigation Node |
| Account | List · Get Preferences · Set Preferences · Activity History · Transaction History · Demo Top-Up |
| Watchlist | List · Get · Create · Add Market · Remove Market · Delete |
| Position | List · Get · Preview · Open · Amend · Close |
| Order (working) | List · Preview · Create · Amend · Cancel |
| Confirmation | Get · Wait For |
Capital.com Trigger (streaming node)
Streams live market data over WebSocket, emitting one execution per message:
The connection authenticates, keeps itself alive, and reconnects automatically on drops.
Quickstart
A safe first workflow:
1. Add a Capital.com node, select your Capital.com API credential (on demo).
2. Market → Search for an instrument (e.g. gold) and note an epic.
3. Position → Open with that epic, a direction, and size — leave Dry Run on.
The node returns the request it would send, without trading.
4. Happy with it? Turn Dry Run off to place the demo order, then use
Confirmation → Wait For on the returned dealReference, and Position → Close
to flatten.
For live streaming, add a Capital.com Trigger, choose Prices, and set the EPICs.
Trading safety
Position Open and Order Create expose safety controls as node parameters:
to place real orders.**
Preview operations never send. Start on the demo environment.
Compatibility
Tested against the Capital.com Open API on the demo environment. WebSocket streaming
requires connection headers, so the node depends on the ws package.
Resources
Contributing & community
Contributions welcome — see CONTRIBUTING.md. Please follow the
Security Policy, and check the CHANGELOG for what’s new.
Disclaimer
Unofficial and independent — not affiliated with, endorsed by, or supported by
Capital.com. Not financial advice. CFD trading carries a high risk of losing
money rapidly. Use a demo account until you fully trust your setup; you are
responsible for any trades placed with your credentials.
License
MIT © 2026 Simon Tarara. See DISCLAIMER for the
unofficial-affiliation and financial-risk notice.