> 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-landing/robinhood-send-plaintext.md).

# Send Plaintext Transaction

接入前请查看[节点地址、Account UUID 与额度](/node1-docs/documentation/zh/robinhood/robinhood-landing.md)。

Bot 和浏览器应用可以直接在文本请求体中提交同一笔已签名交易，无需 JSON-RPC 请求包装。此入口仅支持单笔交易。

```http
POST /v2/robinhood_send_raw_transaction?auth=<ACCOUNT_UUID>
Content-Type: text/plain
```

请求体必须是一个完整的、以 `0x` 开头的已签名交易字符串，不要添加 JSON、引号或数组。允许首尾 ASCII 空白字符。支持的交易格式、校验规则和节点配置的请求体大小限制与 JSON-RPC 相同。

## cURL：在 URL 中携带 Account UUID

```bash
curl -X POST 'https://robinhood-ohio-2b.node1.me/v2/robinhood_send_raw_transaction?auth=<ACCOUNT_UUID>' \
  -H 'Content-Type: text/plain' \
  --data-raw '0x<SIGNED_TRANSACTION>'
```

将两个占位符替换为自己的数据，去掉尖括号，并仅保留一个 `0x` 前缀。使用 Ohio 2C 或 SFO3 时，只需将域名替换为[服务概览](/node1-docs/documentation/zh/robinhood/robinhood-landing.md)中对应的域名。

## cURL：在 Authorization 请求头中携带 Account UUID

Bot 也可以省略整个查询字符串，使用 Bearer 鉴权：

```bash
curl -X POST 'https://robinhood-ohio-2b.node1.me/v2/robinhood_send_raw_transaction' \
  -H 'Authorization: Bearer <ACCOUNT_UUID>' \
  -H 'Content-Type: text/plain' \
  --data-raw '0x<SIGNED_TRANSACTION>'
```

两种鉴权方式只选一种。URL 鉴权仅允许一个 `auth` 参数，不要附加其他查询参数；参数值应进行 URL 编码。同时使用两种鉴权、重复参数或 URL 编码不合法的请求会被拒绝。URL 鉴权仅适用于此入口。不要分享含 UUID 的完整 URL，并在自己的请求日志中隐藏 `auth` 值。

## 浏览器调用示例

```javascript
const response = await fetch(
  `${baseUrl}/v2/robinhood_send_raw_transaction?auth=${encodeURIComponent(accountUuid)}`,
  {
    method: 'POST',
    headers: { 'Content-Type': 'text/plain' },
    credentials: 'omit',
    body: signedRawTransaction,
  },
);
const result = await response.json();
if (!response.ok || result.error) {
  // 如有 error.data.retry，请遵循其指示；提交结果不明确时不要自动重试。
  console.error(response.status, result.error ?? result);
} else {
  console.log(result.result); // HTTP 202：本地已接收，不表示上链。
  console.log(response.headers.get('x-node1-submission-state')); // queued
}
```

将 `baseUrl` 设为[服务概览](/node1-docs/documentation/zh/robinhood/robinhood-landing.md)中的任一 HTTPS 地址，不带末尾斜杠。使用 URL 鉴权与 `text/plain`，且不添加其他触发预检的请求头或选项时，浏览器可以省去 CORS 预检。Bearer 鉴权可能触发预检，此入口也支持 `OPTIONS`。不支持 Cookie 凭据。浏览器可读取提交状态、去重标记和 retry-after 响应头。

服务器上的 Bot 本身没有浏览器 CORS 预检。纯文本能简化请求格式，但不保证更快上链；HTTPS 传输仍然加密。

## 共享额度与响应格式

纯文本与 JSON-RPC 单笔入口在同一节点共享账号额度、免费/付费路由和去重机制。普通付费账号还与 batch 合并按交易笔数计算额度；每个单笔请求消耗 1 笔，详见[套餐与频率限制](/node1-docs/documentation/zh/robinhood/robinhood-landing.md)。切换格式不会增加额度或绕过去重；重复的有效请求仍占用额度。

响应仍为 JSON，沿用[响应与重试](/node1-docs/documentation/zh/robinhood/robinhood-landing/robinhood-responses.md)中的单笔状态码及错误字段。由于请求不携带 JSON-RPC ID，响应固定使用 `"id": null`：

响应提示 `message` 为 `"Successfully forwarded"`。单笔 JSON-RPC 和纯文本响应将其放在顶层；batch 将其放在每个 `queued` 交易项中。该字段仅用于展示，服务仍在本地入队后返回 HTTP 202，不等待网络写出或排序器确认，也不表示交易已上链。客户端应依据状态、哈希及错误字段处理响应，不要根据提示文案判断上链成功。

```json
{
  "jsonrpc": "2.0",
  "id": null,
  "result": "0x<TRANSACTION_HASH>",
  "message": "Successfully forwarded"
}
```

新版节点完成本地校验、鉴权、限流和入队后，立即返回 HTTP 202，响应头为 `x-node1-submission-state: queued`。不等待排序器返回，也不等待上链回执。上面的 `result` 哈希只表示本地已接收，后续上游错误不会再通过该响应返回。

客户端应接受 HTTP 202 的正常 `result`，并检查 `error` 与提交状态。迁移期间旧节点仍可能返回 `202 / -32008` 错误；它与新版的已入队回执不同，处理方式见[响应与重试](/node1-docs/documentation/zh/robinhood/robinhood-landing/robinhood-responses.md)。

[查看响应处理与重试规则 →](/node1-docs/documentation/zh/robinhood/robinhood-landing/robinhood-responses.md)


---

# 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-landing/robinhood-send-plaintext.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.
