square-post by binance/binance-skills-hub
npx skills add https://github.com/binance/binance-skills-hub --skill square-post将文本内容发布到币安广场。
URL :
https://www.binance.com/bapi/composite/v1/public/pgc/openApi/content/add
请求头 :
| 请求头 | 必填 | 描述 |
|---|---|---|
| X-Square-OpenAPI-Key | 是 | Square OpenAPI 密钥 |
| Content-Type | 是 | application/json |
| clienttype | 是 | binanceSkill |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
请求体 :
| 字段 | 类型 | 必填 | 描述 |
|---|---|---|---|
| bodyTextOnly | string | 是 | 帖子内容文本(支持 #话题标签) |
curl -X POST 'https://www.binance.com/bapi/composite/v1/public/pgc/openApi/content/add' \
-H 'X-Square-OpenAPI-Key: your_api_key' \
-H 'Content-Type: application/json' \
-H 'clienttype: binanceSkill' \
-d '{
"bodyTextOnly": "BTC looking bullish today!"
}'
{
"code": "000000",
"message": null,
"data": {
"id": "content_id_here"
}
}
| 字段 | 类型 | 描述 |
|---|---|---|
| code | string | "000000" = 成功 |
| message | string | 错误信息(成功时为 null) |
| data.id | string | 创建的内容 ID |
成功后,构建帖子 URL:
https://www.binance.com/square/post/{id}
示例:如果 data.id 是 298177291743282,则帖子 URL 为:
https://www.binance.com/square/post/298177291743282
| 代码 | 描述 |
|---|---|
| 000000 | 成功 |
| 10004 | 网络错误。请重试 |
| 10005 | 仅允许已完成身份验证的用户使用 |
| 10007 | 功能不可用 |
| 20002 | 检测到敏感词 |
| 20013 | 内容长度受限 |
| 20020 | 不支持发布空内容 |
| 20022 | 检测到敏感词(包含风险片段) |
| 20041 | URL 存在潜在安全风险 |
| 30004 | 用户未找到 |
| 30008 | 因违反平台准则被封禁 |
| 220003 | API 密钥未找到 |
| 220004 | API 密钥已过期 |
| 220009 | OpenAPI 每日发帖次数超限 |
| 220010 | 不支持的内容类型 |
| 220011 | 内容正文不能为空 |
| 2000001 | 账户被永久禁止发帖 |
| 2000002 | 设备被永久禁止发帖 |
| 请求头 | 必填 | 描述 |
|---|---|---|
| X-Square-OpenAPI-Key | 是 | 用于 Square 发帖的 API 密钥 |
向用户展示凭据时:
abc12...xyz9列出账户时,仅显示名称和描述——切勿显示完整密钥:
Accounts:
* default (Square 发帖的默认账户)
your_api_keyabc12...xyz9)https://www.binance.com/square/post/{id}000000 但 data.id 为空或缺失,告知用户帖子可能已成功但 URL 不可用,建议手动检查 Square 页面每周安装次数
225
代码仓库
GitHub 星标数
386
首次出现
5 天前
安全审计
安装于
codex222
opencode221
gemini-cli217
github-copilot217
amp217
cline216
Post text content to Binance Square.
URL :
https://www.binance.com/bapi/composite/v1/public/pgc/openApi/content/add
Request Headers :
| Header | Required | Description |
|---|---|---|
| X-Square-OpenAPI-Key | Yes | Square OpenAPI Key |
| Content-Type | Yes | application/json |
| clienttype | Yes | binanceSkill |
Request Body :
| Field | Type | Required | Description |
|---|---|---|---|
| bodyTextOnly | string | Yes | Post content text (supports #hashtags) |
curl -X POST 'https://www.binance.com/bapi/composite/v1/public/pgc/openApi/content/add' \
-H 'X-Square-OpenAPI-Key: your_api_key' \
-H 'Content-Type: application/json' \
-H 'clienttype: binanceSkill' \
-d '{
"bodyTextOnly": "BTC looking bullish today!"
}'
{
"code": "000000",
"message": null,
"data": {
"id": "content_id_here"
}
}
| Field | Type | Description |
|---|---|---|
| code | string | "000000" = success |
| message | string | Error message (null on success) |
| data.id | string | Created content ID |
On success, construct the post URL:
https://www.binance.com/square/post/{id}
Example: If data.id is 298177291743282, the post URL is:
https://www.binance.com/square/post/298177291743282
| 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 |
| Header | Required | Description |
|---|---|---|
| X-Square-OpenAPI-Key | Yes | API key for Square posting |
When showing credentials to users:
abc12...xyz9When listing accounts, show names and description only — never full keys:
Accounts:
* default (Default account for Square posting)
your_api_keyabc12...xyz9)https://www.binance.com/square/post/{id}000000 but data.id is empty or missing, inform user that post may have succeeded but URL is unavailable, suggest checking Square page manuallyWeekly Installs
225
Repository
GitHub Stars
386
First Seen
5 days ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykFail
Installed on
codex222
opencode221
gemini-cli217
github-copilot217
amp217
cline216
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
102,200 周安装
| 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 |