3 Commits
Author SHA1 Message Date
TIANHE 79b196bcf4 v5.0.1
Signed-off-by: TIANHE <TIANHE@GMAIL.COM>
2026-07-18 17:43:02 +08:00
dinger 361f0c8c6b security(moex): validate ticker/board for ISS URL path; add tests
Made-with: Cursor
2026-04-29 14:17:59 +08:00
Claude Code eee8b02af2 feat(data): add MOEX (Moscow Exchange) equities data source for analysis/backtest
Adds a read-only MOEX data source backed by the public MOEX ISS HTTP API
(https://iss.moex.com/iss). Targets the TQBR equities board so common Russian
tickers (SBER, GAZP, LKOH, ...) work out of the box.

What's new
- app/data_sources/moex.py: MOEXDataSource with get_kline / get_ticker
  - QuantDinger timeframes mapped to ISS intervals; 5m/15m/30m/4H are
    resampled from the nearest finer native interval (1m or 60m)
  - ISS naive timestamps treated as Europe/Moscow (UTC+3) and converted to
    Unix UTC seconds
  - Pagination via ISS start parameter
  - Symbol normalization handles SBER, SBER.ME, GAZP:MOEX, etc.
- app/data_sources/factory.py: registers MOEX market + aliases
- app/routes/market.py: MOEX in /market/types between HKStock and Crypto
- app/services/symbol_name.py: resolves MOEX names from ISS securities endpoint
- app/services/strategy.py: explicit guard - MOEX cannot be used as a live
  trading market_category (create / batch / update paths)
- tests/test_moex_data_source.py: 11 offline unit tests (mocked HTTP)
- scripts/verify_moex.py: live ISS smoke-test script

Limitations
- Analysis & backtesting only. No live order placement on MOEX.
- TQBR board only by default. Other boards can be enabled by constructing
  MOEXDataSource(board=...) explicitly.
- Sub-hour non-native timeframes (5m/15m/30m) and 4H are resampled
  client-side; large limits at fine timeframes pull more data.
2026-04-28 13:40:39 +00:00