Status: contract version 1.
A client's IT team can feed QuantX from their own market data
service by writing a provider: a small console executable built on
QuantX.DataProviders.dll, installed in a folder the
settings file names. The shared host in that library
parses the command line, opens the store, works out what the market needs
and writes the report, so the provider itself only fetches. The bundled CSV
provider is the worked example below; the full command line is in
Provider protocol.
1. Build the executable
Create a .NET 10 console application that references QuantX.dll
and QuantX.DataProviders.dll, the copies installed with the
application:
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net10.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<Reference Include="QuantX">
<HintPath>C:\Program Files\QuantX\QuantX.dll</HintPath>
</Reference>
<Reference Include="QuantX.DataProviders">
<HintPath>C:\Program Files\QuantX\QuantX.DataProviders.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
Unlike a data store plug-in, a provider runs in its own process, so it ships
the QuantX assemblies it was built with. The build copies them and
the managed libraries they use; to open the bundled SQLite store, also copy
the application's runtimes folder (SQLite's native library) beside the
executable. Rebuild the provider when QuantX' contract version
changes.
2. Implement the provider
A quote provider implements IMarketDataProvider:
public interface IMarketDataProvider
{
string Name { get; }
Task<ProviderResult> FetchAsync(MarketDataRequirements needed, CancellationToken cancellationToken);
// Optional: several dates of one market at once, for a backfill.
Task<ProviderResult> FetchRangeAsync(IReadOnlyList<MarketDataRequirements> needed, CancellationToken cancellationToken);
}
needed lists what one market needs on one date: its quote keys
(instrument and field, such as SAR-SAIBOR-3M-IRS 5Y | Mid) and, for each
index, the window of fixing dates to fetch. FetchAsync returns the quotes and
fixings it finds, translated into the library's names and units; it need not
report what it lacks, since the host reads the store back afterwards. A
provider that answers a date range at once overrides FetchRangeAsync, which
a backfill calls a week at a time.
The CSV provider, CsvMarketDataProvider, reads each file of its folder
with QuoteTable and returns the rows each requirement names. A vendor
provider keeps its own mapping from library names to tickers and converts
units (a rate in percent becomes a decimal).
A series provider implements IDataSeriesProvider instead (DescribeAsync
and FetchAsync by code) and is run with DataSeriesHost.
3. Write Program.cs
The executable is one call to the host. The CSV provider's is:
return await ProviderHost.RunAsync(args, command => new CsvMarketDataProvider(command.Option("input"))).ConfigureAwait(false);
command.Option("input") reads the provider's own --input option. A
provider that holds a connection implements IDisposable or
IAsyncDisposable; the host disposes it when the command ends. Commands of
the provider's own go in the ProviderHost.RunAsync overload that takes
them, with a line each for the usage text.
A client that opens its own store, or schedules runs itself, can call the
ProviderHost.RunAsync overload that takes a document store and a market
data store, or MarketDataFeeder directly. These do not read the settings.
4. Write the manifest
Put a quantx-plugin.json beside the executable (schema:
plugin-manifest.schema.json). The CSV
provider's is:
{
"contractVersion": 1,
"kind": "provider",
"name": "CSV",
"description": "Quotes and fixings from a folder of CSV files written in the library's names and units.",
"executable": "QuantX.DataProviders.Csv.exe",
"serves": ["quotes"]
}
Give the manifest the same name as the provider's Name, so that messages
and settings agree.
5. Install it
Copy the build output, with its manifest, into a folder of its own, and name that folder, or the folder above it, in the settings:
{
"contractVersion": 1,
"providers": {
"folders": ["C:\\Program Files\\Acme\\QuantXProviders"]
}
}
Every provider fills the one market: it fetches the quotes it can answer and the market is built from whatever the store then holds.
6. Check it
Run it against a SQLite file of its own before pointing it at a shared store:
Acme.QuantXProvider requirements --date 2026-10-14 --store scratch.db
Acme.QuantXProvider snapshot --date 2026-10-14 --store scratch.db
Acme.QuantXProvider check --date 2026-10-14 --store scratch.db
requirements prints the keys the provider must answer; check exits with
0 once the store holds everything the market needs on that date.