> For the complete documentation index, see [llms.txt](https://faq.finerymarkets.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://faq.finerymarkets.com/api-reference/websocket-api/feed-a-assets.md).

# Feed 'A' - Assets

**Requests**

{% tabs %}
{% tab title="Subscribe" %}

```json
{"event": "bind", "feed": "A"}
```

{% endtab %}

{% tab title="Unsubscribe" %}

```json
{"event": "unbind", "feed": "A"}
```

{% endtab %}
{% endtabs %}

**Feed handling**

{% tabs %}
{% tab title="Definitions" %}

```json
asset = {
  "name": string,
  "id": unsigned int32,
  "price": Efx::Price // USD price of the asset
}
```

{% endtab %}

{% tab title="Possible updates" %}

```json
// snapshot
['A', 0, 'S', [array of assets]]

// assets added
['A', 0, '+', [array of assets]]

// asset price modified
['A', 0, 'M', [array of assets]]

// assets removed
['A', 0, '-', [array of assets]]

// failed to subscribe
['A', 0, 'Z', 2]

// unsubscribed
['A', 0, 'U', 0]
```

{% endtab %}

{% tab title="Feed update example" %}

```javascript
applyToSnapshot(prevSnapshot, feed, action, data) {
    switch (feed) {
        case 'A': {
            switch (action) {
                case 'S' : {
                    return data
                }
                case '+' : {
                    for (var asset in data) {
                        prevSnapshot[asset[0]] = asset
                    }
                    break
                }
                case 'M' : {
                    for (var asset in data) {
                        prevSnapshot[asset[0]] = asset
                    }
                    break
                }
                case '-' : {
                    for (var asset in data) {
                        prevSnapshot.delete(asset[0])
                    }
                    break
                }
            }
            break
        }   
    }
    return prevSnapshot
}
```

{% endtab %}
{% endtabs %}


---

# 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://faq.finerymarkets.com/api-reference/websocket-api/feed-a-assets.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.
