npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

n8n-nodes-capitalcom

v0.2.0

Published

Unofficial n8n community node for the Capital.com Open API — market data, accounts, watchlists, trading, and WebSocket streaming.

Readme

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.

npm version status: beta CI License: MIT

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 Confirmation, plus a WebSocket Trigger for live prices and candles.
  • Safe by default — Dry Run is on out of the box, with Max Size and Allowed-EPIC guards enforced before any order is sent.
  • 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 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.

Screenshots to add (author): capture the node in the editor and one running workflow, save under docs/images/, and replace the two comments above with ![...](docs/images/<file>.png).

Installation

Beta (0.x): node parameters may still change between minor versions. Pin a version ([email protected]) 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:

  • Prices — live quotes/ticks for the given EPICs
  • Candles — OHLC updates for the given EPICs + resolutions

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:

  • Dry Rundefaults ON. Returns the would-be request without sending it. Turn it off to place real orders.
  • Max Size Guard — rejects the order if size exceeds this (0 disables).
  • Allowed EPICs — comma-separated allow-list; empty allows any EPIC.

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 Code of Conduct, report vulnerabilities per 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.