2.2.1 Metrics
Purpose
Returns metrics data for indices.
Endpoint
POST
/data-service/v2/queries/metrics
Parameters
metrics (list of Metric objects, required):
List of indices or segments with a list of metrics to be queried. Please refer to the Metric section below for more information.includeMetadata (boolean, optional):
True to include metadata, such as associated data for the indices and metrics. Default isfalse
.
Metric (object)
indexIds: (list of strings, required)
The ticker(s) of the index or segment for which we want data. Refer to the 1.6 Indices Catalogue for all available tickers.typeIds: (list of strings, required)
The ticker(s) of the metric we want to query. Refer to the metric list for available options, 1.3 Market Indices and 1.4 Benchmarks.valueDates: (list of strings, optional)
Date(s) of the records to retrieve. Accepted values include specific dates in YYYY-MM-DD format, or"latest"
for the most recent data."latest"
would be the default if this parameter is omitted.valueDateRange: (object, optional)
Range of dates for the records to be retrieved, wrapped in an object with from and to parameters.
Example:"valueDateRange": { "from": "2024-01-01", "to": "2024-10-01" }
.
valueDates and valueDateRange should not be used together in the same request.
Example
Request
JSON{ "metrics": [ { "valueDates": [ "latest" ], "indexIds": [ "INFRBBBC" ], "typeIds": [ "T01414" ] } ], "includeMetadata": true }
Response
JSON{ "data": { "results": [ { "metrics": [ { "indexId": "INFRBBBC", "values": [ { "typeId": "T01414", "valueDate": "2024-10-31", "reportDate": "2024-10-31", "value": 1765.5866885492933, "unitId": 1, "attributeUnitId": null, "currencyId": 991 } ], "asOfReportDate": "2024-10-31", "asOfValueDate": "2024-10-31" } ], "metricsValueKeys": [] } ] }, "metadata": { "indexIds": [ { "indexName": "Infra300® Debt, VW USD", "externalTicker": "INFRBBBC", "indexDescription": "The Infra300 Debt index represents the monthly performance of the most recent senior debt instruments issued by the constituents of the infra300® unlisted infrastructure equity index. As of 2024-10-31 the index had a total market capitalisation of USD 103.81 bn. Since inception, a total of 1460 individual instruments have been included in this index." } ], "typeIds": [ { "description": "Index level reflecting the total returns compounded since inception", "displayName": "Index Price", "externalTicker": "T01414" } ] } }