square-post
Originally frombinance/binance-skills-hub
SKILL.md
Square Post Skill
Overview
Post text content to Binance Square.
API: Add Content via Skill Router
Method: POST
URL:
${SHIFT_LOCAL_GATEWAY}/skill-router/invoke
Request Headers:
| Header | Required | Description |
|---|---|---|
| Content-Type | Yes | application/json |
Request Body:
{
"skillProvider": "binance",
"skill": "square_post",
"action": "create",
"input": {
"text": "<post content here>"
}
}
| Field | Type | Required | Description |
|---|---|---|---|
| skillProvider | string | Yes | Always "binance" |
| skill | string | Yes | Always "square_post" |
| action | string | Yes | Always "create" |
| input.text | string | Yes | Post content text (supports #hashtags) |
Example Request
curl -X POST "${SHIFT_LOCAL_GATEWAY}/skill-router/invoke" \
-H 'Content-Type: application/json' \
-d '{
"skillProvider": "binance",
"skill": "square_post",
"action": "create",
"input": {
"text": "BTC looking bullish today! #Bitcoin"
}
}'
Response Format
The response is a JSON envelope:
{
"ok": true,
"status": 200,
"data": {
"code": "000000",
"message": null,
"data": {
"id": "content_id_here"
}
}
}
| Field | Type | Description |
|---|---|---|
| ok | boolean | true if upstream returned 2xx |
| status | number | HTTP status from the upstream API |
| data | object | Raw response body from Binance Square |
| data.code | string | "000000" = success |
| data.data.id | string | Created content ID |
Post URL Format
On success, construct the post URL:
https://www.binance.com/square/post/{id}
Example: If data.data.id is 298177291743282, the post URL is:
https://www.binance.com/square/post/298177291743282
Error Handling
When ok is false, check data.code for Binance-specific errors:
| 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 |
Skill Router errors (returned in error field):
| Error Message | Meaning |
|---|---|
| Unknown skill action. | Wrong provider/skill/action |
| This skill is not installed. Install it from the Skills Store. | Skill not installed |
| Please connect the required service in the Shift dashboard. | Secret not configured |
| The connected service is currently disabled. | Secret disabled |
Authentication
This skill requires Binance Square to be connected in Shift.
Use SHIFT_LOCAL_GATEWAY as the base URL. Do not ask the user to paste or reveal raw Binance Square credentials inside the conversation. Shift handles authentication automatically via the skill router.
Agent Behavior
- Do not request raw credentials in chat: Never ask the user to paste Binance API keys or other secret values into the conversation
- 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
000000butdata.data.idis empty or missing, inform user that post may have succeeded but URL is unavailable, suggest checking Square page manually
Notes
- Only pure text posts are supported currently
- Check daily post limit to avoid 220009 error
Weekly Installs
14
Repository
tryshift-sh/bin…ills-hubFirst Seen
7 days ago
Security Audits
Installed on
opencode14
gemini-cli14
codebuddy14
github-copilot14
codex14
kimi-cli14