Skip to main content

SignalR Reference: Historical Data Hub

Historical Data Hub: persisted account NAV and PnL/greek/price/IV metric time series.

  • Hub URL: /hubs/historicaldata/v1

All methods return an API envelope (MesoLiveApiResponse<T>). Result payload bytes must be decoded according to the returned payload kind and compression.

Envelope fields: MesoLiveApiResponse

note

Historical Data results carry a compressed or uncompressed HistoricalDataPayload. HistoricalDataPayload.Kind determines whether bytes decode to account NAV or metric series.

GetAccountNav

Get historical net-liquidation / cash / maintenance-margin values for one account selector. A broker account selector can match several internal live-account rows over time, for example after an account is re-keyed when type or currency changes. The response returns one series per matched live account. A live-account selector returns at most one series.

Args model: GetAccountNavArgs

FieldTypeRequiredNullableDefaultDescription
ResolutionHistoricalDataResolutionNoNoHistoricalDataResolution.AutoRequested representation. Defaults to bounded chart-history mode.
GranularityHistoricalRollupGranularityNoNoHistoricalRollupGranularity.DailyRollup granularity used when Resolution is HistoricalDataResolution.Rollup or HistoricalDataResolution.Auto. Ignored for HistoricalDataResolution.Raw.
StartUtcdatetimeNoYesInclusive UTC lower bound applied to each point's effective HistoricalDataPoint.TimestampUtc. Null lets the server choose the oldest allowed point.
EndUtcdatetimeNoYesExclusive UTC upper bound applied to each point's effective HistoricalDataPoint.TimestampUtc. For Raw, null enables tail-following. For Auto/Rollup, null is materialized by the server into a bounded effective end time and does not create a tail-following cursor.
LimitintNoYesMaximum number of points to return across all series in one page. The server caps this at MaxLimit; when null the server applies a default page size.
ContinuationTokenstrNoYesOpaque pagination token from a previous page of the same semantic query.
RollupValueModeHistoricalRollupValueModeNoNoHistoricalRollupValueMode.OhlcValue shape returned for rollup points. Raw points always carry close values only.
CompressionHistoricalDataCompressionNoNoHistoricalDataCompression.GzipCompression format requested for the returned payload bytes. Set HistoricalDataCompression.None to receive uncompressed JSON bytes.
AccountHistoricalAccountSelectorYesNoAccount selector to query.

Returns (payload): GetAccountNavResult

FieldTypeRequiredNullableDefaultDescription
ContinuationTokenstrNoYesPagination token for the next page. For Raw open-ended tail-following queries, this stays non-null even when the current tail is exhausted. For bounded queries, null/empty means all points in the effective window were returned.
RawAvailableFromUtcdatetimeNoYesOldest UTC instant for which HistoricalDataResolution.Raw points can be served by this API. This is the later of the hub's raw access cap and the raw storage retention cutoff. Null when raw serving does not apply.
RawStitchStartUtcdatetimeNoYesUTC instant where HistoricalDataResolution.Auto switches from rollup buckets to raw samples. Clients can use this as the intraday chart stitching/smoothing boundary. Null when no stitch boundary applies, including Auto queries that are served from rollups only because the intended raw tail is no longer fully retained.
EffectiveEndUtcdatetimeNoYesEffective exclusive upper bound used by the server. For Auto/Rollup queries with null EndUtc, this is the materialized snapshot end. Null only for Raw open-ended tail-following queries.
PayloadHistoricalDataPayloadYesNoCompressed or uncompressed UTF-8 JSON payload containing the page series.

GetPositionMetrics

Get historical PnL, price, and greek values for one live position. Returns a single series keyed on the position.

Args model: GetPositionMetricsArgs

