> For the complete documentation index, see [llms.txt](https://gitbook-docs.coinmetrics.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gitbook-docs.coinmetrics.io/api-reference/timeseries/timeseries-stream/asset-metrics.md).

# Asset metrics

Returns a WebSocket stream of metrics for specified assets.\
Endpoint supports only block by block (`1b` frequency), per second (`1s` frequency), and sub-second (`200ms` frequency) metrics.\
Different sets of metrics may come in different messages.\
If you are falling behind (slow client) you will get `warning` message first, then `error` message and disconnection will happen.

```json
{"openapi":"3.0.2","info":{"title":"Coin Metrics API v4","version":"4.0.0"},"tags":[{"name":"Timeseries stream","description":"WebSocket endpoints for getting a real-time stream of metrics, market data, indexes and other time series data.\n\n**Endpoints on this page:**\n- `GET /timeseries-stream/asset-metrics` — Asset metrics\n- `GET /timeseries-stream/asset-quotes` — Asset quotes\n- `GET /timeseries-stream/index-levels` — Index levels\n- `GET /timeseries-stream/market-candles` — Market candles\n- `GET /timeseries-stream/market-contract-prices` — Market contract prices\n- `GET /timeseries-stream/market-liquidations` — Market liquidations\n- `GET /timeseries-stream/market-openinterest` — Market open interest\n- `GET /timeseries-stream/market-orderbooks` — Market orderbooks\n- `GET /timeseries-stream/market-quotes` — Market quotes\n- `GET /timeseries-stream/market-trades` — Market trades\n- `GET /timeseries-stream/pair-quotes` — Pair quotes"}],"servers":[{"url":"wss://api.coinmetrics.io/v4"}],"security":[{"api_key":[]}],"components":{"securitySchemes":{"api_key":{"description":"Coin Metrics API key can be specified as `?api_key=` query parameter.","in":"query","name":"api_key","type":"apiKey"}},"parameters":{"AssetId":{"description":"Comma separated list of assets.<br/> Use a corresponding `/catalog-all-v2/asset-{dataType}` endpoint for the full list of supported assets for a given data type.","in":"query","name":"assets","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},"AssetMetrics":{"description":"Comma separated metrics to request time series data for.<br/> Information on all available metrics can be found on page https://coverage.coinmetrics.io/asset-metrics-v2.<br/> Use the [/catalog-all-v2/asset-metrics](#operation/getCatalogAllV2AssetMetrics) endpoint for the full list of supported metrics per asset.","in":"query","name":"metrics","required":true,"schema":{"type":"array","items":{"type":"string"}},"explode":false},"StreamAssetMetricsFrequency":{"description":"Frequency of the metrics. Supported values are `1b` (block by block), `1s`, `200ms`.","in":"query","name":"frequency","schema":{"default":"1b","type":"string"}},"Backfill":{"description":"What data should be sent upon a connection.<br/> By default the latest values are sent just before real-time data.","in":"query","name":"backfill","schema":{"type":"string","default":"latest","enum":["latest","none"]}},"Pretty":{"description":"Human-readable formatting of JSON responses.","in":"query","name":"pretty","schema":{"type":"boolean","default":false}},"IgnoreUnsupportedErrors":{"description":"Ignore \"unsupported\" errors for not currently supported by Coin Metrics items.","in":"query","name":"ignore_unsupported_errors","schema":{"type":"boolean","default":false}},"IgnoreForbiddenErrors":{"description":"Ignore \"forbidden\" errors for the items you currently don't have access to.","in":"query","name":"ignore_forbidden_errors","schema":{"type":"boolean","default":false}}},"responses":{"UriTooLong":{"description":"Provided URI is too long. It must not be greater than 10000 symbols."},"StreamingAssetMetrics":{"description":"Asset metrics WebSocket message.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StreamingAssetMetric"}}}}},"schemas":{"StreamingAssetMetric":{"description":"Metric values.","properties":{"asset":{"$ref":"#/components/schemas/Asset"},"time":{"$ref":"#/components/schemas/Time"},"cm_sequence_id":{"$ref":"#/components/schemas/cmSequenceId"}},"required":["asset","time","cm_sequence_id"],"additionalProperties":{"nullable":true,"description":"Metric value.","type":"string"},"type":"object"},"Asset":{"description":"Name of the asset.","type":"string"},"Time":{"description":"The time in ISO 8601 date-time format. Always with nanoseconds precision.","type":"string","format":"date-time"},"cmSequenceId":{"description":"The monotonically increasing message number, resets on disconnection.","type":"string"}}},"paths":{"/timeseries-stream/asset-metrics":{"get":{"summary":"Asset metrics","description":"Returns a WebSocket stream of metrics for specified assets.<br/> Endpoint supports only block by block (`1b` frequency), per second (`1s` frequency), and sub-second (`200ms` frequency) metrics.<br/> Different sets of metrics may come in different messages.<br/> If you are falling behind (slow client) you will get `warning` message first, then `error` message and disconnection will happen.","operationId":"getTimeseriesStreamAssetMetrics","tags":["Timeseries stream"],"parameters":[{"$ref":"#/components/parameters/AssetId"},{"$ref":"#/components/parameters/AssetMetrics"},{"$ref":"#/components/parameters/StreamAssetMetricsFrequency"},{"$ref":"#/components/parameters/Backfill"},{"$ref":"#/components/parameters/Pretty"},{"$ref":"#/components/parameters/IgnoreUnsupportedErrors"},{"$ref":"#/components/parameters/IgnoreForbiddenErrors"}],"responses":{"414":{"$ref":"#/components/responses/UriTooLong"},"default":{"$ref":"#/components/responses/StreamingAssetMetrics"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://gitbook-docs.coinmetrics.io/api-reference/timeseries/timeseries-stream/asset-metrics.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
