Skip to content

NanookAI/binance-api

Repository files navigation

Binance API Skill

An Agent Skill that teaches AI agents (Claude Code, Claude.ai, and other skill-compatible agents) how to use the free Binance public market data REST API — no API key, no signup.

The skill covers the Spot market data endpoints (security type NONE) — live prices, klines/candlesticks, order books, trades, and 24h/rolling statistics — plus the USDⓈ-M and COIN-M futures market data APIs (mark price, funding rates, open interest, long/short ratios), all free and key-less.

What the skill enables

Once loaded, an agent can reliably:

  • Look up the latest price for any trading pair (e.g. BTCUSDT, ETHUSDT)
  • Fetch OHLCV candlestick data at any interval from 1 second to 1 month
  • Page through long historical kline ranges (1,000-bar pagination recipe)
  • Read order book depth, best bid/ask, and recent/aggregate trades
  • Get 24h, trading-day, and custom rolling-window price statistics
  • Discover tradable symbols and trading rules via exchangeInfo
  • Fetch futures mark prices, funding rate history, open interest, and long/short sentiment ratios (USDⓈ-M fapi and COIN-M dapi)
  • Stream real-time prices, klines, and order books over WebSocket
  • Bulk-download complete market history (ZIP/CSV archive) for backtesting
  • Respect the weight-based rate limits (6,000/min per IP, 429/418 handling)
  • Avoid real-world pitfalls (string-encoded prices, ms timestamps, the still-open last candle, all-symbols responses, geo-restrictions)

All request/response examples in the skill were verified against the live API.

Repository layout

skills/
└── binance-api/
    ├── SKILL.md                 # Entry point: quick reference, klines recipes, tips
    └── references/
        ├── endpoints.md         # Full spot market data endpoint reference with verified examples
        ├── futures.md           # USDⓈ-M + COIN-M futures market data (funding, open interest, ...)
        ├── websocket-streams.md # Real-time WebSocket market streams (key-free)
        └── bulk-data.md         # data.binance.vision ZIP/CSV archive for full-history backtesting

Installation

Claude Code (plugin marketplace — recommended)

This plugin is distributed through the NanookAI/skills marketplace. Inside Claude Code, run:

/plugin marketplace add NanookAI/skills
/plugin install binance-api@nanookai-skills

The skill is then available in every project, and /plugin marketplace update picks up new versions.

Claude Code (per-project)

Copy the skill folder into your project's .claude/skills/ directory:

cp -r skills/binance-api /path/to/your-project/.claude/skills/

Claude Code (personal, all projects)

cp -r skills/binance-api ~/.claude/skills/

Claude.ai / other agents

Package the skill folder (respecting .skillignore) into a .skill bundle, or upload the skills/binance-api/ folder contents wherever your agent platform accepts skills. The skill is self-contained — no scripts, no dependencies.

Try it

After installing, ask your agent things like:

  • "What's the current price of Bitcoin?"
  • "Get the daily candlesticks for ETHUSDT for the last 3 months"
  • "Show me the top of the order book for BNBUSDT"
  • "Which coin had the biggest 24h gain on Binance?"
  • "What's the current BTC perpetual funding rate and open interest?"
  • "Download 1-hour BTCUSDT klines for 2025 and compute the monthly returns"

About the API

  • Public market data base URL: https://data-api.binance.vision (mirror of https://api.binance.com for NONE-security endpoints)
  • Free, no API key — rate limited by request weight (6,000/min per IP)
  • Account and trading endpoints require API keys and are not covered here
  • Official docs: binance/binance-spot-api-docs

License

The skill documentation in this repository is provided as-is. Binance and the Binance API are products of Binance — see the official documentation and Binance's terms of use for the underlying service.

About

Skill that teaches AI agents to fetch crypto market data (prices, klines, order books, funding rates) with the free Binance public API — no API key required

Topics

Resources

License

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors