DotQuant.Exchanges
0.2.0
dotnet add package DotQuant.Exchanges --version 0.2.0
NuGet\Install-Package DotQuant.Exchanges -Version 0.2.0
<PackageReference Include="DotQuant.Exchanges" Version="0.2.0" />
<PackageVersion Include="DotQuant.Exchanges" Version="0.2.0" />
<PackageReference Include="DotQuant.Exchanges" />
paket add DotQuant.Exchanges --version 0.2.0
#r "nuget: DotQuant.Exchanges, 0.2.0"
#:package DotQuant.Exchanges@0.2.0
#addin nuget:?package=DotQuant.Exchanges&version=0.2.0
#tool nuget:?package=DotQuant.Exchanges&version=0.2.0
DotQuant.Exchanges
The canonical exchange registry for the DotQuant platform — trading hours, timezones and
asset-class index routing for every venue, computed locally with no API call and no database.
One row per exchange drives everything: market open/close, session windows, timezone, and the
prices-* / news-* index a bar or article belongs to.
This package replaces the hand-duplicated ExchangeSchedule / ExchangeMetadata copies that used to
live in DotQuant.Pricing, DotQuant.ProcessManagers and DotQuant.Trading.Api. It is the single
source of truth: change a venue here, cut a release, bump the package in the consumers.
Why a package and not a runtime API? This is static, build-time-known reference data on hot paths (per-bar index routing, per-tick market-state). A NuGet package keeps it deterministic and dependency-free — no network hop, no coupling of write-side availability to the query API, and no return to the silent-fallback fragility that came from sourcing exchange metadata out of a mutable store.
Install
dotnet add package DotQuant.Exchanges
Usage
using DotQuant.Exchanges;
// Market state right now (open/close detection — used by the pricing process manager)
var (isOpen, closeUtc, nextOpenUtc) = ExchangeSchedule.GetState("NASDAQ", DateTime.UtcNow);
// Which Elasticsearch index a bar/article routes to (used by the Pricing component)
string index = ExchangeSchedule.GetIndex("XSTU"); // "prices-equities-emea"
string news = ExchangeSchedule.GetIndex("NASDAQ", "news"); // "news-equities-americas"
// Session window for a specific date (UTC), or (null, null) for weekends / unknown venues
var (openUtc, sessionCloseUtc) = ExchangeSchedule.GetSessionForDate("LSE", new DateOnly(2025, 6, 2));
// Read/UI side (used by the Trading API): market-strip region, default chart feed, quote currency
string? region = ExchangeSchedule.GetRegion("LSE"); // "Europe"
string defChart = ExchangeSchedule.RegionDefaults["US"]; // "NYSE-SPX"
string? ccy = ExchangeSchedule.GetCurrency("XETRA"); // "EUR" (null for crypto/forex)
// Other helpers
string? tz = ExchangeSchedule.GetTimezoneId("TSE"); // "Asia/Tokyo"
DateOnly prev = ExchangeSchedule.PreviousTradingDay(DateOnly.FromDateTime(DateTime.UtcNow));
Unknown / no-hours venues (crypto, forex, indices) are treated as always open and route to
{prefix}-unknown when the asset class can't be placed — an unrecognised code never blocks polling or
silently drops data.
Cutting a release
Use the helper script — it finds the last tag, bumps it, and pushes; you don't type a git command or look up the version:
./scripts/release.sh # bump minor (default): v0.3.4 → v0.4.0
./scripts/release.sh patch # bump patch: v0.3.4 → v0.3.5
./scripts/release.sh major # bump major: v0.3.4 → v1.0.0
./scripts/release.sh v0.5.0 # exact version
(On Windows, run it from Git Bash.) It refuses to run on a dirty tree or an existing tag.
The CI/CD pipeline builds + tests on every push to main, and on the
v* tag the script pushes it packs that version and publishes to NuGet.org (via the
organization-level NUGET_API_KEY secret). SemVer: a venue add/edit is a patch or minor bump.
After releasing, bump DotQuant.Exchanges in the consumers (DotQuant.Pricing,
DotQuant.ProcessManagers, DotQuant.Trading.Api).
Consuming
It's a normal public NuGet.org package — dotnet add package DotQuant.Exchanges. No nuget.config,
no auth, no Docker build args; restores anonymously in CI, Docker builds, and local dev.
Maintaining the registry
To add or change a venue you edit src/ExchangeSchedule/ExchangeSchedule.cs once and add a test —
see .github/instructions/general.instructions.md for
the field reference, the asset-class/region rules, and the consumer-migration notes.
Run locally
dotnet build src/DotQuant.Exchanges.slnx
dotnet test src/DotQuant.Exchanges.slnx
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.2.0 | 120 | 6/13/2026 |