MarketSnapshot is the normalized language of AtlantisV2 market state.
It is not a venue payload. It is not an option chain row. It is not a database table. It is the as-of view that features and patterns consume.
Snapshot Shape
The current MarketSnapshot carries:
snapshot_idcycleunderlyingprimary_instrumentcapabilitiessession_contextfreshnessqualitysource_lineageevents
The snapshot is intentionally capability-based. Feature definitions ask for capabilities, not instrument classes.
Capability Blocks
Implemented capability names include:
- price
- volume
- open interest
- funding
- volatility
- options surface
- liquidity
- microstructure
- execution cost
- regime
Implemented block types currently include:
PriceCapabilityVolumeCapability
The registry is typed:
CAPABILITY_TYPES = {
CapabilityName.PRICE: PriceCapability,
CapabilityName.VOLUME: VolumeCapability,
}
Wrong-typed capability entries raise instead of degrading silently.
Availability States
Capability availability is explicit:
PRESENTMISSINGSTALEINVALIDWITHHELD
This is one of the most important framework rules. Missing data must not become 0.0. Stale data must not look present. Invalid data must not look missing.
SnapshotBuilder
SnapshotBuilder currently builds a snapshot from EventEnvelope[].
It owns:
- event deduplication
- future event filtering
- stable event ordering
- event-to-market-event normalization
- invalid payload quality flags
- price capability construction
- freshness flags
- source lineage map
Adapters should not duplicate those responsibilities.
Price Capability
PriceCapability supports:
- present price with last price, event timestamp, and source
- missing price with reason
- stale price with last observed price and reason
PriceCapability.present(
last_price=65000.0,
event_ts=event_ts,
source="event_envelope",
)
Quality Flags
Snapshot quality currently records flags such as:
future_event_ignoredduplicate_event_ignoredinvalid_price_payloadmissing_pricestale_price
These flags are later visible to scoring and permission logic, where data quality can reduce confidence or reject an intent.
Instrument References
UnderlyingRef and InstrumentRef keep identity separate:
- underlying: BTC, NIFTY, BANKNIFTY
- instrument: BTC-PERP, NIFTY option contract, spot symbol, synthetic index
Core can reason about a BTC thesis without assuming the final expression is a perp, spot position, or option.
What Comes Next
The next market-state expansions should be capability blocks, not hardcoded snapshot fields:
- open interest capability
- funding capability
- volatility capability
- options surface capability
- liquidity and execution cost capability
Each should include availability, event timestamp, source, and typed value fields.