square-post
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseSquare Post Skill
Square Post Skill
Overview
概述
Post text content to Binance Square.
将文本内容发布至Binance Square。
API: Add Content
API:添加内容
Method: POST
请求方法:POST
Base URL:
SHIFT_LOCAL_GATEWAYPath:
/binance/square-post/bapi/composite/v1/public/pgc/openApi/content/addRequest Headers:
| Header | Required | Description |
|---|---|---|
| X-Square-OpenAPI-Key | Injected by Shift | This header is injected by Shift when the |
| Content-Type | Yes | |
| clienttype | Yes | |
Request Body:
| Field | Type | Required | Description |
|---|---|---|---|
| bodyTextOnly | string | Yes | Post content text (supports #hashtags) |
基础URL:
SHIFT_LOCAL_GATEWAY路径:
/binance/square-post/bapi/composite/v1/public/pgc/openApi/content/add请求头:
| 请求头 | 是否必填 | 描述 |
|---|---|---|
| X-Square-OpenAPI-Key | 由Shift注入 | 当配置 |
| Content-Type | 是 | |
| clienttype | 是 | |
请求体:
| 字段 | 类型 | 是否必填 | 描述 |
|---|---|---|---|
| bodyTextOnly | 字符串 | 是 | 发布内容文本(支持#话题标签) |
Example Request
请求示例
bash
curl -X POST "${SHIFT_LOCAL_GATEWAY}/binance/square-post/bapi/composite/v1/public/pgc/openApi/content/add" \
-H 'Content-Type: application/json' \
-H 'clienttype: binanceSkill' \
-d '{
"bodyTextOnly": "BTC looking bullish today!"
}'bash
curl -X POST "${SHIFT_LOCAL_GATEWAY}/binance/square-post/bapi/composite/v1/public/pgc/openApi/content/add" \
-H 'Content-Type: application/json' \
-H 'clienttype: binanceSkill' \
-d '{
"bodyTextOnly": "BTC looking bullish today!"
}'Response Example
响应示例
json
{
"code": "000000",
"message": null,
"data": {
"id": "content_id_here"
}
}json
{
"code": "000000",
"message": null,
"data": {
"id": "content_id_here"
}
}Response Fields
响应字段
| Field | Type | Description |
|---|---|---|
| code | string | |
| message | string | Error message (null on success) |
| data.id | string | Created content ID |
| 字段 | 类型 | 描述 |
|---|---|---|
| code | 字符串 | |
| message | 字符串 | 错误信息(成功时为null) |
| data.id | 字符串 | 已创建内容的ID |
Post URL Format
发布链接格式
On success, construct the post URL:
https://www.binance.com/square/post/{id}Example: If is , the post URL is:
data.id298177291743282https://www.binance.com/square/post/298177291743282发布成功后,可按以下格式构造发布链接:
https://www.binance.com/square/post/{id}示例:若为,则发布链接为:
data.id298177291743282https://www.binance.com/square/post/298177291743282Error Handling
错误处理
| Code | Description |
|---|---|
| 000000 | Success |
| 10004 | Network error. Please try again |
| 10005 | Only allowed for users who have completed identity verification |
| 10007 | Feature unavailable |
| 20002 | Detected sensitive words |
| 20013 | Content length is limited |
| 20020 | Publishing empty content is not supported |
| 20022 | Detected sensitive words (with risk segments) |
| 20041 | Potential security risk with the URL |
| 30004 | User not found |
| 30008 | Banned for violating platform guidelines |
| 220003 | API Key not found |
| 220004 | API Key expired |
| 220009 | Daily post limit exceeded for OpenAPI |
| 220010 | Unsupported content type |
| 220011 | Content body must not be empty |
| 2000001 | Account permanently blocked from posting |
| 2000002 | Device permanently blocked from posting |
| 错误码 | 描述 |
|---|---|
| 000000 | 成功 |
| 10004 | 网络错误,请重试 |
| 10005 | 仅完成身份验证的用户可使用 |
| 10007 | 功能暂不可用 |
| 20002 | 检测到敏感词 |
| 20013 | 内容长度超出限制 |
| 20020 | 不支持发布空内容 |
| 20022 | 检测到敏感词(含风险片段) |
| 20041 | 链接存在潜在安全风险 |
| 30004 | 用户未找到 |
| 30008 | 因违反平台规则被封禁 |
| 220003 | 未找到API密钥 |
| 220004 | API密钥已过期 |
| 220009 | OpenAPI每日发布次数超限 |
| 220010 | 不支持该内容类型 |
| 220011 | 内容主体不能为空 |
| 2000001 | 账号被永久禁止发布 |
| 2000002 | 设备被永久禁止发布 |
Authentication
认证方式
This skill expects a preconfigured Shift secret slot named .
square_open_apiUse as the base URL. Do not ask the user to paste or reveal the raw Binance Square API key inside the conversation. Do not call Binance directly and do not call a remote Shift host directly. Shift will inject the header at request time.
SHIFT_LOCAL_GATEWAYX-Square-OpenAPI-Key该Skill依赖预先配置的Shift密钥插槽,名称为。
square_open_api请使用作为基础URL。请勿要求用户在对话中粘贴或透露原始Binance Square API密钥。请勿直接调用币安接口,也请勿直接调用远程Shift主机。Shift会在请求时自动注入请求头。
SHIFT_LOCAL_GATEWAYX-Square-OpenAPI-KeyRequired Header
必填请求头
| Header | Required | Description |
|---|---|---|
| X-Square-OpenAPI-Key | Injected by Shift | API key for Square posting |
| 请求头 | 是否必填 | 描述 |
|---|---|---|
| X-Square-OpenAPI-Key | 由Shift注入 | 用于Square发布的API密钥 |
Agent Behavior
Agent行为规范
- Check secret slot before API calls: Verify that the Shift slot is configured
square_open_api - Do not request raw API keys in chat: If the slot is missing, tell the user to configure it in Shift dashboard
- Prompt for content if missing: If user triggers posting but doesn't provide specific content, ask what they want to post
- Optimize content before posting:
- Polish user's raw input for better readability
- Show optimized content and ask user to choose: use optimized version or post original text
- Return post URL on success: After successful post, return the URL
https://www.binance.com/square/post/{id} - Handle missing id: If code is but
000000is empty or missing, inform user that post may have succeeded but URL is unavailable, suggest checking Square page manuallydata.id
- API调用前检查密钥插槽:验证Shift插槽是否已配置
square_open_api - 请勿在聊天中索要原始API密钥:若插槽未配置,请告知用户在Shift控制台中进行配置
- 内容缺失时提示用户:若用户触发发布操作但未提供具体内容,询问用户想要发布的内容
- 发布前优化内容:
- 优化用户的原始输入以提升可读性
- 展示优化后的内容,并让用户选择:使用优化版本或发布原始文本
- 发布成功后返回链接:发布成功后,返回链接
https://www.binance.com/square/post/{id} - 处理ID缺失情况:若响应码为但
000000为空或缺失,告知用户发布可能已成功但无法获取链接,建议手动查看Square页面data.id
Notes
注意事项
- Only pure text posts are supported currently
- Check daily post limit to avoid 220009 error
- 当前仅支持纯文本发布
- 请留意每日发布次数限制,避免触发220009错误