Binance Web3 API Skill
Use this skill to run Binance Web3 public read operations through uxc + OpenAPI.
Reuse the uxc skill for shared execution and error-handling guidance.
Prerequisites
- -
uxc is installed and available in PATH. - Network access to
https://web3.binance.com. - Access to the curated OpenAPI schema URL:
- INLINECODE5
Scope
This skill covers the public web3.binance.com endpoints for:
- - token search
- token metadata
- token market snapshots
- address holdings
- token security audit
- social hype leaderboard
- unified token ranks
- meme rush ranks
- smart money signals
This skill does not cover:
- - Binance Spot / account trading APIs
- Binance Square posting
- K-line candles hosted on INLINECODE7
Authentication
Most operations are public and do not require API credentials.
Core Workflow
- 1. Use the fixed link command by default:
-
command -v binance-web3-openapi-cli
- If missing, create it:
uxc link binance-web3-openapi-cli https://web3.binance.com --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/binance-web3-openapi-skill/references/binance-web3.openapi.json
- INLINECODE10
- 2. Inspect operation schema first:
-
binance-web3-openapi-cli get:/bapi/defi/v5/public/wallet-direct/buw/wallet/market/token/search -h
- INLINECODE12
- 3. Execute operation:
- key/value:
binance-web3-openapi-cli get:/bapi/defi/v5/public/wallet-direct/buw/wallet/market/token/search keyword=bnb chainIds=56 orderBy=volume24h
- positional JSON:
INLINECODE14
Operation Groups
Token Discovery And Market Snapshot
-
get:/bapi/defi/v5/public/wallet-direct/buw/wallet/market/token/search
-
get:/bapi/defi/v1/public/wallet-direct/buw/wallet/dex/market/token/meta/info
- - Fetch token market data:
- INLINECODE17
Rankings And Signals
- - Social hype leaderboard:
-
get:/bapi/defi/v1/public/wallet-direct/buw/wallet/market/token/pulse/social/hype/rank/leaderboard
-
post:/bapi/defi/v1/public/wallet-direct/buw/wallet/market/token/pulse/unified/rank/list
-
post:/bapi/defi/v1/public/wallet-direct/buw/wallet/market/token/pulse/rank/list
- INLINECODE21
Research
-
get:/bapi/defi/v3/public/wallet-direct/buw/wallet/address/pnl/active-position-list
- INLINECODE23
Guardrails
- - Keep automation on the JSON output envelope; do not use
--text. - Parse stable envelope fields first:
ok, kind, protocol, data, error. - Binance Web3 responses usually wrap payloads as
code, message, success, data; treat code == "000000" as success. - INLINECODE35 requires a UUID v4
requestId; generate one for every request instead of reusing old IDs. - Address holdings requires operation-level headers
clienttype=web and clientversion=1.2.0; keep them scoped to that operation instead of injecting them host-wide. - For non-string objects, prefer positional JSON instead of flattening complex filters into many
key=value args. - INLINECODE40 is equivalent to
uxc https://web3.binance.com --schema-url <binance_web3_openapi_schema> <operation> ....
References
- - Usage patterns: INLINECODE42
- Curated OpenAPI schema: INLINECODE43
- Binance skills hub source material: https://github.com/binance/binance-skills-hub/tree/main/skills/binance-web3
Binance Web3 API 技能
使用此技能通过 uxc + OpenAPI 运行 Binance Web3 公共读取操作。
复用 uxc 技能以共享执行和错误处理指导。
前提条件
- - uxc 已安装并可在 PATH 中使用。
- 可访问 https://web3.binance.com 网络。
- 可访问精选的 OpenAPI 模式 URL:
- https://raw.githubusercontent.com/holon-run/uxc/main/skills/binance-web3-openapi-skill/references/binance-web3.openapi.json
范围
此技能涵盖 web3.binance.com 的公共端点,用于:
- - 代币搜索
- 代币元数据
- 代币市场快照
- 地址持仓
- 代币安全审计
- 社交热度排行榜
- 统一代币排名
- Meme 热潮排名
- 聪明钱信号
此技能不涵盖:
- - Binance 现货/账户交易 API
- Binance 广场发帖
- 托管在 https://dquery.sintral.io 上的 K 线数据
认证
大多数操作是公开的,不需要 API 凭证。
核心工作流程
- 1. 默认使用固定链接命令:
- command -v binance-web3-openapi-cli
- 如果缺失,则创建:
uxc link binance-web3-openapi-cli https://web3.binance.com --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/binance-web3-openapi-skill/references/binance-web3.openapi.json
- binance-web3-openapi-cli -h
- 2. 首先检查操作模式:
- binance-web3-openapi-cli get:/bapi/defi/v5/public/wallet-direct/buw/wallet/market/token/search -h
- binance-web3-openapi-cli post:/bapi/defi/v1/public/wallet-direct/security/token/audit -h
- 3. 执行操作:
- 键/值形式:
binance-web3-openapi-cli get:/bapi/defi/v5/public/wallet-direct/buw/wallet/market/token/search keyword=bnb chainIds=56 orderBy=volume24h
- 位置 JSON 形式:
binance-web3-openapi-cli post:/bapi/defi/v1/public/wallet-direct/buw/wallet/market/token/pulse/unified/rank/list {rankType:10,chainId:56,period:50,page:1,size:20}
操作分组
代币发现与市场快照
- get:/bapi/defi/v5/public/wallet-direct/buw/wallet/market/token/search
- get:/bapi/defi/v1/public/wallet-direct/buw/wallet/dex/market/token/meta/info
- get:/bapi/defi/v4/public/wallet-direct/buw/wallet/market/token/dynamic/info
排名与信号
- get:/bapi/defi/v1/public/wallet-direct/buw/wallet/market/token/pulse/social/hype/rank/leaderboard
- post:/bapi/defi/v1/public/wallet-direct/buw/wallet/market/token/pulse/unified/rank/list
- post:/bapi/defi/v1/public/wallet-direct/buw/wallet/market/token/pulse/rank/list
- post:/bapi/defi/v1/public/wallet-direct/buw/wallet/web/signal/smart-money
研究
- get:/bapi/defi/v3/public/wallet-direct/buw/wallet/address/pnl/active-position-list
- post:/bapi/defi/v1/public/wallet-direct/security/token/audit
安全护栏
- - 保持自动化在 JSON 输出信封上;不要使用 --text。
- 首先解析稳定的信封字段:ok、kind、protocol、data、error。
- Binance Web3 响应通常将负载包装为 code、message、success、data;将 code == 000000 视为成功。
- audit 需要 UUID v4 格式的 requestId;为每个请求生成新的 ID,而不是复用旧 ID。
- 地址持仓需要操作级别的请求头 clienttype=web 和 clientversion=1.2.0;将其限定在该操作范围内,而不是全局注入。
- 对于非字符串对象,优先使用位置 JSON,而不是将复杂过滤器展平为多个 key=value 参数。
- binance-web3-openapi-cli ... 等同于 uxc https://web3.binance.com --schema-url web3openapi_schema> ...。
参考资料
- - 使用模式:references/usage-patterns.md
- 精选 OpenAPI 模式:references/binance-web3.openapi.json
- Binance 技能中心源材料:https://github.com/binance/binance-skills-hub/tree/main/skills/binance-web3