> For the complete documentation index, see [llms.txt](https://docs.shyft.to/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shyft.to/solana-yellowstone-grpc/docs/account-streaming.md).

# Streaming Accounts

To receive account updates we use the <mark style="color:yellow;">accounts filter</mark> of the Subscribe request. The account filter has the following structure.

{% code overflow="wrap" %}

```json
{
  "slots": {},
  "accounts": {
      "accountLabel": {
        "account": string[], //account updates for these accounts 
        "owner": string[], //account updates for account with these owners
	"filters": {
	  "memcmp": {bytes and offset}  | undefined;
	  "datasize": string | undefined;
          "tokenAccountState": boolean | undefined;
        } 
  },
  "transactions": {},
  "blocks": {},
  "blocksMeta": {},
  "accountsDataSlice": [],
  "commitment": CommitmentLevel.CONFIRMED //commitment level, can be finalized or processed as well
}
```

{% endcode %}

{% hint style="info" %}
The "key" at the start of all filters, (e.g. accountLabel, txnLabel) is a client-assigned label and can be set to any user-defined names.&#x20;
{% endhint %}

Similar to the transactions filter, the first field under the accounts filter is the `accountLabel`, a <mark style="color:yellow;">user-defined label</mark> that helps you identify updates, especially when working with multiple filters. The `account` field specifies an array of <mark style="color:yellow;">account addresses</mark> for streaming account updates. The `owner` field streams updates for <mark style="color:yellow;">accounts owned</mark> by the specified addresses. Additionally, you can refine the data further by adding filters based on <mark style="color:yellow;">memcmp values</mark>, such as `bytes` and `dataSize`.


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.shyft.to/solana-yellowstone-grpc/docs/account-streaming.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
