Providers
Providers
The market-data surface: the provider and its factory, the capability feeds it exposes (backfill, live ticks, depth, summary, fundamentals, open interest), the historical storage seam, and the activity/progress records that report backfill state.
On this page
Providers — SabrTrader.Pipeline.Providers
An IDataProvider is the market-data port of one connected venue: it advertises a
ProviderCapabilities flag set and exposes the feeds it supports as nullable properties.
A plugin does not construct one directly — the host builds it through the venue seam
(IVenuePlugin → IVenueDescriptor → IVenueSession.Data); see the
Venue seam reference and the
Venue plugins chapter. Optional facets OF the data plane are probed
with AsCapability<T>() rather than added as properties here.
| Type | Members |
|---|---|
IDataProvider : IDisposable
|
Key, DisplayName, Capabilities, Status; nullable feeds Backfill, LiveTicks, Instruments, Depth, Mbo, OpenInterest, MarketSummary, Fundamentals; bool SupportsBarSpec(BarSpecification); event Action<ProviderConnectionStatus>? ConnectionStatusChanged, event Action? MarketDataFeedsChanged; Task ConnectAsync(ct), Task DisconnectAsync(). |
ProviderCredentialField |
record (string Key, string DisplayName, ProviderCredentialKind Kind, string? Placeholder = null, bool Required = true, IReadOnlyList<string>? Choices = null, string? DefaultValue = null, string? HelpText = null, string? WarningText = null, bool Multiline = false, bool DynamicChoices = false, bool ReadOnly = false, string? StorageName = null) — one row of a venue's SettingsSchema. StorageName (dotted paths allowed) keeps a migrated venue's persisted JSON byte-compatible. |
ProviderCredentialKind |
enum: Plain, Secret, Choice, Toggle, Url. |
ProviderCapabilities |
[Flags] enum: None, Backfill, LiveTicks, InstrumentMetadata, OrderRouting, OrderbookDepth, Replay. |
BarSpecKind |
[Flags] enum: None, Time, Tick, Volume, Range, Renko, HeikinAshi. |
ProviderConnectionStatus |
enum: Disconnected, Connecting, Connected, ConnectionLost, Failed. Shared with IVenueSession.Status — one status enum for the whole seam. |
IDataProviderDecorator |
IDataProvider Inner { get; } — marker for wrapping providers. |
DataProviderCapabilities |
static: T? AsCapability<T>(this IDataProvider?) — unwraps decorators to a capability. |
IActiveDataProviderRegistry |
IDataProvider? GetActive(string venueKey), IReadOnlyDictionary<string,IDataProvider> ActiveProviders. |
IContinuousFuturesSource |
string? ContinuousBackfillSymbol(string root), IHistoricalTimeBarSource? ContinuousBarContracts, IRawTickRangeProvider? ContinuousTickContracts — all default null, so a venue implements only what it offers. One capability covers the whole continuous-contract story: a server-stitched symbol, the bare per-contract bar source the platform stitches, and the cached per-contract tick source for the tick path. |
IInstrumentDirectory |
IReadOnlyList<string> ListInstruments(). |
IRemoteSymbolSearch |
Task<RemoteSymbolHit?> ResolveAsync(string symbol, ct), Task<IReadOnlyList<RemoteSymbolHit>> SearchAsync(string query, ct) — server-side symbol lookup for venues with no enumerable catalog. |
RemoteSymbolHit |
record (string Symbol, string? Exchange = null, string? Description = null, InstrumentCategory? Category = null, QuantityUnit? QuantityUnit = null, double? TickSize = null, double? PointValue = null, double? LotSize = null, double? QuantityStep = null, double? MinQuantity = null, string? QuoteCurrency = null). |
ISearchOnlyUniverse |
bool UniverseIsSearchOnly { get; } — the venue cannot enumerate its universe; discovery routes through search. |
IPermanentConnectionFailure |
empty marker interface signalling a connection failure that will not clear on retry (e.g. bad credentials, not a dropped link). |
IProviderClock |
DateTime NowUtc { get; }. |
Capability feeds
Each optional feed follows the same subscribe-and-dispose shape: Subscribe(instrumentId, onUpdate)
returns an IDisposable, and a SubscriptionReset event signals that you must
re-subscribe (e.g. after a reconnect).
| Type | Members |
|---|---|
IMarketSummaryFeed : IDisposable
|
IDisposable Subscribe(string instrumentId, Action<MarketSummaryUpdate> onUpdate); event Action? SubscriptionReset. |
MarketSummaryUpdate |
record (string InstrumentId, DateTime ExchangeTimestampUtc, double? SettlementPrice, double? PreviousClose, double? OpeningPrice, double? DailyHigh, double? DailyLow, long? DailyVolume). |
IFundamentalsFeed : IDisposable
|
IDisposable Subscribe(string instrumentId, Action<FundamentalUpdate> onUpdate); event Action? SubscriptionReset. |
FundamentalUpdate |
record (string InstrumentId, FundamentalDataType Type, DateTime ExchangeTimestampUtc, double? Value = null, DateTime? DateValue = null). |
FundamentalDataType |
enum: Beta, CurrentRatio, DividendAmount, DividendPayDate, DividendYield, EarningsPerShare, FiveYearsGrowthPercentage, MarketCapitalization, NextYearEarningsPerShare, PercentHeldByInstitutions, PriceEarningsRatio, RevenuePerShare, SharesOutstanding, ShortInterest, ShortInterestRatio, AverageDailyVolume, CalendarYearHigh, CalendarYearHighDate, CalendarYearLow, CalendarYearLowDate, High52Weeks, High52WeeksDate, Low52Weeks, Low52WeeksDate, HistoricalVolatility. |
IOpenInterestFeed : IDisposable
|
IDisposable Subscribe(string instrumentId, Action<OpenInterestUpdate> onUpdate); event Action? SubscriptionReset. |
OpenInterestUpdate |
record (string InstrumentId, double OpenInterest, DateTime ExchangeTimestampUtc). |
MarketSummaryReplayCache |
thread-safe "latest non-null wins" cache: void Observe(in MarketSummaryUpdate), MarketSummaryUpdate? Replay(string instrumentId), Forget(string instrumentId), Clear(). |
IMarketDepthFeed (level-2) and IMarketByOrderFeed
(MBO / level-3) are documented under the Orderflow & depth
reference; IDataProvider exposes them as the Depth and Mbo properties.Backfill & ticks — SabrTrader.Pipeline.Runtime
Implement IBackfillProvider.Load for history. The aware variants are optional refinements the
host probes for — implement only what your venue supports. ITickSource delivers live ticks.
| Type | Members |
|---|---|
IBackfillProvider |
Task<IReadOnlyList<Bar>> Load(BarSpecification spec, CancellationToken ct = default). |
ILookbackAwareBackfillProvider |
adds Load(spec, TimeSpan lookback, ct). |
IRangeAwareBackfillProvider |
adds Load(spec, DateTime fromUtc, DateTime toUtcExclusive, ct). |
IProgressReportingBackfillProvider |
adds LoadWithProgress(spec, IProgress<BackfillProgress>, ct). |
IProgressReportingRangeBackfillProvider |
adds LoadWithProgress(spec, fromUtc, toUtcExclusive, IProgress<BackfillProgress>, ct). |
IOrderFlowAwareBackfillProvider |
adds Task<BackfillResultWithOrderFlow> LoadWithOrderFlow(spec, OrderFlowBackfillRequest, ct). |
IOpenInterestAwareBackfillProvider |
adds Task<BackfillResultWithOpenInterest> LoadWithOpenInterest(spec, OpenInterestBackfillRequest, ct). |
OrderFlowBackfillRequest |
record (DateTime? FromUtc = null, DateTime? ToUtcExclusive = null, TimeSpan? Lookback = null, IProgress<BackfillProgress>? Progress = null, OrderFlowResolution Resolution = OrderFlowResolution.Auto): HasRange, HasLookback, Validate(). |
OpenInterestBackfillRequest |
record (DateTime? FromUtc = null, DateTime? ToUtcExclusive = null, TimeSpan? Lookback = null, IProgress<BackfillProgress>? Progress = null): HasRange, HasLookback, Validate(). |
ITickSource : IDisposable
|
IDisposable Subscribe(string instrumentId, Action<Tick> onTick); plus a default-implemented routed overload Subscribe(string instrumentId, string? exchange, Action<Tick> onTick) that delegates to the plain one. Exchange travels on the REQUEST: a venue that serves the same instrument from several exchanges overrides the routed overload, a single-feed venue inherits the default. A DECORATOR must override and forward it, or the picked exchange is dropped and the chart mixes feeds. |
ITimeBarPeriodSupport |
bool SupportsNatively(TimeSpan period), TimeSpan? LargestNativeDivisor(TimeSpan period); extension TimeBarPeriodSupportExtensions.CanServe(period) refuses timeframes the venue cannot serve. |
BackfillProgress |
record (int BarsReceived, DateTime? LatestBarTimeUtc, double PercentComplete, string StageMessage). |
BackfillResultWithOrderFlow |
Bars, OrderFlow, FirstBarStartUtc, LastBarEndUtc, Count; static Empty. |
BackfillResultWithOpenInterest |
Bars, OpenInterest, FirstBarStartUtc, LastBarEndUtc, Count; static Empty. |
BackfillDateRange |
struct (DateTime fromUtc, DateTime toUtcExclusive): FromUtc, ToUtcExclusive, Duration. |
IVolumeConsistencyObserver |
void OnMismatch(in VolumeMismatchEvent); NullVolumeConsistencyObserver.Instance. |
VolumeMismatchEvent |
record (string InstrumentId, DateTime BarStartUtc, long ReportedVolume, long ObservedTradeVolume, long Mismatch). |
Storage seam — SabrTrader.Pipeline.Storage
The local tick/bar cache. Stores are keyed by (providerKey, instrumentId[, period]); reads
return the data found and the DateRanges still missing so the host can fetch the gaps.
| Type | Members |
|---|---|
ITickStore |
TickStoreReadResult Read(key, fromUtc, toUtcExclusive), Write(key, fromUtc, toUtcExclusive, ticks), EnumerateKeys(), TickStoreKeyInfo? Describe(key), Clear(key), ClearAll(). |
IPartialDayTickStore : ITickStore
|
adds WritePartialDay(TickStoreKey key, DateTime dayUtc, IReadOnlyList<Tick> ticks). |
ITimeBarStore |
TimeBarStoreReadResult Read(key, fromUtc, toUtcExclusive), Write(...), EnumerateKeys(), TimeBarStoreKeyInfo? Describe(key), Clear(key), ClearAll(). |
IPartialDayTimeBarStore : ITimeBarStore
|
adds WritePartialDay(TimeBarStoreKey key, DateTime dayUtc, IReadOnlyList<Bar> closedBars). |
IHistoricalTimeBarSource |
Task<IReadOnlyList<Bar>> LoadTimeBars(string instrumentId, TimeSpan period, DateTime fromUtc, DateTime toUtcExclusive, ct); progress variant IProgressReportingTimeBarSource. |
INativeBarSource |
bool SupportsNativeBars(spec), Task<IReadOnlyList<Bar>> LoadNativeBars(spec, fromUtc, toUtcExclusive, ct); progress variant INativeBarProgressSource. |
TickStoreKey |
record (string providerKey, string instrumentId). |
TimeBarStoreKey |
record (string providerKey, string instrumentId, TimeSpan period, string? adjustmentVersion = null). |
TickStoreReadResult |
record (IReadOnlyList<Tick> Ticks, IReadOnlyList<DateRange> MissingRanges). |
TimeBarStoreReadResult |
record (IReadOnlyList<Bar> Bars, IReadOnlyList<DateRange> MissingRanges). |
TickStoreKeyInfo |
record (TickStoreKey Key, int TickCount, DateTime? FirstTickUtc, DateTime? LastTickUtc, IReadOnlyList<DateRange> CoveredRanges, long ApproxByteSize). |
TimeBarStoreKeyInfo |
record (TimeBarStoreKey Key, int BarCount, DateTime? FirstBarStartUtc, DateTime? LastBarStartUtc, IReadOnlyList<DateRange> CoveredRanges, long ApproxByteSize). |
DateRange |
record (DateTime FromUtc, DateTime ToUtcExclusive): IsEmpty, Length, Contains(utc), Overlaps(other), TouchesOrOverlaps(other). |
ISequenceGapObserver |
void OnGap(in SequenceGapEvent); NullSequenceGapObserver.Instance. |
SequenceGapEvent |
record (string InstrumentId, long LastSeenSequence, long NextSequence, long GapSize, int AtTickIndex, DateTime AtTimestamp). |
BackfillSourceUnavailableException |
Exception thrown when a backfill source cannot serve a request. |
Backfill activity
The host surfaces a live progress UI by reading the activity registry; providers/sources report via a handle obtained from the tracker.
| Type | Members |
|---|---|
IBackfillActivityTracker |
IBackfillActivityHandle Begin(BackfillActivityDescriptor descriptor). |
IBackfillActivityHandle : IDisposable
|
Guid Id { get; }, void Update(BackfillActivityStatus status, double percentComplete, int itemsLoaded, string stageMessage). |
INativeBarStore · IPartialDayNativeBarStore
|
Cache for venue-built NON-time bars, keyed by NativeBarStoreKey (a
BarSpecCacheKey under a CacheProviderKey);
NativeBarStoreReadResult / NativeBarStoreKeyInfo mirror the tick-store
shapes. HOST-implemented — a venue reaches it through context.Stores.NativeBars and
never constructs the keys. |
IOrderFlowBarStore |
Cache for footprint ladders, keyed by OrderFlowBarStoreKey;
OrderFlowBarStoreReadResult / OrderFlowBarStoreKeyInfo mirror the same
shapes. HOST-implemented — reached through context.Stores.OrderFlowBars. |
BarSpecCacheKey · CacheProviderKey
|
The cache identity behind the native-bar / order-flow stores: a bar specification and the provider namespace it caches under. Host-side plumbing; listed for completeness. |
IBackfillActivityRegistry |
IReadOnlyList<BackfillActivitySnapshot> Snapshot(), event Action<BackfillActivityChange>? Changed. |
BackfillActivityDescriptor |
record (string instrumentId, BackfillKind kind, TimeSpan? barPeriod, DateTime fromUtc, DateTime toUtcExclusive, string providerKey, string? providerDisplayName = null). |
BackfillActivitySnapshot |
record (Guid Id, BackfillActivityDescriptor Descriptor, BackfillActivityStatus Status, double PercentComplete, int ItemsLoaded, string StageMessage, DateTime StartedUtc, DateTime LastUpdatedUtc). |
BackfillActivityChange |
record (BackfillActivityChangeKind Kind, BackfillActivitySnapshot Snapshot). |
BackfillActivityChangeKind |
enum: Started, Updated, Ended. |
BackfillKind |
enum: Bars, Ticks, NativeBars. |
BackfillActivityStatus |
enum: Queued, Fetching, Done, Failed. |
Historical data service — SabrTrader.Pipeline.Services
The host-side facade your plugins call to load history by venue without touching the store/provider seams directly.
| Type | Members |
|---|---|
IHistoricalDataService |
Task<LoadResult> LoadAsync(string venueKey, BarSpecification spec, DateTime fromUtc, DateTime toUtcExclusive, IProgress<LoadProgress>? progress = null, ct); Task<IReadOnlyList<Tick>> LoadTicksAsync(string venueKey, string instrumentId, DateTime fromUtc, DateTime toUtcExclusive, IProgress<LoadProgress>? progress = null, ct). |
LoadProgress |
record (int BarsReceived, DateTime LatestTimestampUtc, double PercentComplete). |
LoadResult |
record (IReadOnlyList<Bar> Bars, LoadSummary Summary). |
LoadSummary |
record (string VenueKey, string InstrumentId, BarSpecification Spec, DateTime FromUtc, DateTime ToUtcExclusive, int BarCount, DateTime? FirstBarTimeUtc, DateTime? LastBarTimeUtc). |