---
updatedAt: 2026-07-10T20:09:58.000Z
agentTools:
  projectIndex: https://docs.zerohash.com/llms.txt
---

# Subscribing to a Symbol

To start streaming prices, send a signed `subscribe` message on the `prices` topic identifying the symbol you want. On success the server returns a confirmation, then begins sending [`price-update`](https://docs.zerohash.com/reference/price-updates) messages for that symbol.

Use **[Listing Available Symbols](https://docs.zerohash.com/reference/listing-available-symbols)** first to get valid `ASSET/QUOTE` symbol strings.

<Callout icon="⚠️" theme="warn">
  ### **RFQ liquidity product only.** Symbols and prices on this feed are specific to the RFQ product and do **not** relate to CLOB instruments.
</Callout>

## Request

Every message must be authenticated — see **[Authentication](https://docs.zerohash.com/reference/authentication-1)**. For the price feed, `body` is **required** and identifies the symbol.

| Field         | Type   | Required | Description                                                                         |
| ------------- | ------ | -------- | ----------------------------------------------------------------------------------- |
| `messageType` | string | ✅        | Subscription message type — `subscribe`                                             |
| `topic`       | string | ✅        | Topic to subscribe to — `prices` for the price feed                                 |
| `body`        | object | ✅        | Object identifying which symbol will be subscribed to (required for the price feed) |
| `key`         | string | ✅        | Your API public key                                                                 |
| `passphrase`  | string | ✅        | Your API passphrase                                                                 |
| `timestamp`   | string | ✅        | Time in seconds since Unix epoch (same value used to sign)                          |
| `signature`   | string | ✅        | Base64-encoded HMAC-SHA256 signature                                                |

**Example request:**

```json
{
  "messageType": "subscribe",
  "topic": "prices",
  "key": "API_PUBLIC_KEY",
  "passphrase": "API_PASSPHRASE",
  "timestamp": "1720000000",
  "signature": "base64_encoded_hmac",
  "body": { "symbol": "BTC/USD" }
}
```

## Response

On success the server returns a `subscribe` message confirming the symbol feed.

| Field         | Type   | Description                                                              |
| ------------- | ------ | ------------------------------------------------------------------------ |
| `messageType` | string | `subscribe`                                                              |
| `body`        | string | Confirmation message, e.g. `successfully subscribed to the BTC/USD feed` |

**Example response:**

```json
{
  "messageType": "subscribe",
  "body": "successfully subscribed to the BTC/USD feed"
}
```

After this confirmation, [`price-update`](https://docs.zerohash.com/reference/price-updates) messages begin arriving for the symbol.

## Subscribing to multiple symbols

Send one signed `subscribe` message **per symbol** — each with its own `body` (and therefore its own signature). All subscriptions share the same connection, and you keep them all alive with a single `ping` every 20 seconds.

## Next steps

* **[Price Updates](https://docs.zerohash.com/reference/price-updates)** — the `price-update` message fields
* **[Listing Available Symbols](https://docs.zerohash.com/reference/listing-available-symbols)** — discover valid symbols
* **[Maintaining Subscription](https://docs.zerohash.com/reference/maintaining-subscription)** — the 20-second heartbeat

<br />