> For the complete documentation index, see [llms.txt](https://node1.gitbook.io/node1-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://node1.gitbook.io/node1-docs/documentation/zh/robinhood/robinhood-feed/robinhood-feed-connection.md).

# Connection Guide

使用持有有效 Feed 订阅的 Account UUID 接入。两种连接方式共用同一个 Account UUID 和 Feed 订阅，套餐与开通步骤见 [Robinhood Feed](/node1-docs/documentation/zh/robinhood/robinhood-feed.md)。

区域：Ohio · 协议：WebSocket（ws）

## 选择消息格式

**`/tx/<account_uuid>` 是交易数据接收更快的连接；`/feed/<account_uuid>` 保留原始 Feed 格式，用于 Nitro 节点加速。**

> **节点接入前提：** 切换到 Node1 `/feed/` 前，必须先通过 Robinhood 官方 Feed 将节点同步到最新区块。

| 连接方式             | 路径                     | 消息格式                  | 适用场景                     |
| ---------------- | ---------------------- | --------------------- | ------------------------ |
| Transaction Feed | `/tx/<account_uuid>`   | 每条消息包含一笔交易            | 速度更快，适合 Bot、自定义交易处理程序    |
| Native Feed      | `/feed/<account_uuid>` | 原始 Feed 格式：每条消息对应一个区块 | Robinhood Chain Nitro 节点 |

将 `<account_uuid>` 替换为你的 Account UUID，不保留尖括号。

## Transaction Feed（逐笔交易）

```
ws://ohio.robinhood-feeder.node1.me/tx/<account_uuid>
```

Node1 将数据流拆分为逐笔交易消息。与原始 Feed 的区块消息格式不同，此方式每条消息包含一笔交易。

安装 wscat 后执行：

```bash
wscat -c "ws://ohio.robinhood-feeder.node1.me/tx/<account_uuid>"
```

## Native Feed（兼容 Nitro）

```
ws://ohio.robinhood-feeder.node1.me/feed/<account_uuid>
```

此方式保留原始 Feed 格式，每条消息对应一个区块，可用于兼容 Nitro 的客户端。

WebSocket 握手时必须携带以下请求头：

```http
Arbitrum-Feed-Client-Version: 2
```

安装 wscat 后执行：

```bash
wscat -c "ws://ohio.robinhood-feeder.node1.me/feed/<account_uuid>" \
  -H "Arbitrum-Feed-Client-Version: 2"
```

### 接入已有的 Robinhood Chain Nitro 节点

1. 先使用 Robinhood 官方 Feed 将节点同步到最新区块。
2. 确认节点已追上最新区块后再切换。
3. 将节点的 Feed 输入地址替换为下方 Node1 `/feed/` 地址，并确保携带必需的版本请求头：

```
--node.feed.input.url="ws://ohio.robinhood-feeder.node1.me/feed/<account_uuid>"
```

确保节点发起 WebSocket 握手时携带 `Arbitrum-Feed-Client-Version: 2`。这是请求头，不是 URL 查询参数。Nitro 的原始格式输入应使用 `/feed/`；`/tx/` 的消息格式不同。

保存配置并重启节点后，检查日志中的 Feed 连接状态及数据接收情况。如连接失败，请检查 UUID、订阅有效期、必需的版本请求头以及网络连通性。

## 连接错误

连接请求被拒绝时，可根据 WebSocket 握手返回的 HTTP 状态码排查。

| 状态码   | 原因                                                    |
| ----- | ----------------------------------------------------- |
| `400` | 版本头缺失、不合法或低于 `2`；请求 `sequence` 格式错误；WebSocket 握手格式错误。 |
| `401` | token 无效，或订阅未生效、已到期或被撤销。                              |
| `404` | 请求路径不是支持的 `/feed`、`/tx` 端点。                           |
| `429` | 同一账号连接数超限。                                            |
| `503` | 订阅鉴权缓存尚未就绪，或已过期不可用。                                   |


---

# 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, and the optional `goal` query parameter:

```
GET https://node1.gitbook.io/node1-docs/documentation/zh/robinhood/robinhood-feed/robinhood-feed-connection.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
