Repository navigation
feat(market-ports): 0.21.0 -- adapters.financedatabase (INSTRUMENTS) + Instrument reference data (AD-14) - #106
Merged
Conversation
…TRUMENTS adapter; Instrument reference data The [reference] extra (financedatabase, polars) serves Capability.INSTRUMENTS: one Instrument per symbol from the first of equities, ETFs, indices, funds, currencies, cryptos that lists it, an InstrumentStatus not_found for one none lists, and a VendorError (nothing partial kept) when a class cannot load, so not_found always means every class was searched. Classes load once per fetcher, off the loop, under a lock, keeping only the mapped columns (~130 MB as Polars frames). Instrument gains optional reference fields (currency, country, state, city, sector, industry_group, industry, category_group, category, family, market, market_cap_class, isin, website, summary). Symbol also accepts '=' (EURUSD=X). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mjdevaccount
enabled auto-merge (squash)
December 3, 2026 23:52
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ancedatabase # Conflicts: # README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
market-ports 0.21.0 —
adapters.financedatabase(library-placement AD-14, groundwork half)Instrument contract change (first):
Instrumentgains optional reference text fields —currency,country,state,city,sector,industry_group,industry,category_group,category,family,market,market_cap_class(a size label, never a number),isin,website,summary. Optional fields on the existing row (not a second row type):INSTRUMENTSalready promisesInstrument, and "unknown is None" is the models module's own convention.The adapter (
[reference]extra: financedatabase, polars), first implementation of the unusedCapability.INSTRUMENTS/InstrumentsQueryport, in the built-in roster:InstrumentStatusnot_found, never an empty successVendorError, nothing partial cached, sonot_foundalways means every class was searchedSymbolnow also accepts=(currency pairs likeEURUSD=X).Library checked: financedatabase's own public
select(as_pandas=False); itssearchis a substring match over all columns, not an exact lookup.Tests
financedatabase/cases/instruments.json, recorded through the fetcher's ownlookupon 2.5.2): one symbol per class + an unknown; blank/nan/Nonecells; two drift casesVendorErrorand retries, missing extra isImportErrorMARKET_PORTS_LIVE=1): passed locallytests/green; ruff, format, lint-imports, vulture, mypy, pyright verifytypes 100%🤖 Generated with Claude Code