capitalcom
OfficialCapital.com integration for PyneCore
- Broker
- Live data
- Data provider
pip install pynesys-pynecore-capitalcom
- Package
pynesys-pynecore-capitalcom- Version
- 0.9.1
- Requires PyneCore
>=6.6.0- Requires Python
>=3.11- Author
- PYNESYS LLC
- Downloads (30d)
- 157
- Last release
- Jul 24, 2026
About
Capital.com plugin for PyneCore.
Provides historical OHLCV and live WebSocket market data, and live order execution over the Capital.com REST v1 API. Data ingest and trading share a single REST session, so one credential block serves both roles.
Both account position modes are supported. A one-way (netting)
account uses the direct execute path; on a hedging-mode account
connect() opts into core one-way emulation (position_port = self) and the Order Sync Engine drives close/reversal/bracket
through the PositionPort
primitives, presenting Pine one-way semantics over the multi-row
book. Stop orders and server-side trailing stops are supported. A
both-set Pine entry (limit and stop) is not a stop-limit
order: the sync engine rests the limit leg natively and fires a
market order on the stop side via a software price-watch, so the
plugin only ever sees plain market / limit / stop entries. Partial
closes are emulated via opposite-direction posts on a netting
account; on a hedging account a partial close is a loud non-halting
skip (DELETE /positions/{dealId} is full-row only). Size changes
require cancel-and-recreate — order size is not amendable.
Idempotency is software-upheld via the unified
BrokerStore — the generic
order_refs table indexes each server-side dealReference /
dealId so the plugin can resolve an activity tail entry back to
the originating client_order_id with a single indexed SELECT.
Execution events are polled from REST (/positions,
/workingorders, /history/activity) since there is no
WebSocket order channel.
Broker capabilities
What the plugin's broker side delivers, as the plugin itself declares it.
- Stop orders Native
- Trailing stop Native
- TP/SL bracket Native
- Partial bracket exit Emulated
- Partial bracket exit (pyramiding) Emulated
- OCA cancel Emulated
- Amend order Partial
- Cancel all Emulated
- Reduce-only Emulated
- Order stream Emulated
- Fetch position Native
- Idempotency Emulated
- Short selling Native
Entry points
The names PyneCore registers this package under — this is what you type in the CLI.
capitalcompynecore_capitalcom:CapitalCom