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
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
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
Resolution | HistoricalDataResolution | No | No | HistoricalDataResolution.Auto | Requested representation. Defaults to bounded chart-history mode. |
Granularity | HistoricalRollupGranularity | No | No | HistoricalRollupGranularity.Daily | Rollup granularity used when Resolution is HistoricalDataResolution.Rollup or HistoricalDataResolution.Auto. Ignored for HistoricalDataResolution.Raw. |
StartUtc | datetime | No | Yes | Inclusive UTC lower bound applied to each point's effective HistoricalDataPoint.TimestampUtc. Null lets the server choose the oldest allowed point. | |
EndUtc | datetime | No | Yes | Exclusive 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. | |
Limit | int | No | Yes | Maximum 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. | |
ContinuationToken | str | No | Yes | Opaque pagination token from a previous page of the same semantic query. | |
RollupValueMode | HistoricalRollupValueMode | No | No | HistoricalRollupValueMode.Ohlc | Value shape returned for rollup points. Raw points always carry close values only. |
Compression | HistoricalDataCompression | No | No | HistoricalDataCompression.Gzip | Compression format requested for the returned payload bytes. Set HistoricalDataCompression.None to receive uncompressed JSON bytes. |
Account | HistoricalAccountSelector | Yes | No | Account selector to query. |
Returns (payload): GetAccountNavResult
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
ContinuationToken | str | No | Yes | Pagination 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. | |
RawAvailableFromUtc | datetime | No | Yes | Oldest 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. | |
RawStitchStartUtc | datetime | No | Yes | UTC 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. | |
EffectiveEndUtc | datetime | No | Yes | Effective 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. | |
Payload | HistoricalDataPayload | Yes | No | Compressed 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
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
Resolution | HistoricalDataResolution | No | No | HistoricalDataResolution.Auto | Requested representation. Defaults to bounded chart-history mode. |
Granularity | HistoricalRollupGranularity | No | No | HistoricalRollupGranularity.Daily | Rollup granularity used when Resolution is HistoricalDataResolution.Rollup or HistoricalDataResolution.Auto. Ignored for HistoricalDataResolution.Raw. |
StartUtc | datetime | No | Yes | Inclusive UTC lower bound applied to each point's effective HistoricalDataPoint.TimestampUtc. Null lets the server choose the oldest allowed point. | |
EndUtc | datetime | No | Yes | Exclusive 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. | |
Limit | int | No | Yes | Maximum 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. | |
ContinuationToken | str | No | Yes | Opaque pagination token from a previous page of the same semantic query. | |
RollupValueMode | HistoricalRollupValueMode | No | No | HistoricalRollupValueMode.Ohlc | Value shape returned for rollup points. Raw points always carry close values only. |
Compression | HistoricalDataCompression | No | No | HistoricalDataCompression.Gzip | Compression format requested for the returned payload bytes. Set HistoricalDataCompression.None to receive uncompressed JSON bytes. |
Include | HistoricalMetricInclude | No | No | HistoricalMetricInclude.All | Metric blocks to include in each returned point. Filters both close values and any requested OHLC values. |
PositionId | int | Yes | No | Live position id to query. |
Returns (payload): GetHistoricalMetricsResult
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
ContinuationToken | str | No | Yes | Pagination 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. | |
RawAvailableFromUtc | datetime | No | Yes | Oldest 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. | |
RawStitchStartUtc | datetime | No | Yes | UTC 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. | |
EffectiveEndUtc | datetime | No | Yes | Effective 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. | |
Payload | HistoricalDataPayload | Yes | No | Compressed 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
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
Resolution | HistoricalDataResolution | No | No | HistoricalDataResolution.Auto | Requested representation. Defaults to bounded chart-history mode. |
Granularity | HistoricalRollupGranularity | No | No | HistoricalRollupGranularity.Daily | Rollup granularity used when Resolution is HistoricalDataResolution.Rollup or HistoricalDataResolution.Auto. Ignored for HistoricalDataResolution.Raw. |
StartUtc | datetime | No | Yes | Inclusive UTC lower bound applied to each point's effective HistoricalDataPoint.TimestampUtc. Null lets the server choose the oldest allowed point. | |
EndUtc | datetime | No | Yes | Exclusive 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. | |
Limit | int | No | Yes | Maximum 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. | |
ContinuationToken | str | No | Yes | Opaque pagination token from a previous page of the same semantic query. | |
RollupValueMode | HistoricalRollupValueMode | No | No | HistoricalRollupValueMode.Ohlc | Value shape returned for rollup points. Raw points always carry close values only. |
Compression | HistoricalDataCompression | No | No | HistoricalDataCompression.Gzip | Compression format requested for the returned payload bytes. Set HistoricalDataCompression.None to receive uncompressed JSON bytes. |
Include | HistoricalMetricInclude | No | No | HistoricalMetricInclude.All | Metric blocks to include in each returned point. Filters both close values and any requested OHLC values. |
StrategyId | int | Yes | No | Live strategy id to query. | |
UnderlyingContractId | int | No | Yes | Optional underlying live contract id within the strategy. Null includes all underlyings the strategy traded. | |
LiveAccountIds | list[int] | No | Yes | Optional internal live account ids to include. Null includes all accounts the strategy ran on. | |
BrokerAccounts | list[HistoricalBrokerAccountSelector] | No | Yes | Optional 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
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
ContinuationToken | str | No | Yes | Pagination 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. | |
RawAvailableFromUtc | datetime | No | Yes | Oldest 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. | |
RawStitchStartUtc | datetime | No | Yes | UTC 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. | |
EffectiveEndUtc | datetime | No | Yes | Effective 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. | |
Payload | HistoricalDataPayload | Yes | No | Compressed 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
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
Resolution | HistoricalDataResolution | No | No | HistoricalDataResolution.Auto | Requested representation. Defaults to bounded chart-history mode. |
Granularity | HistoricalRollupGranularity | No | No | HistoricalRollupGranularity.Daily | Rollup granularity used when Resolution is HistoricalDataResolution.Rollup or HistoricalDataResolution.Auto. Ignored for HistoricalDataResolution.Raw. |
StartUtc | datetime | No | Yes | Inclusive UTC lower bound applied to each point's effective HistoricalDataPoint.TimestampUtc. Null lets the server choose the oldest allowed point. | |
EndUtc | datetime | No | Yes | Exclusive 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. | |
Limit | int | No | Yes | Maximum 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. | |
ContinuationToken | str | No | Yes | Opaque pagination token from a previous page of the same semantic query. | |
RollupValueMode | HistoricalRollupValueMode | No | No | HistoricalRollupValueMode.Ohlc | Value shape returned for rollup points. Raw points always carry close values only. |
Compression | HistoricalDataCompression | No | No | HistoricalDataCompression.Gzip | Compression format requested for the returned payload bytes. Set HistoricalDataCompression.None to receive uncompressed JSON bytes. |
Include | HistoricalMetricInclude | No | No | HistoricalMetricInclude.All | Metric blocks to include in each returned point. Filters both close values and any requested OHLC values. |
UnderlyingContractId | int | Yes | No | Underlying live contract id to query. |
Returns (payload): GetHistoricalMetricsResult
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
ContinuationToken | str | No | Yes | Pagination 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. | |
RawAvailableFromUtc | datetime | No | Yes | Oldest 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. | |
RawStitchStartUtc | datetime | No | Yes | UTC 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. | |
EffectiveEndUtc | datetime | No | Yes | Effective 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. | |
Payload | HistoricalDataPayload | Yes | No | Compressed 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
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
Resolution | HistoricalDataResolution | No | No | HistoricalDataResolution.Auto | Requested representation. Defaults to bounded chart-history mode. |
Granularity | HistoricalRollupGranularity | No | No | HistoricalRollupGranularity.Daily | Rollup granularity used when Resolution is HistoricalDataResolution.Rollup or HistoricalDataResolution.Auto. Ignored for HistoricalDataResolution.Raw. |
StartUtc | datetime | No | Yes | Inclusive UTC lower bound applied to each point's effective HistoricalDataPoint.TimestampUtc. Null lets the server choose the oldest allowed point. | |
EndUtc | datetime | No | Yes | Exclusive 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. | |
Limit | int | No | Yes | Maximum 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. | |
ContinuationToken | str | No | Yes | Opaque pagination token from a previous page of the same semantic query. | |
RollupValueMode | HistoricalRollupValueMode | No | No | HistoricalRollupValueMode.Ohlc | Value shape returned for rollup points. Raw points always carry close values only. |
Compression | HistoricalDataCompression | No | No | HistoricalDataCompression.Gzip | Compression format requested for the returned payload bytes. Set HistoricalDataCompression.None to receive uncompressed JSON bytes. |
Include | HistoricalMetricInclude | No | No | HistoricalMetricInclude.All | Metric blocks to include in each returned point. Filters both close values and any requested OHLC values. |
LegId | int | Yes | No | Live leg id to query. |
Returns (payload): GetHistoricalMetricsResult
| Field | Type | Required | Nullable | Default | Description |
|---|---|---|---|---|---|
ContinuationToken | str | No | Yes | Pagination 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. | |
RawAvailableFromUtc | datetime | No | Yes | Oldest 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. | |
RawStitchStartUtc | datetime | No | Yes | UTC 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. | |
EffectiveEndUtc | datetime | No | Yes | Effective 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. | |
Payload | HistoricalDataPayload | Yes | No | Compressed or uncompressed UTF-8 JSON payload containing the page series. |