square-post

Original🇺🇸 English
Not Translated

Post content to Binance Square (Binance social platform for sharing trading insights). Auto-run on messages like 'post to square', 'square post'. Supports pure text posts.

1installs
Added on

NPX Install

npx skill4agent add tryshift-sh/binance-skills-hub square-post

SKILL.md Content

Square Post Skill

Overview

Post text content to Binance Square.

API: Add Content

Method: POST

Base URL:
SHIFT_LOCAL_GATEWAY
Path:
/binance/square-post/bapi/composite/v1/public/pgc/openApi/content/add
Request Headers:
HeaderRequiredDescription
Content-TypeYes
application/json
clienttypeYes
binanceSkill
Request Body:
FieldTypeRequiredDescription
bodyTextOnlystringYesPost content text (supports #hashtags)

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!"
  }'

Response Example

json
{
  "code": "000000",
  "message": null,
  "data": {
    "id": "content_id_here"
  }
}

Response Fields

FieldTypeDescription
codestring
"000000"
= success
messagestringError message (null on success)
data.idstringCreated content ID

Post URL Format

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

Error Handling

CodeDescription
000000Success
10004Network error. Please try again
10005Only allowed for users who have completed identity verification
10007Feature unavailable
20002Detected sensitive words
20013Content length is limited
20020Publishing empty content is not supported
20022Detected sensitive words (with risk segments)
20041Potential security risk with the URL
30004User not found
30008Banned for violating platform guidelines
220003API Key not found
220004API Key expired
220009Daily post limit exceeded for OpenAPI
220010Unsupported content type
220011Content body must not be empty
2000001Account permanently blocked from posting
2000002Device permanently blocked from posting

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 for this request path.

Agent Behavior

  1. Do not request raw credentials in chat: Never ask the user to paste Binance API keys or other secret values into the conversation
  2. Prompt for content if missing: If user triggers posting but doesn't provide specific content, ask what they want to post
  3. 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
  4. Return post URL on success: After successful post, return the URL
    https://www.binance.com/square/post/{id}
  5. Handle missing id: If code is
    000000
    but
    data.id
    is empty or missing, inform user that post may have succeeded but URL is unavailable, suggest checking Square page manually

Notes

  1. Only pure text posts are supported currently
  2. Check daily post limit to avoid 220009 error