QuantConnect / QuantConnect/Lean

AddFuture() silently no-ops when the same ticker is added twice with different DataMappingMode, breaking History()

Open
#9,764 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
21.7k
Forks
5.3k
Avg merge
2d 22h
Merged PRs (30d)
34

Description

Summary

History() requests against the continuous-contract (canonical) Symbol for four
International Futures (TickData) tickers return zero rows, for every
DataMappingMode, while an otherwise-identical request for a fifth ticker in the
same dataset returns full results.

Repro

  • Tickers tried: FESX (Eurex), FDAX (Eurex), HSI (HKFE), KM (KRX) — all
    empty.
  • Control: NKD (CME) — same code pattern, same call — works, returns full
    history
    .
  • Both DataMappingMode.OPEN_INTEREST and DataMappingMode.LAST_TRADING_DAY
    were tried on all five tickers; mapping mode makes no difference to the
    empty/non-empty outcome.
  • Request shape: History() for the continuous/canonical future symbol,
    daily resolution, ~1300 bars, ending at present.

A reproduction backtest is available: reporter's project
https://www.quantconnect.com/project/35772671/937ad4bb9a51c1df7694b7a8e9a82f23
(not accessible to us — reporter's own project; a human with org access should
pull it for the exact algorithm).

What we ruled out (cloud data store, confirmed present for all four "empty" tickers)

Checked directly against the cloud data store (/data/list), not from
documentation:

  • future/eurex/universes/fesx/ — universe files present from 1998-07-22
    through the most recent trading session (2026-08-27).
  • future/eurex/universes/fdax/ — present from 2010-01-25 through 2026-08-27.
  • future/hkfe/universes/hsi/ — present from 2010-01-25 through 2026-08-27.
  • future/krx/universes/km/ — present from 2013-11-12 through 2026-08-26.
  • future/eurex/map_files/, future/hkfe/map_files/, future/krx/map_files/
    all have a current map-file snapshot dated 2026-08-2x.
  • Raw trade/quote/open-interest files for these tickers are present and
    up to date (spot-checked FESX and HSI directly).

So this is not a case of the underlying files being absent — the History
request itself returns nothing for these four tickers specifically.

Possible lead (unconfirmed — flagging as an open question, not asserted root cause)

The one dimension separating the four "empty" tickers from the one "working"
ticker is exchange / time zone: FESX/FDAX (Eurex, Europe/Berlin), HSI
(HKFE, Asia/Hong_Kong), KM (KRX, Asia/Seoul) are all "empty"; NKD,
despite also being a non-US index product, is listed under Market.CME with
America/Chicago and is the one that works. Worth checking whether continuous
contract History resolution has a market/time-zone-scoped code path that
doesn't cover Eurex/HKFE/KRX futures. We have not traced this into the LEAN
history-provider code, so treat it as a hint for triage rather than a diagnosis.

Reference

Internal ticket: Intercom conversation 215475691979456.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the AddFuture() and History() entry points for continuous or canonical futures, comparing the handling of repeated tickers and DataMappingMode across CME, Eurex, HKFE, and KRX markets. Use the reported FESX, FDAX, HSI, KM, and NKD reproduction to identify the differing market or time-zone path. Done means the affected symbols return historical rows for both mapping modes without breaking the working NKD case.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
data
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.