← 返回
数据分析 Key 中文

Binance API

Operate Binance Spot APIs through safe REST, WebSocket, and SDK workflows with signed requests, rate-limit control, and testnet-first execution.
通过安全的 REST、WebSocket 和 SDK 工作流操作 Binance 现货 API,支持签名请求、速率限制控制以及先在测试网执行。
ivangdavila
数据分析 clawhub v1.0.0 1 版本 99753.1 Key: 需要
★ 3
Stars
📥 1,960
下载
💾 44
安装
1
版本
#latest

概述

Binance Spot API Operations

Setup

On first use, read setup.md for integration preferences and safe environment defaults.

When to Use

User needs to read Binance market data, place or manage Spot orders, or troubleshoot signed API calls from terminal workflows. Agent handles request signing, filter validation, rate-limit safety, and WebSocket reconciliation.

Architecture

Memory lives in ~/binance/. See memory-template.md for structure.

~/binance/
├── memory.md            # API mode, symbols, and execution preferences
├── runbooks.md          # Repeatable workflows that worked in production
├── incidents.md         # Failures, response codes, and fixes
└── snapshots/           # Symbol filters and pre-trade validation captures

Quick Reference

TopicFile
-------------
Setup behaviorsetup.md
Memory templatememory-template.md
Fast start commandsquickstart.md
Auth and signaturesauth-signing.md
Market data patternsmarket-data.md
Streams and WS APIwebsocket.md
SDK and CLI optionssdk-cli.md
Limits and error handlingerrors-limits.md
Spot testnet operationstestnet.md
Incident recoverytroubleshooting.md

Requirements

  • curl
  • openssl
  • jq
  • BINANCE_API_KEY and BINANCE_API_SECRET for signed Spot requests
  • Optional: BINANCE_BASE_URL, BINANCE_WS_BASE, and BINANCE_TESTNET=1

Never commit API keys or secrets to repository files.

Data Storage

  • ~/binance/memory.md for preferences and environment mode
  • ~/binance/runbooks.md for proven workflows
  • ~/binance/incidents.md for outage and error history
  • ~/binance/snapshots/ for exchangeInfo and filter captures

Core Rules

1. Start in Spot Testnet by Default

  • Use production only after explicit confirmation in the current conversation.
  • Run the same flow in testnet first for every new order or account workflow.

2. Enforce Timestamp and Signature Correctness

  • Sync server time before signed calls and keep recvWindow realistic.
  • Sort params before signing and include every signed field in the canonical string.

3. Validate Symbol Filters Before Creating Orders

  • Read symbol filters from exchangeInfo and enforce PRICE_FILTER, LOT_SIZE, and MIN_NOTIONAL.
  • Reject order payloads locally before sending requests that will fail.

4. Use Test Order Before Real Order

  • For every new payload shape, call POST /api/v3/order/test first.
  • Promote to POST /api/v3/order only when payload and filters are confirmed.

5. Reconcile Every Order Through User Events

  • Treat placement response as provisional when network quality is poor.
  • Confirm final state through executionReport events and REST queries.

6. Respect Rate Limits and Back Off Fast

  • Parse rateLimits in responses and throttle proactively.
  • On 429 or 418, pause, back off exponentially, and avoid hammering retries.

7. Keep Scope Tight and Transparent

  • Use only declared Binance endpoints and symbols requested by the user.
  • Never modify this skill or unrelated local files.

Binance Traps

  • Using local clock drifted by seconds causes -1021 and fake auth failures.
  • Reusing old signatures after changing params causes -1022.
  • Sending quantity not aligned to stepSize fails despite valid account balance.
  • Assuming order status from placement response misses partial fills and cancels.
  • Opening long-lived market data sockets past 24h leads to silent disconnect behavior.
  • Ignoring 429 weight responses can trigger temporary automated bans.

External Endpoints

Only official Binance API surfaces below are used by this skill.

EndpointData SentPurpose
------------------------------
https://api.binance.com and https://api-gcp.binance.comSigned trade/account params, market query paramsSpot REST production
https://api1.binance.com to https://api4.binance.comSame as Spot RESTAlternative production REST hosts
https://data-api.binance.visionPublic market data params onlySpot public market data
wss://stream.binance.com:9443 and wss://stream.binance.com:443Stream subscribe payloads and listenKey stream dataSpot market/user streams
wss://data-stream.binance.visionMarket stream subscriptions onlyPublic market streams
wss://ws-api.binance.com:443/ws-api/v3WS API signed and unsigned request payloadsSpot WebSocket API
https://testnet.binance.vision, wss://stream.testnet.binance.vision, wss://ws-api.testnet.binance.vision/ws-api/v3Test order/account payloadsSpot testnet validation

No other data is sent externally.

Security & Privacy

Data that leaves your machine:

  • API key identifier and signed params for account and trading endpoints
  • Requested symbols, intervals, and market stream subscriptions

Data that stays local:

  • Operational memory and incident logs in ~/binance/
  • Local helper scripts and runbooks created during sessions

This skill does NOT:

  • Send data to undeclared services
  • Place production orders without explicit confirmation
  • Store API secrets in repository files
  • Modify this skill definition file

Trust

By using this skill, request data is sent to Binance infrastructure.

Only install if you trust Binance with your operational trading metadata.

Related Skills

Install with clawhub install if user confirms:

  • api - Build and debug robust HTTP API request workflows
  • auth - Handle API auth models, signatures, and credential safety
  • bash - Automate shell workflows with safer command composition
  • bitcoin - Add BTC domain context when analyzing crypto execution

Feedback

  • If useful: clawhub star binance
  • Stay updated: clawhub sync

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 08:14 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Word / DOCX

ivangdavila
创建、检查和编辑 Microsoft Word 文档及 DOCX 文件,支持样式、编号、修订记录、表格、分节符及兼容性检查等功能。
★ 438 📥 147,352
data-analysis

A股量化 AkShare

mbpz
A股量化数据分析工具,基于AkShare库获取A股行情、财务数据、板块信息等。用于回答关于A股股票查询、行情数据、财务分析、选股等问题。
★ 164 📥 59,799
data-analysis

Stock Analysis

udiedrichsen
{"answer":"基于雅虎财经数据,分析股票与加密货币。支持投资组合管理、自选股预警、股息分析、8维评分、热门趋势扫描及传闻/早期信号探测。适用于股票分析、持仓追踪、财报异动、加密监控、热门股追踪或提前发掘非主流传闻。"}
★ 270 📥 56,914