Skip to content

Index API Reference

msm.api.indices

DerivedIndex

Bases: BaseModel

Canonical Index identity together with one persisted calculation version and legs.

upsert(*, unique_identifier, display_name, definition, legs, description=None, provider=None, metadata_json=None) classmethod

Persist an idempotent derived index with explicit compensating rollback.

IncompleteObservationsError

Bases: IndexCalculationError

Raised when the methodology requires complete observations and they are absent.

Index

Bases: MarketsMetaTableRow

User-facing market index reference row.

delete(uid, *, confirmation_token=None, confirmation_phrase=None, acknowledged_warning_codes=(), idempotency_key=None, actor=None) classmethod

Delete one Index only through the reviewed bulk-deletion contract.

list_page(request=None, **kwargs) classmethod

Return a typed, counted Index catalog page.

IndexCalculationDefinition

Bases: BaseModel

Typed persisted or in-memory derived-index methodology version.

semantic_payload()

Return output-affecting fields used by the deterministic definition hash.

IndexCalculationError

Bases: ValueError

Base structured calculation-contract failure.

IndexCalculationLeg

Bases: BaseModel

Typed ordered input leg for a derived-index definition.

IndexCalculationResult

Bases: BaseModel

Pure calculation result and its canonical publication frame.

IndexCreate

Bases: BaseModel

Payload for creating an index reference row.

IndexType

Bases: MarketsMetaTableRow

Typed row for the index type registry.

IndexTypeCreate

Bases: BaseModel

Payload for creating an index type registry row.

IndexTypeUpdate

Bases: BaseModel

Payload for updating mutable index type fields.

IndexTypeUpsert

Bases: IndexTypeCreate

Payload for inserting or updating an index type by registry key.

IndexUpdate

Bases: BaseModel

Payload for updating mutable index reference fields.

IndexUpsert

Bases: IndexCreate

Payload for inserting or updating an index by unique identifier.

LookAheadError

Bases: IndexCalculationError

Raised when a coefficient would be effective before its source observation.

ResolvedIndexLeg

Bases: BaseModel

Concrete component and coefficient effective at one calculation time.

calculate_index(definition, legs, observations, *, index_identifier='in_memory', calculation_times=None, resolved_coefficients=None, resolved_coefficient_source_times=None, coefficient_inputs=None)

Calculate one derived-index version from caller-supplied observations.

normalize_index_type(index_type)

Return the canonical index type key stored by the typed API.