FieldTypeRequiredNullableDefaultDescription
ResolutionHistoricalDataResolutionNoNoHistoricalDataResolution.AutoRequested representation. Defaults to bounded chart-history mode.
GranularityHistoricalRollupGranularityNoNoHistoricalRollupGranularity.DailyRollup granularity used when Resolution is HistoricalDataResolution.Rollup or HistoricalDataResolution.Auto. Ignored for HistoricalDataResolution.Raw.
StartUtcdatetimeNoYesInclusive UTC lower bound applied to each point's effective HistoricalDataPoint.TimestampUtc. Null lets the server choose the oldest allowed point.
EndUtcdatetimeNoYesExclusive UTC upper bound applied to each point's effective HistoricalDataPoint.TimestampUtc. For Raw, null enables tail-following. For Auto/Rollup, null is materialized by the server into a bounded effective end time and does not create a tail-following cursor.
LimitintNoYesMaximum number of points to return across all series in one page. The server caps this at MaxLimit; when null the server applies a default page size.
ContinuationTokenstrNoYesOpaque pagination token from a previous page of the same semantic query.
RollupValueModeHistoricalRollupValueModeNoNoHistoricalRollupValueMode.OhlcValue shape returned for rollup points. Raw points always carry close values only.
CompressionHistoricalDataCompressionNoNoHistoricalDataCompression.GzipCompression format requested for the returned payload bytes. Set HistoricalDataCompression.None to receive uncompressed JSON bytes.
IncludeHistoricalMetricIncludeNoNoHistoricalMetricInclude.AllMetric blocks to include in each returned point. Filters both close values and any requested OHLC values.
PositionIdintYesNoLive position id to query.

Returns (payload): GetHistoricalMetricsResult

FieldTypeRequiredNullableDefaultDescription
ContinuationTokenstrNoYesPagination token for the next page. For Raw open-ended tail-following queries, this stays non-null even when the current tail is exhausted. For bounded queries, null/empty means all points in the effective window were returned.
RawAvailableFromUtcdatetimeNoYesOldest UTC instant for which HistoricalDataResolution.Raw points can be served by this API. This is the later of the hub's raw access cap and the raw storage retention cutoff. Null when raw serving does not apply.
RawStitchStartUtcdatetimeNoYesUTC instant where HistoricalDataResolution.Auto switches from rollup buckets to raw samples. Clients can use this as the intraday chart stitching/smoothing boundary. Null when no stitch boundary applies, including Auto queries that are served from rollups only because the intended raw tail is no longer fully retained.
EffectiveEndUtcdatetimeNoYesEffective exclusive upper bound used by the server. For Auto/Rollup queries with null EndUtc, this is the materialized snapshot end. Null only for Raw open-ended tail-following queries.
PayloadHistoricalDataPayloadYesNoCompressed or uncompressed UTF-8 JSON payload containing the page series.

GetStrategyMetrics

Get historical PnL and greek values for one live strategy, optionally narrowed by underlying and/or accounts. Strategy metrics are recorded per account and underlying; values are never aggregated across accounts or underlyings.

Args model: GetStrategyMetricsArgs

FieldTypeRequiredNullableDefaultDescription
ResolutionHistoricalDataResolutionNoNoHistoricalDataResolution.AutoRequested representation. Defaults to bounded chart-history mode.
GranularityHistoricalRollupGranularityNoNoHistoricalRollupGranularity.DailyRollup granularity used when Resolution is HistoricalDataResolution.Rollup or HistoricalDataResolution.Auto. Ignored for HistoricalDataResolution.Raw.
StartUtcdatetimeNoYesInclusive UTC lower bound applied to each point's effective HistoricalDataPoint.TimestampUtc. Null lets the server choose the oldest allowed point.
EndUtcdatetimeNoYesExclusive UTC upper bound applied to each point's effective HistoricalDataPoint.TimestampUtc. For Raw, null enables tail-following. For Auto/Rollup, null is materialized by the server into a bounded effective end time and does not create a tail-following cursor.
LimitintNoYesMaximum number of points to return across all series in one page. The server caps this at MaxLimit; when null the server applies a default page size.
ContinuationTokenstrNoYesOpaque pagination token from a previous page of the same semantic query.
RollupValueModeHistoricalRollupValueModeNoNoHistoricalRollupValueMode.OhlcValue shape returned for rollup points. Raw points always carry close values only.
CompressionHistoricalDataCompressionNoNoHistoricalDataCompression.GzipCompression format requested for the returned payload bytes. Set HistoricalDataCompression.None to receive uncompressed JSON bytes.
IncludeHistoricalMetricIncludeNoNoHistoricalMetricInclude.AllMetric blocks to include in each returned point. Filters both close values and any requested OHLC values.
StrategyIdintYesNoLive strategy id to query.
UnderlyingContractIdintNoYesOptional underlying live contract id within the strategy. Null includes all underlyings the strategy traded.
LiveAccountIdslist[int]NoYesOptional internal live account ids to include. Null includes all accounts the strategy ran on.
BrokerAccountslist[HistoricalBrokerAccountSelector]NoYesOptional broker account selectors to include. Null includes all accounts the strategy ran on. If both LiveAccountIds and this property are supplied, the server treats the filter as a union.

