Story: ores.shell command for market data import
Table of Contents
This page documents a story in Sprint 22. It captures the goal, current status, acceptance criteria, and the tasks that compose it.
Goal
import_market_data_request
(projects/ores.marketdata/api/include/ores.marketdata.api/messaging/import_protocol.hpp,
served by ores.marketdata.core::service::import_service) is only
ever triggered by the Qt ImportTradeDialog
(projects/ores.qt/trading/src/ImportTradeDialog.cpp) — there's no
non-interactive way to run a market data import. This blocks
Synthetic data collections: Basic and Realistic's "import the
2016-02-05 vintage" task, and more generally blocks any scripted or
provisioning-time import. Add an ores.shell command that reads a
market.txt=/=fixings.txt file (or stdin) and an optional source tag,
and sends the same import_market_data_request over NATS that the Qt
dialog already sends.
Status
| Field | Value |
|---|---|
| State | DONE |
| Parent sprint | Sprint 22 |
| Now | Done — all tasks closed. |
| Waiting on | Nothing. |
| Next | Nothing. |
| Last touched | 2026-07-04 |
Acceptance
- A new
ores.shellcommand (e.g.marketdata import --file <path> [--fixings <path>] [--source <tag>]) sends animport_market_data_requestover NATS via the existing shell client infrastructure, reusingimport_serviceas-is — no new server-side code. - Running it against a representative ORE example vintage with
--source ore.referenceproduces the expectedseries_count=/=observation_countresponse and queryablemarket_observationrows. Met againstAcademy/TA002_IR_SwapandMarketRisk/HistSimVar;Legacy/Example_56specifically still fails on a separate, pre-existingimport_servicebug tracked at Full market.txt import hits duplicate observation key. - Documented in a recipe (
doc/recipes/), following existingores.shellcommand documentation conventions.
Tasks
| Task | State | Start | End | Description |
|---|---|---|---|---|
| Implement ores.shell market data import command | DONE | 2026-07-04 | 2026-07-04 | Add a shell command sending import_market_data_request (file/stdin content, optional source tag) over NATS, reusing the existing import_service. |
Decisions
- Command sends the whole file (or files) in one
import_market_data_request, matching whatImportTradeDialogalready sends — no chunking or streaming, sinceimport_servicealready handles the full parse/persist server-side. - Reused
bundles_commands.cpp'sprocess_publishas the template for the parse_args → authenticated_request →rfl::jsonround-trip shape, keeping a local per-filedo_auth_request<Response>helper rather than extracting a shared one (matches existing convention: no shared helper exists across command files today). - Documented against three representative ORE example vintages
rather than only the story's originally-named
Legacy/Example_56, since that vintage's full file hits a separate, pre-existingimport_servicebug — captured rather than silently worked around.