Market data connections
Market data connections: overview
Teach TradeStrike to talk to a new market-data venue: historical backfill, live ticks, order-book depth, open interest, summaries and instrument metadata — discovered through a credential-driven factory and bundled behind one interface.
On this page
The connection model
A market-data connection plugin is how you teach the platform to read a new venue — a futures
broker, a crypto exchange, a vendor REST API, a CSV vault, anything that can produce bars or ticks.
The pattern is deliberately small: there is no venue-specific plumbing to learn, only two core contracts,
both declared in namespace TradeStrike.Pipeline.Providers. One advertises the source and collects
credentials; the other is the source once it has them.
IDataProviderFactory
Advertises a stable Key, a
display name, and the credential fields the host should collect. The host renders a form from those
fields and calls Create(credentials) to construct a provider.
IDataProvider
One end-to-end source bundling backfill + live
ticks + metadata + depth + connection lifecycle. It advertises a ProviderCapabilities
bitmask and exposes the matching sub-interfaces — each nullable, null when the flag is absent.
The split matters because the host needs to describe your provider before any credentials exist
— to list it, to draw its form. That is exactly what the factory is for. Only after the user fills
in the form does a live IDataProvider come into being. From there everything is
capability-gated: you light up the flags you actually support, and the host probes the matching
sub-interfaces, treating a null one as "this venue does not do that".
graph LR A["Plugin loader
scans assemblies"] -->|discovers| F["IDataProviderFactory"] F -->|RequiredCredentials| UI["Host renders
credentials form"] UI -->|Create(creds)| P["IDataProvider
(Disconnected)"] P -->|ConnectAsync| C["Connected"] C -->|Backfill / LiveTicks / Depth / ...| S["Chart / backtest / strategy session"]
RequiredCredentials — you write no XAML. The richer venue-config UI used
by the built-in venues lives in the host and is not part of the plugin SDK; the supported,
plugin-discoverable path is IDataProviderFactory.Capabilities and optional surfaces
ProviderCapabilities is a [Flags] enum. A typical production provider advertises
at least Backfill | LiveTicks; most also add InstrumentMetadata and, when the
venue has a book, OrderbookDepth. Beyond those flagged core surfaces, an
IDataProvider can opt into a family of optional feeds — open interest, level-1
summaries, fundamentals — each a property that defaults to null, so existing providers
keep compiling and the host simply skips a feature when its property is null.
| Capability flag | Sub-interface | Page |
|---|---|---|
Backfill |
IBackfillProvider Backfill |
Backfill |
LiveTicks |
ITickSource LiveTicks |
Live ticks & depth |
InstrumentMetadata |
IInstrumentMetadata Instruments |
Metadata & discovery |
OrderbookDepth |
IMarketDepthFeed Depth and/or IMarketByOrderFeed Mbo
|
Live ticks & depth |
| — (optional, no flag) |
IOpenInterestFeed, IMarketSummaryFeed, IFundamentalsFeed
|
Live ticks & depth |
Market data only
Everything in this chapter concerns market data. Order routing is a separate
contract — ITradingProvider in namespace TradeStrike.Pipeline.Trading
— which hosts accounts, places and manages orders, and streams every state change back out as
events. A real broker connection typically implements both sides under one provider key, but they are
independent contracts: the OrderRouting capability flag exists on
ProviderCapabilities only as a marker. The trading side has its own
chapter; this one stays strictly data.
A tour of the chapter
The rest of the section walks the model one piece at a time:
| Page | Covers |
|---|---|
| The factory | Advertising the provider and declaring credential fields. |
| The provider | The IDataProvider contract, capabilities, optional feeds, decorators and the active-provider registry. |
| Backfill (history) | Returning historical bars, the lookback/range/progress extensions, and order-flow / open-interest-aware loads. |
| Live ticks & depth | Streaming trades, L2 vs MBO depth, the shared order book, and the other live feeds; connection hygiene. |
| A backfill-only provider | A complete minimal example, end to end. |
| Metadata & discovery | Tick sizing, point values, instrument directories, and how the host finds your plugin. |