Returns (payload): GetHistoricalMetricsResult

FieldTypeRequiredNullableDefaultDescription
ContinuationTokenstrNoYesPagination token for the next page. For Raw open-ended tail-following queries, this stays non-null even when the current tail is exhausted. For bounded queries, null/empty means all points in the effective window were returned.
RawAvailableFromUtcdatetimeNoYesOldest UTC instant for which HistoricalDataResolution.Raw points can be served by this API. This is the later of the hub's raw access cap and the raw storage retention cutoff. Null when raw serving does not apply.
RawStitchStartUtcdatetimeNoYesUTC instant where HistoricalDataResolution.Auto switches from rollup buckets to raw samples. Clients can use this as the intraday chart stitching/smoothing boundary. Null when no stitch boundary applies, including Auto queries that are served from rollups only because the intended raw tail is no longer fully retained.
EffectiveEndUtcdatetimeNoYesEffective exclusive upper bound used by the server. For Auto/Rollup queries with null EndUtc, this is the materialized snapshot end. Null only for Raw open-ended tail-following queries.
PayloadHistoricalDataPayloadYesNoCompressed or uncompressed UTF-8 JSON payload containing the page series.

GetUnderlyingMetrics

Get historical PnL and greek values for one underlying exposure. Underlying metrics are user-scoped, not account-scoped.

Args model: GetUnderlyingMetricsArgs

FieldTypeRequiredNullableDefaultDescription
ResolutionHistoricalDataResolutionNoNoHistoricalDataResolution.AutoRequested representation. Defaults to bounded chart-history mode.
GranularityHistoricalRollupGranularityNoNoHistoricalRollupGranularity.DailyRollup granularity used when Resolution is HistoricalDataResolution.Rollup or HistoricalDataResolution.Auto. Ignored for HistoricalDataResolution.Raw.
StartUtcdatetimeNoYesInclusive UTC lower bound applied to each point's effective HistoricalDataPoint.TimestampUtc. Null lets the server choose the oldest allowed point.
EndUtcdatetimeNoYesExclusive UTC upper bound applied to each point's effective HistoricalDataPoint.TimestampUtc. For Raw, null enables tail-following. For Auto/Rollup, null is materialized by the server into a bounded effective end time and does not create a tail-following cursor.
LimitintNoYesMaximum number of points to return across all series in one page. The server caps this at MaxLimit; when null the server applies a default page size.
ContinuationTokenstrNoYesOpaque pagination token from a previous page of the same semantic query.
RollupValueModeHistoricalRollupValueModeNoNoHistoricalRollupValueMode.OhlcValue shape returned for rollup points. Raw points always carry close values only.
CompressionHistoricalDataCompressionNoNoHistoricalDataCompression.GzipCompression format requested for the returned payload bytes. Set HistoricalDataCompression.None to receive uncompressed JSON bytes.
IncludeHistoricalMetricIncludeNoNoHistoricalMetricInclude.AllMetric blocks to include in each returned point. Filters both close values and any requested OHLC values.
UnderlyingContractIdintYesNoUnderlying live contract id to query.

Returns (payload): GetHistoricalMetricsResult

