ImexInstrumentMetadata
Parsed view of the IMEX exchange's daily instrument metadata dump (https://storage.imexchange.tech/TS/instr-{date}.json). Holds the three derived maps consumers care about: - InstrumentLots: per-trading-instrument lot multiplier (units of underlying per 1 wire contract). Used by TradeImexDialect to scale OrderRegister.Volume / VisibleVolume down to wire amounts and to scale AddReport / deal.Amount up to framework Volume / TradeVolume. - SpotInfoByBalance: per-spot-balance pair of (instrument-lot, underlying balance_id). Used by RiskImexDialect to (a) scale per-clearing-date positions by lot, (b) aggregate them under the underlying via UnderlyingId. - NativeIds: SecurityId -> wire native id. Used by CsvNativeIdStorageProvider as the framework's identity map. Single source of truth for parsing the JSON layout. The caller owns the stream — file, network, memory, anything goes — the parser never touches the filesystem itself. Typed POCO model deserialised through Newtonsoft (via CreateJsonSerializerSettings) so any schema change — renamed / retyped / missing wrapper key — surfaces as a JsonReaderException / JsonSerializationException from Parse rather than a silent zero-row map.
Propiedades
InstrumentLots : IReadOnlyDictionary<int, decimal>
Trading instrument_id -> lot multiplier (underlying units per contract).
NativeIds : IReadOnlyDictionary<SecurityId, long>
SecurityId -> native id (instrument_id or balance_id) as expected by the wire protocol.
SpotInfoByBalance : IReadOnlyDictionary<int, ValueTuple<decimal, int>>
Spot balance_id -> (lot from the referencing trading instrument, underlying balance_id).
Métodos
Load(Stream) : ImexInstrumentMetadata
Strict-typed load from an arbitrary stream. Throws on any layout mismatch — missing wrapper key, missing arrays, wrong field types — so a silent IMEX schema bump produces a loud failure on first run.