Repository navigation
Conversation
shkarinn
force-pushed
the
feat/moex-iss-provider
branch
from
September 29, 2026 13:08
2842c4c to
9b25cbf
Compare
Author
|
Rebased onto current |
Yahoo no longer serves MOEX listings, and a bare MOEX ticker resolves to whatever other venue shares it (AFLT -> an Amundi ETF on XPAR, CHMF -> CHMFX), so Russian shares end up valued with a foreign security's prices. Add a no-key MOEX provider on the public ISS API: - latest price (last trade, then official current price, then previous close) - end-of-day history, paged per main T+ board and merged per trading date, so board moves (TQTF -> TQBR) and odd-lot/settlement boards are handled - search and profile (name, ISIN, type) Register MISX (Moscow Exchange, RUB) in the exchange registry, restrict the provider to MISX, resolve its bare SECID as trusted, and prefer MOEX for new MISX equities. The migration adds the provider row because the quote client only builds providers listed in market_data_providers. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
shkarinn
force-pushed
the
feat/moex-iss-provider
branch
from
September 30, 2026 15:23
9b25cbf to
9bc62eb
Compare
This branch has not been deployed
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.
Description
Adds a Moscow Exchange (MOEX) market data provider backed by the public
ISS API (no API key).
Problem
Yahoo no longer serves MOEX listings, and no other built-in provider covers
them. Worse, a bare MOEX ticker resolves to whatever other venue shares it, so
Russian shares get valued with a foreign security's prices. Real cases from one
broker import:
What this adds
MoexProvider(crates/market-data/src/provider/moex/), equities only,coverage restricted to MIC
MISX(strict: rejectsmic = None).(stamped with its own date before the first trade of the day).
(
TQBR,TQTF,TQIF, currency ETF/fund boards) 100 rows at a time andmerges one bar per trading date. This follows board moves (e.g.
TMOSmoved
TQTF→TQBRin 2026), skips odd-lot (SMAL) and settlement(
SPEQ) boards, prefers the board in the hinted currency, and falls backto
LEGALCLOSEPRICEon days without trades. Delisted securities keeptheir history (e.g.
MAIL,YNDX).SUR→RUB;SECIDs are validated before they reach the URL path.
MISX(Moscow Exchange, RUB, Europe/Moscow) inexchanges.json, plusRUB → MISXcurrency priority. No Yahoo suffix: Yahoo has no MOEX data, soa Yahoo lookup for
MISXstays an untrusted fallback checked bycheck_profile.inferred_provider_configprefersMOEXfor newMISXequities (samepattern as Börse Frankfurt for Xetra ISINs), so Yahoo (priority 1) is not
tried first.
DATA_SOURCE_MOEX,ProviderId::MOEX, client construction,e2e "disabled" list, provider settings info.
Why a migration
The quote client only constructs providers that have a row in
market_data_providers(MarketDataClient::newiterates enabled rows), so theprovider cannot be used without one. The migration inserts
MOEX(
INSERT OR IGNORE, priority 14, enabled, no logo; the settings page alreadyhandles a missing logo). It does not touch existing assets.
Out of scope
Bonds (ISS prices them in % of face on separate markets) and dividends.
Validation
Run in
rust:1.98.1(toolchain fromrust-toolchain.toml):cargo fmt --all -- --check— cleancargo test --locked -p wealthfolio-market-data— 308 passed (16 new: parsingfixtures trimmed from real ISS responses, coverage, resolver)
cargo test --locked -p wealthfolio-core— 2074 passed (incl. newtest_moex_equity_prefers_moex)cargo test --locked -p wealthfolio-storage-sqlite— all passed (migrationapplies);
portable_permissionsneeds an unprivileged runner, as the testitself states, and passes when run as a normal user
cargo clippy --locked -p wealthfolio-market-data -p wealthfolio-core --all-targets --all-features -- -D warnings— cleancargo check --locked -p wealthfolio-server— ok#[ignore]):cargo test -p wealthfolio-market-data --test moex_live -- --ignored— passesagainst ISS: search, profile ISIN, latest quote, multi-page history (AFLT
2020-02-26 close 108.22 matches ISS), delisted GDR history, unknown SECID error.
Not run:
wealthfolio-app(Tauri) compilation and frontend checks — nofrontend or Tauri code changed.
Checklist
Contributor License Agreement.
By submitting this PR, I agree to the
CLA.
🤖 Generated with Claude Code