SignalR Reference: Data Hub
Data Hub: snapshots and server-streaming market and portfolio data
- Hub URL:
/hubs/data/v1
Snapshot methods return an API envelope (MesoLiveApiResponse<T>). Stream methods yield items until cancelled or disconnected.
Envelope fields: MesoLiveApiResponse
Stream methods send updates via a bounded channel. If the client can't keep up, older updates may be dropped.
StreamPositionData
Stream live prices/greeks/pnl updates for a position (and optionally its legs/leg groups).
Args model: StreamPositionDataArgs
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
PositionId | int | Yes | No | Live position id to stream. | |
PriceFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for prices (bid/ask/last/mark). |
GreekFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for greeks. |
PnlFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for PnL. |
IncludePosition | LiveDataInclude | Yes | No | Which blocks to include for the position itself. | |
IncludeLegs | LiveDataInclude | Yes | No | Which blocks to include for legs belonging to the position. | |
IncludeLegGroups | LiveDataInclude | Yes | No | Which blocks to include for leg groups belonging to the position. | |
Provider | DataProviderType | No | Yes | Optional override for which market data provider to use. null = server default. |
Yields (stream): PositionDataEntry
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
PositionPrices | LivePrices | Yes | Yes | Live prices for the position. null when IncludePosition does not include Prices. | |
PositionGreeks | LiveGreeks | Yes | Yes | Live greeks for the position. null when IncludePosition does not include Greeks. | |
PositionPnLs | LivePnL | Yes | Yes | Live PnL for the position. null when IncludePosition does not include PnL. | |
LegPrices | dict[int, LivePrices] | Yes | Yes | Per-leg live prices keyed by live leg id. null when IncludeLegs does not include Prices. | |
LegGreeks | dict[int, LiveGreeks] | Yes | Yes | Per-leg live greeks keyed by live leg id. null when IncludeLegs does not include Greeks. | |
LegPnLs | dict[int, LivePnL] | Yes | Yes | Per-leg live PnL keyed by live leg id. null when IncludeLegs does not include PnL. | |
LegGroupPrices | dict[int, LivePrices] | Yes | Yes | Per-leg-group live prices keyed by leg group id. null when IncludeLegGroups does not include Prices. | |
LegGroupGreeks | dict[int, LiveGreeks] | Yes | Yes | Per-leg-group live greeks keyed by leg group id. null when IncludeLegGroups does not include Greeks. | |
LegGroupPnLs | dict[int, LivePnL] | Yes | Yes | Per-leg-group live PnL keyed by leg group id. null when IncludeLegGroups does not include PnL. |
GetPositionSnapshot
Get a point-in-time snapshot of prices/greeks/pnl for a position (and optionally its legs/leg groups).
Args model: GetPositionSnapshotArgs
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
PositionId | int | Yes | No | Live position id to snapshot. | |
PriceFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for prices (bid/ask/last/mark). |
GreekFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for greeks. |
PnlFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for PnL. |
IncludePosition | LiveDataInclude | Yes | No | Which blocks to include for the position itself. | |
IncludeLegs | LiveDataInclude | Yes | No | Which blocks to include for legs belonging to the position. | |
IncludeLegGroups | LiveDataInclude | Yes | No | Which blocks to include for leg groups belonging to the position. | |
Provider | DataProviderType | No | Yes | Optional override for which market data provider to use. null = server default. |
Returns (payload): GetPositionSnapshotResult
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
PositionPrices | LivePrices | Yes | Yes | Live prices for the position. null when IncludePosition does not include Prices. | |
PositionGreeks | LiveGreeks | Yes | Yes | Live greeks for the position. null when IncludePosition does not include Greeks. | |
PositionPnLs | LivePnL | Yes | Yes | Live PnL for the position. null when IncludePosition does not include PnL. | |
LegPrices | dict[int, LivePrices] | Yes | Yes | Per-leg live prices keyed by live leg id. null when IncludeLegs does not include Prices. | |
LegGreeks | dict[int, LiveGreeks] | Yes | Yes | Per-leg live greeks keyed by live leg id. null when IncludeLegs does not include Greeks. | |
LegPnLs | dict[int, LivePnL] | Yes | Yes | Per-leg live PnL keyed by live leg id. null when IncludeLegs does not include PnL. | |
LegGroupPrices | dict[int, LivePrices] | Yes | Yes | Per-leg-group live prices keyed by leg group id. null when IncludeLegGroups does not include Prices. | |
LegGroupGreeks | dict[int, LiveGreeks] | Yes | Yes | Per-leg-group live greeks keyed by leg group id. null when IncludeLegGroups does not include Greeks. | |
LegGroupPnLs | dict[int, LivePnL] | Yes | Yes | Per-leg-group live PnL keyed by leg group id. null when IncludeLegGroups does not include PnL. |
StreamLegData
Stream live prices/greeks/pnl updates for a single leg.
Args model: StreamLegDataArgs
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
LegId | int | Yes | No | Live leg id to stream. | |
PriceFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for prices (bid/ask/last/mark). |
GreekFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for greeks. |
PnlFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for PnL. |
Include | LiveDataInclude | Yes | No | Which blocks to include for the leg. | |
Provider | DataProviderType | No | Yes | Optional override for which market data provider to use. null = server default. |
Yields (stream): LegDataEntry
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
LegPrices | LivePrices | Yes | Yes | Live prices for the leg. null when Include does not include Prices. | |
LegGreeks | LiveGreeks | Yes | Yes | Live greeks for the leg. null when Include does not include Greeks. | |
LegPnLs | LivePnL | Yes | Yes | Live PnL for the leg. null when Include does not include PnL. |
GetLegSnapshot
Get a point-in-time snapshot of prices/greeks/pnl for a single leg.
Args model: GetLegSnapshotArgs
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
LegId | int | Yes | No | Live leg id to snapshot. | |
PriceFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for prices (bid/ask/last/mark). |
GreekFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for greeks. |
PnlFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for PnL. |
Include | LiveDataInclude | Yes | No | Which blocks to include for the leg. | |
Provider | DataProviderType | No | Yes | Optional override for which market data provider to use. null = server default. |
Returns (payload): GetLegSnapshotResult
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
LegPrices | LivePrices | Yes | Yes | Live prices for the leg. null when Include does not include Prices. | |
LegGreeks | LiveGreeks | Yes | Yes | Live greeks for the leg. null when Include does not include Greeks. | |
LegPnLs | LivePnL | Yes | Yes | Live PnL for the leg. null when Include does not include PnL. |
StreamLegsData
Stream live prices/greeks/pnl updates for multiple legs.
Args model: StreamLegsDataArgs
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
LegIds | list[int] | Yes | No | Live leg ids to stream. | |
PriceFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for prices (bid/ask/last/mark). |
GreekFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for greeks. |
PnlFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for PnL. |
Include | LiveDataInclude | Yes | No | Which blocks to include for the legs. | |
Provider | DataProviderType | No | Yes | Optional override for which market data provider to use. null = server default. |
Yields (stream): LegsDataEntry
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
LegPrices | dict[int, LivePrices] | Yes | Yes | Per-leg live prices keyed by live leg id. null when Include does not include Prices. | |
LegGreeks | dict[int, LiveGreeks] | Yes | Yes | Per-leg live greeks keyed by live leg id. null when Include does not include Greeks. | |
LegPnLs | dict[int, LivePnL] | Yes | Yes | Per-leg live PnL keyed by live leg id. null when Include does not include PnL. |
GetLegsSnapshot
Get a point-in-time snapshot of prices/greeks/pnl for multiple legs.
Args model: GetLegsSnapshotArgs
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
LegIds | list[int] | Yes | No | Live leg ids to snapshot. | |
PriceFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for prices (bid/ask/last/mark). |
GreekFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for greeks. |
PnlFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for PnL. |
Include | LiveDataInclude | Yes | No | Which blocks to include for the legs. | |
Provider | DataProviderType | No | Yes | Optional override for which market data provider to use. null = server default. |
Returns (payload): GetLegsSnapshotResult
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
LegPrices | dict[int, LivePrices] | Yes | Yes | Per-leg live prices keyed by live leg id. null when Include does not include Prices. | |
LegGreeks | dict[int, LiveGreeks] | Yes | Yes | Per-leg live greeks keyed by live leg id. null when Include does not include Greeks. | |
LegPnLs | dict[int, LivePnL] | Yes | Yes | Per-leg live PnL keyed by live leg id. null when Include does not include PnL. |
StreamComboContractsData
Stream live quotes for an arbitrary combo specified by its component contracts.
Provider is required by the server for this method.
Args model: StreamComboContractsDataArgs
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
ComboLegs | dict[str, ComboLegSpec] | Yes | No | Combo legs keyed by leg name. Values include contract + quantity (ratio) for aggregation. | |
PriceFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for prices (bid/ask/last/mark). |
GreekFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for greeks. |
Include | LiveDataInclude | Yes | No | Which blocks to include for the combo (contract-level and aggregated). | |
Provider | DataProviderType | No | Yes | Optional override for which market data provider to use. null = server default. |
Yields (stream): ComboContractsDataEntry
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
ComboContractPrices | dict[str, LivePrices] | Yes | Yes | Per-leg contract prices keyed by combo leg name. null when Include does not include Prices. | |
ComboContractGreeks | dict[str, LiveGreeks] | Yes | Yes | Per-leg contract greeks keyed by combo leg name. null when Include does not include Greeks. | |
ComboPrices | LivePrices | No | Yes | Aggregated combo prices across legs using provided quantities. null when Include does not include Prices. | |
ComboGreeks | LiveGreeks | No | Yes | Aggregated combo greeks across legs using provided quantities. null when Include does not include Greeks. |
GetComboContractsSnapshot
Get a point-in-time snapshot of quotes for an arbitrary combo specified by its component contracts.
Provider is required by the server for this method.
Args model: GetComboContractsSnapshotArgs
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
ComboLegs | dict[str, ComboLegSpec] | Yes | No | Combo legs keyed by leg name. Values include contract + quantity (ratio) for aggregation. | |
PriceFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for prices (bid/ask/last/mark). |
GreekFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for greeks. |
Include | LiveDataInclude | Yes | No | Which blocks to include for the combo (contract-level and aggregated). | |
Provider | DataProviderType | No | Yes | Optional override for which market data provider to use. null = server default. |
Returns (payload): GetComboContractsSnapshotResult
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
ComboContractPrices | dict[str, LivePrices] | Yes | Yes | Per-leg contract prices keyed by combo leg name. null when Include does not include Prices. | |
ComboContractGreeks | dict[str, LiveGreeks] | Yes | Yes | Per-leg contract greeks keyed by combo leg name. null when Include does not include Greeks. | |
ComboPrices | LivePrices | No | Yes | Aggregated combo prices across legs using provided quantities. null when Include does not include Prices. | |
ComboGreeks | LiveGreeks | No | Yes | Aggregated combo greeks across legs using provided quantities. null when Include does not include Greeks. |
StreamContractData
Stream live quotes for a single contract.
Provider is required by the server for this method.
Args model: StreamContractDataArgs
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
Contract | LiveContract | Yes | No | Contract to stream quotes for. | |
PriceFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for prices (bid/ask/last/mark). |
GreekFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for greeks. |
Include | LiveDataInclude | Yes | No | Which blocks to include for the contract. | |
Provider | DataProviderType | No | Yes | Optional override for which market data provider to use. null = server default. |
Yields (stream): ContractDataEntry
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
ContractPrices | LivePrices | Yes | Yes | Live prices for the contract. null when Include does not include Prices. | |
ContractGreeks | LiveGreeks | Yes | Yes | Live greeks for the contract. null when Include does not include Greeks. |
GetContractSnapshot
Get a point-in-time snapshot of quotes for a single contract.
Provider is required by the server for this method.
Args model: GetContractSnapshotArgs
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
Contract | LiveContract | Yes | No | Contract to snapshot quotes for. | |
PriceFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for prices (bid/ask/last/mark). |
GreekFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for greeks. |
Include | LiveDataInclude | Yes | No | Which blocks to include for the contract. | |
Provider | DataProviderType | No | Yes | Optional override for which market data provider to use. null = server default. |
Returns (payload): GetContractSnapshotResult
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
ContractPrices | LivePrices | Yes | Yes | Live prices for the contract. null when Include does not include Prices. | |
ContractGreeks | LiveGreeks | Yes | Yes | Live greeks for the contract. null when Include does not include Greeks. |
StreamUnderlyingData
Stream live quotes for an underlying (e.g. SPX, GLD).
Provider is required by the server for this method.
Args model: StreamUnderlyingDataArgs
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
Underlying | LiveUnderlying | Yes | No | Underlying to stream quotes for. | |
PriceFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for prices (bid/ask/last/mark). |
Provider | DataProviderType | No | Yes | Optional override for which market data provider to use. null = server default. |
Yields (stream): UnderlyingDataEntry
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
UnderlyingPrices | LivePrices | Yes | No | Live prices for the underlying. |
GetUnderlyingSnapshot
Get a point-in-time snapshot of quotes for an underlying (e.g. SPX, GLD).
Provider is required by the server for this method.
Args model: GetUnderlyingSnapshotArgs
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
Underlying | LiveUnderlying | Yes | No | Underlying to snapshot quotes for. | |
PriceFields | LiveQuoteFields | No | No | LiveQuoteFields.All | Quote fields to include for prices (bid/ask/last/mark). |
Provider | DataProviderType | No | Yes | Optional override for which market data provider to use. null = server default. |
Returns (payload): GetUnderlyingSnapshotResult
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
UnderlyingPrices | LivePrices | Yes | No | Live prices for the underlying. |