Data Hub
The aggregation layer that pulls quotes, fundamentals, news, and technicals from your configured providers into the workspace so the agent can research from local files.
The Data Hub is Qoc's market-data aggregation layer: it connects to your configured providers, normalizes the data they return, and writes it into the workspace so every agent tool can read from fast local files rather than making live API calls mid-analysis.
How data lands in the workspace
When you run qoc up, the Data Hub starts a background sync process that polls your configured providers on the intervals defined in desk.toml. Incoming data is written to structured files inside the workspace: OHLCV price bars go into research/prices/, fundamental data into entity files under entities/, and news headlines into inbox/news/.
The agent reads these local files through MCP tools rather than calling provider APIs directly. This means the agent's research phase is fast and offline-capable after the initial sync, and provider credentials never need to be embedded in agent prompts.
Data categories and workspace locations
| Category | Workspace path | Updated by |
|---|---|---|
| Quotes (last trade / bid-ask) | research/prices/quotes/ | Streaming or polled; configurable interval |
| OHLCV bars (daily, intraday) | research/prices/bars/ | Polled; per-symbol on schedule |
| Fundamentals (ratios, income, balance) | entities/<symbol>.toml — [fundamentals] section | Daily or on-demand |
| Filings and earnings summaries | entities/<symbol>.toml — [filings] section | On-demand or weekly |
| News and RSS headlines | inbox/news/ | Polled; per-feed on schedule |
| Technical indicators | Computed on-the-fly from OHLCV bars by the technical_analysis tool | Always fresh |
| Sector/index data | research/sectors/ | Polled; configurable |
Configuring providers
Providers are declared in the [data_hub] section of desk.toml. Each provider entry requires a kind (the provider type recognized by your Qoc build) and the relevant credentials — typically an API key stored in an environment variable or a local secrets file. Qoc never hardcodes credentials in workspace files.
You can configure multiple providers simultaneously; for example, one provider for real-time quotes and a separate one for fundamentals and filings. Each data category can be mapped to a specific provider in the [data_hub.routing] sub-table.
Sample Data Hub configuration
[data_hub]
# Primary provider for quotes and OHLCV bars.
[[data_hub.providers]]
kind = "market-data-primary"
api_key_env = "QOC_MARKET_KEY"
quote_interval_s = 15 # how often to refresh quotes
bar_intervals = ["1d", "1h"] # bar resolutions to keep locally
# Secondary provider for fundamentals and filings.
[[data_hub.providers]]
kind = "fundamentals-provider"
api_key_env = "QOC_FUNDAMENTALS_KEY"
refresh = "daily" # pull fresh fundamentals once a day
[data_hub.routing]
quotes = "market-data-primary"
ohlcv = "market-data-primary"
fundamentals = "fundamentals-provider"
filings = "fundamentals-provider"Your keys, your data
Qoc does not proxy or store your market data. Every request goes from your machine directly to the provider you configured using the API key you supplied. Qoc never sees your credentials — it reads them from the environment variable or secrets file at startup.
Caching and staleness
The Data Hub maintains a local cache of all fetched data keyed by symbol, resolution, and provider. If a tool request can be satisfied from the cache and the data is within the configured TTL, no network call is made. TTLs are set per-category in desk.toml and default to sensible values (15 s for quotes, 1 d for fundamentals).
You can force a full refresh of any symbol with qoc run 'refresh data for <symbol>', which instructs the agent to invalidate the cache and pull fresh data from all configured providers before proceeding.
Run qoc status to see Data Hub health
The qoc status output includes a Data Hub section showing which providers are reachable, the last successful sync time per category, and a count of symbols currently tracked. Use this to confirm your provider configuration is working before starting a research session.
Data Hub capabilities
Symbol search
Resolve company names or ISINs to tradeable symbols before pulling data.
Equity research
Pull fundamentals and filings summaries into entity files for agent analysis.
Technical analysis
Compute SMA, EMA, RSI, MACD, ATR, and other indicators over local OHLCV bars.
Sector rotation
Rank sectors by relative strength and surface rebalancing opportunities.
News and RSS
Ingest headlines and RSS feeds into the inbox and onto tracked entities.
Retrospective
Analyze past decisions and trades from snapshots and orders history.