FieldTypeRequiredNullableDefaultDescription
ContinuationTokenstrNoYesPagination token for the next page. For Raw open-ended tail-following queries, this stays non-null even when the current tail is exhausted. For bounded queries, null/empty means all points in the effective window were returned.
RawAvailableFromUtcdatetimeNoYesOldest UTC instant for which HistoricalDataResolution.Raw points can be served by this API. This is the later of the hub's raw access cap and the raw storage retention cutoff. Null when raw serving does not apply.
RawStitchStartUtcdatetimeNoYesUTC instant where HistoricalDataResolution.Auto switches from rollup buckets to raw samples. Clients can use this as the intraday chart stitching/smoothing boundary. Null when no stitch boundary applies, including Auto queries that are served from rollups only because the intended raw tail is no longer fully retained.
EffectiveEndUtcdatetimeNoYesEffective exclusive upper bound used by the server. For Auto/Rollup queries with null EndUtc, this is the materialized snapshot end. Null only for Raw open-ended tail-following queries.
PayloadHistoricalDataPayloadYesNoCompressed or uncompressed UTF-8 JSON payload containing the page series.

GetLegMetrics

Get historical PnL, greek, price, and implied-volatility values for one live leg. Returns a single series keyed on the leg.

Args model: GetLegMetricsArgs

FieldTypeRequiredNullableDefaultDescription
ResolutionHistoricalDataResolutionNoNoHistoricalDataResolution.AutoRequested representation. Defaults to bounded chart-history mode.
GranularityHistoricalRollupGranularityNoNoHistoricalRollupGranularity.DailyRollup granularity used when Resolution is HistoricalDataResolution.Rollup or HistoricalDataResolution.Auto. Ignored for HistoricalDataResolution.Raw.
StartUtcdatetimeNoYesInclusive UTC lower bound applied to each point's effective HistoricalDataPoint.TimestampUtc. Null lets the server choose the oldest allowed point.
EndUtcdatetimeNoYesExclusive UTC upper bound applied to each point's effective HistoricalDataPoint.TimestampUtc. For Raw, null enables tail-following. For Auto/Rollup, null is materialized by the server into a bounded effective end time and does not create a tail-following cursor.
LimitintNoYesMaximum number of points to return across all series in one page. The server caps this at MaxLimit; when null the server applies a default page size.
ContinuationTokenstrNoYesOpaque pagination token from a previous page of the same semantic query.
RollupValueModeHistoricalRollupValueModeNoNoHistoricalRollupValueMode.OhlcValue shape returned for rollup points. Raw points always carry close values only.
CompressionHistoricalDataCompressionNoNoHistoricalDataCompression.GzipCompression format requested for the returned payload bytes. Set HistoricalDataCompression.None to receive uncompressed JSON bytes.
IncludeHistoricalMetricIncludeNoNoHistoricalMetricInclude.AllMetric blocks to include in each returned point. Filters both close values and any requested OHLC values.
LegIdintYesNoLive leg id to query.

Returns (payload): GetHistoricalMetricsResult

FieldTypeRequiredNullableDefaultDescription
ContinuationTokenstrNoYesPagination token for the next page. For Raw open-ended tail-following queries, this stays non-null even when the current tail is exhausted. For bounded queries, null/empty means all points in the effective window were returned.
RawAvailableFromUtcdatetimeNoYesOldest UTC instant for which HistoricalDataResolution.Raw points can be served by this API. This is the later of the hub's raw access cap and the raw storage retention cutoff. Null when raw serving does not apply.
RawStitchStartUtcdatetimeNoYesUTC instant where HistoricalDataResolution.Auto switches from rollup buckets to raw samples. Clients can use this as the intraday chart stitching/smoothing boundary. Null when no stitch boundary applies, including Auto queries that are served from rollups only because the intended raw tail is no longer fully retained.
EffectiveEndUtcdatetimeNoYesEffective exclusive upper bound used by the server. For Auto/Rollup queries with null EndUtc, this is the materialized snapshot end. Null only for Raw open-ended tail-following queries.
PayloadHistoricalDataPayloadYesNoCompressed or uncompressed UTF-8 JSON payload containing the page series.