# Binance Web3 API > Complete documentation for Large Language Models --- ## Document: Overview URL: /en/dev-docs/introduction # Overview Binance Web3 API is a developer-oriented on-chain data and trading service platform, providing unified RESTful APIs covering market data, trading aggregation, on-chain transaction simulation and broadcasting. ## Architecture ``` Client │ ▼ Gateway ← Auth / Signature Verification / Rate Limiting │ ├──→ Market API Real-time prices, candlesticks, token analytics ├──→ Trading API Cross-DEX aggregated quotes and swaps ├──→ Transaction API On-chain transaction simulation and broadcasting └──→ Wallet API Wallet balance queries ``` ## API Modules | Module | Description | | --------------------------------------------------------- | ------------------------------------------------ | | [Market API](/products/market-api/introduction) | Real-time prices, candlesticks, token analytics | | [Trading API](/products/trading-api/introduction) | Cross-DEX aggregated quotes, swaps, approvals | | [Transaction API](/products/transaction-api/introduction) | On-chain transaction simulation and broadcasting | | [Wallet API](/products/wallet-api/introduction) | Wallet balance queries across multiple chains | ## Unified Response Format All endpoints return the `OCResult` format: ```json { "code": 0, "msg": "success", "data": {}, "timestamp": 1713500000000, "success": true } ``` - `code = 0` indicates success; non-zero values are error codes - `data` contains business data, typed per endpoint - `timestamp` is the server timestamp in milliseconds - `success` is a convenience flag derived from `code == 0` --- ## Document: Authentication URL: /en/dev-docs/authentication # Authentication import { Callout } from "zudoku/ui/Callout.js"; All Binance Web3 API endpoints are protected by **API Key authentication**. Each request must be signed using your Secret Key, ensuring that only authorized clients with valid credentials can access the platform. --- ## Step 1 — Obtain API Credentials Visit the [**Developer Portal**](https://web3.binance.com/en/dev-portal/project) to create a project and generate an **API Key** and **Secret Key**: | Credential | Description | | ------------ | ------------------------------------------------------------ | | `API Key` | Uniquely identifies your application (`X-OC-APIKEY` header) | | `Secret Key` | Used to sign requests (HMAC-SHA256 mode). Keep this private. | --- ## Step 2 — Understand Required Headers Every authenticated request must include the following three headers: | Header | Required | Description | | ------------------ | -------- | ------------------------------------------------------------------------------------------ | | `X-OC-APIKEY` | Yes | Your API Key string | | `X-OC-TIMESTAMP` | Yes | Current UTC time in **ISO 8601** format with milliseconds, e.g. `2026-05-11T10:08:57.715Z` | | `X-OC-SIGN` | Yes | Request signature (Base64-encoded), see [Step 3](#step-3--generate-the-signature) | | `X-OC-RECV-WINDOW` | No | Allowed time deviation in milliseconds (default: `5000`, max: `60000`) | | `X-OC-NONCE` | No | Unique request identifier for anti-replay; falls back to `X-OC-SIGN` if omitted | --- ## Step 3 — Generate the Signature ### 3.1 Build the Pre-Hash String Concatenate the following four components **without any separator**: ``` preHash = timestamp + method + requestPath + body ``` | Component | Rule | | ------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `timestamp` | Exact value of the `X-OC-TIMESTAMP` header (ISO 8601, e.g. `2026-05-11T10:08:57.715Z`) | | `method` | HTTP method in **UPPERCASE** (e.g. `GET`, `POST`) | | `requestPath` | Full HTTP path (including any base-path prefix) **plus** query string in **raw URL-encoded form**, e.g. `/build/api/v1/dex/market/price?chainId=1&symbol=ETH%20USDT` | | `body` | Raw request body string for `POST`/`PUT`/`DELETE`; **empty string `""`** for `GET`/`HEAD` | **Critical:** `requestPath` must use the exact raw-encoded form as sent on the HTTP wire — no percent-decoding, no query-parameter re-ordering, no parameter merging. #### Example (GET request) ``` timestamp = "2026-05-11T10:08:57.715Z" method = "GET" requestPath = "/build/api/v1/dex/market/price?chainId=1&symbol=ETH%20USDT" body = "" preHash = "2026-05-11T10:08:57.715ZGET/build/api/v1/dex/market/price?chainId=1&symbol=ETH%20USDT" ``` #### Example (POST request) ``` timestamp = "2026-05-11T10:08:57.715Z" method = "POST" requestPath = "/build/api/v1/dex/swap" body = '{"chainId":1,"fromToken":"0xEEEE...","toToken":"0xA0b8...","amount":"1000000000000000000"}' preHash = "2026-05-11T10:08:57.715ZPOST/build/api/v1/dex/swap{\"chainId\":1,...}" ``` --- ### 3.2 Sign with HMAC-SHA256 (Default) Compute **HMAC-SHA256** over `preHash` using your `Secret Key`, then **Base64-encode** the result: ``` signature = Base64( HMAC-SHA256(preHash, secretKey) ) ``` All strings are **UTF-8 encoded** before hashing. #### JavaScript / Node.js ```js javascript const crypto = require("crypto"); const timestamp = new Date().toISOString(); // e.g. "2026-05-11T10:08:57.715Z" const method = "GET"; const pathWithQuery = "/api/v1/dex/market/price?chainId=1&symbol=ETH%20USDT"; const body = ""; // empty for GET const preHash = timestamp + method + pathWithQuery + body; const signature = crypto .createHmac("sha256", secretKey) .update(preHash, "utf8") .digest("base64"); ``` #### Python ```python python import hmac, hashlib, base64 from datetime import datetime, timezone now = datetime.now(timezone.utc) timestamp = now.strftime("%Y-%m-%dT%H:%M:%S.") + f"{now.microsecond // 1000:03d}Z" method = "GET" path_query = "/api/v1/dex/market/price?chainId=1&symbol=ETH%20USDT" body = "" pre_hash = timestamp + method + path_query + body signature = base64.b64encode( hmac.new(secret_key.encode("utf-8"), pre_hash.encode("utf-8"), hashlib.sha256).digest() ).decode("utf-8") ``` #### Java ```java java import javax.crypto.Mac; import javax.crypto.spec.SecretKeySpec; import java.util.Base64; String preHash = timestamp + method + pathWithQuery + body; Mac mac = Mac.getInstance("HmacSHA256"); mac.init(new SecretKeySpec(secretKey.getBytes("UTF-8"), "HmacSHA256")); String signature = Base64.getEncoder().encodeToString( mac.doFinal(preHash.getBytes("UTF-8")) ); ``` --- ## Step 4 — Send the Request Attach the three required headers to every authenticated request: ```http GET /api/v1/dex/market/price?chainId=1&symbol=ETH%20USDT HTTP/1.1 Host: web3.binance.com/build X-OC-APIKEY: your-api-key-here X-OC-TIMESTAMP: 2026-05-11T10:08:57.715Z X-OC-SIGN: k3Y2mNpQr...base64sig...== ``` #### Complete JavaScript Example ```js javascript const crypto = require("crypto"); const axios = require("axios"); const API_KEY = process.env.OC_API_KEY; const SECRET_KEY = process.env.OC_SECRET_KEY; const BASE_URL = "https://web3.binance.com"; async function get(path, params = {}) { // Use encodeURIComponent so spaces become %20 (not +), matching the raw wire encoding const queryStr = Object.entries(params) .map(([k, v]) => `${encodeURIComponent(k)}=${encodeURIComponent(v)}`) .join("&"); const fullPath = queryStr ? `${path}?${queryStr}` : path; const timestamp = new Date().toISOString(); // requestPath is the full path as sent on the wire (already includes /build prefix) const requestPath = fullPath; const body = ""; // empty string for GET requests const preHash = timestamp + "GET" + requestPath + body; const signature = crypto .createHmac("sha256", SECRET_KEY) .update(preHash, "utf8") .digest("base64"); const resp = await axios.get(BASE_URL + fullPath, { headers: { "X-OC-APIKEY": API_KEY, "X-OC-TIMESTAMP": timestamp, "X-OC-SIGN": signature, }, }); return resp.data; } // Usage get("/build/api/v1/dex/aggregator/supported/chain", { binanceChainId: "56", }).then(console.log); ``` --- ## Timestamp & Anti-Replay The gateway validates `X-OC-TIMESTAMP` on every authenticated request: 1. **Format**: Must be a valid ISO 8601 string (e.g. `2026-05-11T10:08:57.715Z`). 2. **Time window**: The request timestamp must be within `recv_window` milliseconds of server time. Default is **5 000 ms (5 s)**, configurable via `X-OC-RECV-WINDOW` (max **60 000 ms / 60 s**). 3. **Anti-replay**: Each nonce (`X-OC-NONCE` or the signature itself) is valid only once within the `2 × recv_window` time window. Replayed requests are rejected with error `40103`. Keep your system clock synchronized with an NTP server to avoid timestamp drift errors. --- ## Rate Limits Authenticated requests are subject to four concurrent rate-limit dimensions: | Dimension | Default Limit | Window | Response Header | | ------------ | --------------- | ------ | -------------------------- | | Per IP | 1 200 requests | 60 s | `X-OC-RateLimit-Limit` | | Per API Key | 1 200 requests | 60 s | `X-OC-RateLimit-Remaining` | | Per User | 6 000 requests | 60 s | `X-OC-Used-Weight` | | Per Endpoint | 5 RPS (default) | 1 s | `X-OC-Used-Weight` | When a limit is exceeded the gateway returns **HTTP 429** with a `Retry-After` header (in seconds). --- ## Error Codes | HTTP Status | Error Code | Meaning | | ----------- | ---------- | ---------------------------------------- | | 400 | `40001` | Invalid request parameters | | 401 | `40101` | API Key is missing, invalid, or disabled | | 401 | `40102` | Signature mismatch or missing | | 401 | `40103` | Timestamp expired or request replayed | | 403 | `40104` | API Key lacks required permission | | 429 | `42900` | Rate limit exceeded | | 500 | `50000` | Internal server error | | 503 | `50001` | Service temporarily unavailable | All error responses follow the unified format: ```json { "code": 40102, "msg": "Invalid signature", "data": null, "timestamp": 1715420937000 } ``` --- ## Postman Quick Start Add the following **Pre-request Script** to your Postman collection to auto-sign every request: ```js javascript // Binance Web3 API Gateway — Auto Sign Script const apiKey = pm.variables.get("api_key"); const secretKey = pm.variables.get("secret_key"); if (!apiKey || !secretKey) { throw new Error("Set api_key and secret_key in Collection Variables first"); } const timestamp = new Date().toISOString(); const method = pm.request.method.toUpperCase(); const url = pm.request.url; const pathStr = "/" + (url.path || []).join("/"); const qParams = (url.query || []).filter((p) => !p.disabled && p.key); const queryStr = qParams .map( (p) => encodeURIComponent(p.key) + "=" + encodeURIComponent(p.value || ""), ) .join("&"); const pathWithQuery = queryStr ? pathStr + "?" + queryStr : pathStr; const body = method === "GET" || method === "HEAD" ? "" : pm.request.body ? pm.request.body.toString() : ""; const preHash = timestamp + method + pathWithQuery + body; const signature = CryptoJS.enc.Base64.stringify( CryptoJS.HmacSHA256(preHash, secretKey), ); pm.request.headers.upsert({ key: "X-OC-APIKEY", value: apiKey }); pm.request.headers.upsert({ key: "X-OC-TIMESTAMP", value: timestamp }); pm.request.headers.upsert({ key: "X-OC-SIGN", value: signature }); ``` Set `api_key` and `secret_key` under **Collection → Variables** and every request will be signed automatically. --- ## Document: Agent Native URL: /en/dev-docs/agent-native/overview # Agent Native import { Link } from "zudoku/components"; import { Card, CardHeader, CardTitle, CardDescription } from "zudoku/ui/Card"; import { Bot, FileText, Plug, ChevronRight, Terminal, Lightbulb, Users, } from "lucide-react"; export const IconTile = ({ children, label }) => ( {children} ); export const Badge = ({ children }) => ( {children} ); export const CardLink = ({ to, title, description, children, badge, cta = "Learn more", disabled = false, }) => (
{!disabled && ( )}
{children} {badge && {badge}}
{title} {description} {cta && ( {cta} {!disabled && } )}
); export const ScenarioCard = ({ icon: Icon, title, description }) => (

{title}

{description}

);

Agent Native

Two complementary interfaces for AI tools, coding assistants, and autonomous agents. Discover, read, and interact with Binance Web3 API documentation programmatically.

## Core Components
Choose the integration method that fits your use case. Each component serves a different purpose — use them individually or together.
--- ## Quick Start ### Fetch documentation with llms.txt ```bash # Summary — document titles, descriptions, and links curl -s https://web3.binance.com/en/dev-docs/llms.txt # Full content — complete documentation in a single file curl -s https://web3.binance.com/en/dev-docs/llms-full.txt ``` The MCP Server quick start will be published once the interface is available. --- ## Who Is This For?
Whether you're building with AI IDEs or integrating documentation into agent pipelines, there's a tool for your workflow.
--- ## How They Work Together
AI Tool / Agent
llms.txt → Quick discovery: "What docs exist?"
MCP Server → Native integration: "Search docs, generate code, test API"
--- ## Document: MCP Server URL: /en/dev-docs/agent-native/mcp-server # MCP Server import { Link } from "zudoku/components"; import { Plug, Hourglass, Terminal } from "lucide-react";

Coming soon

MCP Server

Native integration for AI IDEs via the Model Context Protocol. Search Binance Web3 API docs, generate code, and test API calls directly from your editor — without leaving the conversation.

## What to expect

Editor-native tools

Drop the server URL into Claude Code, Cursor, or Windsurf and call docs / codegen tools as MCP actions.

SSE transport

Server-Sent Events transport with low latency, designed to plug into the same agent tools as llms.txt.

## In the meantime While the MCP Server is being finalized, the static **llms.txt** files cover the discovery and full-content use cases for any LLM-powered workflow. --- ## Document: /agent-native/llms-txt URL: /en/dev-docs/agent-native/llms-txt # llms.txt [llms.txt](https://llmstxt.org/) is a proposed standard for making website content accessible to large language models. Similar to `robots.txt` for web crawlers, `llms.txt` tells AI tools what documentation is available and how to access it. ## Files Binance Web3 API provides two llms.txt files: | File | URL | Description | | --------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------ | | `llms.txt` | /en/dev-docs/llms.txt | Summary — document titles, descriptions, and links | | `llms-full.txt` | /en/dev-docs/llms-full.txt | Full content — complete documentation in a single file | ## Format ### llms.txt (Summary) The summary file contains a structured list of all documentation pages with titles, descriptions, and URLs: ``` # Binance Web3 API > On-chain data & trading services for developers. ## Market API - [Introduction](/market-api/introduction): Market API overview - [Get Price](/market-api/api-reference/get-price): Real-time token price ## Trading API - [Introduction](/trading-api/introduction): DEX aggregator overview - [Swap](/trading-api/api-reference/swap): Execute token swap - [Quote](/trading-api/api-reference/quote): Get swap quote - [Approve Transaction](/trading-api/api-reference/approve-transaction): Token approval ## Transaction API - [Introduction](/transaction-api/introduction): Transaction broadcasting - [Broadcast](/transaction-api/api-reference/broadcast-transactions): Submit signed tx ``` ### llms-full.txt (Full Content) The full file includes the complete markdown content of every documentation page, separated by headers. This is useful for loading the entire documentation into an LLM's context window. ## Usage Examples ### Feed into any LLM ```bash # Download and use as context curl -s https://web3.binance.com/en/dev-docs/llms.txt # Full documentation for comprehensive context curl -s https://web3.binance.com/en/dev-docs/llms-full.txt ``` ### Use with Claude ``` Please read https://web3.binance.com/en/dev-docs/llms.txt and help me understand how to execute a token swap using the Binance Web3 Trading API. ``` ### Use in a Python script ```python import requests # Fetch the documentation index response = requests.get("https://web3.binance.com/en/dev-docs/llms.txt") docs_index = response.text # Feed into your LLM as context messages = [ {"role": "system", "content": f"Binance Web3 API docs:\n{docs_index}"}, {"role": "user", "content": "How do I get a swap quote?"} ] ``` ### Use with LangChain ```python from langchain_community.document_loaders import WebBaseLoader loader = WebBaseLoader("https://web3.binance.com/en/dev-docs/llms-full.txt") docs = loader.load() ``` ## When to Use llms.txt - **llms.txt** — You want to quickly give an LLM awareness of all available documentation - **llms-full.txt** — You want to load the entire documentation set into an LLM's context window --- ## Document: SDKs & Tools URL: /en/dev-docs/sdks-tools/overview # SDKs & Tools Build faster with official SDKs maintained by Binance. import { Link, Typography, LanguageIcon } from "zudoku/components"; import { Card, CardHeader, CardTitle, CardDescription, CardFooter, } from "zudoku/ui/Card"; import { ChevronRight, Github } from "lucide-react"; export const IconTile = ({ children, label }) => ( {children} ); export const REGISTRY_ICONS = { npm: "https://cdn.simpleicons.org/npm", PyPI: "https://cdn.simpleicons.org/pypi", Maven: "https://cdn.simpleicons.org/apachemaven", }; export const CardLink = ({ to, title, description, children, github, registry, }) => (
{children}
{title} {description ? ( {description} ) : null}
{(github || registry) && ( {github && ( Git )} {registry && ( {registry.label} )} )}
); --- ## Official API Connectors
Production-ready client libraries maintained by Binance for popular languages. Each connector includes request signing helpers, typed models, and runnable examples.
--- ## Document: Supported Skills URL: /en/dev-docs/products/wallet-skills/supported-skills # Supported Skills Binance Wallet Skills are published on [binance-skills-hub](https://github.com/binance/binance-skills-hub/tree/main/skills/binance-web3), including 7 read-only **Wallet Skills** and the **Agentic Wallet Skill** for on-chain trading. ## Overview ### Published Wallet Skills | Skill | Type | Status | Wallet Required | | ------------------------------------- | ---- | ------- | --------------- | | **query-token-info** | Read | ✅ Live | No | | **query-token-audit** | Read | ✅ Live | No | | **query-address-info** | Read | ✅ Live | No | | **crypto-market-rank** | Read | ✅ Live | No | | **meme-rush** | Read | ✅ Live | No | | **trading-signal** | Read | ✅ Live | No | | **binance-tokenized-securities-info** | Read | ✅ Live | No | ### Agentic Wallet Skills | Skill | Type | Status | Wallet Required | | -------------------------- | ------------ | ------- | --------------- | | **binance-agentic-wallet** | Read + Write | ✅ Live | Yes (write ops) | --- ## Published Wallet Skills ### query-token-info Comprehensive token research — from discovery to deep analysis in one place. **Supported operations** | Operation | Description | | ------------------ | ---------------------------------------------------------------------------------- | | Token search | Search by name, symbol, or contract address — returns price, market cap, liquidity | | Metadata | Description, creator, audit status, social links | | Live market data | Price changes across timeframes (5m/1h/4h/24h), buy/sell volume, holder analytics | | Candlestick charts | OHLCV data from 1s to 1-month intervals | **Supported chains:** BSC, Base, Solana ``` What's the price of BNB? Show me the holder distribution for this token Give me SOL's 4-hour candlestick data ``` --- ### query-token-audit Pre-trade security audit to identify risky contracts and malicious tokens. **Supported operations** | Operation | Description | | --------------------- | ----------------------------------------------------------------- | | Risk scoring | Returns LOW / MEDIUM / HIGH risk level (scale 1–5) | | Honeypot detection | Identifies contracts that can be bought but not sold | | Tax analysis | Returns buy/sell tax rates — flags anything above 10% as critical | | Contract verification | Checks whether source code is publicly verified | **Supported chains:** Ethereum, BSC, Base, Solana > ⚠️ Audit results are for reference only. LOW risk is not a safety guarantee. Always do your own > research. ``` Is this contract address safe? Does this token have honeypot risk? ``` --- ### query-address-info Query all tokens held by a wallet address, with balances and valuations. **Supported operations** | Operation | Description | | -------------- | -------------------------------------------------------------- | | Holdings query | Returns all token balances, quantities, and contract addresses | | Price data | Current USD price and 24h change for each token | | Pagination | Use offset parameter to page through large portfolios | **Supported chains:** BSC, Base, Solana ``` What tokens does this address hold? What positions does 0xABC... have on BSC? ``` --- ### crypto-market-rank Multi-dimensional crypto market rankings covering social buzz, fund flows, Meme coins, and trader performance. **Supported operations** | Operation | Description | | ------------------- | ------------------------------------------------------------------------------------------ | | Social buzz ranking | Ranked by community discussion volume, with sentiment analysis (positive/negative/neutral) | | Unified rankings | Trending tokens, top searched, Binance Alpha picks, tokenized stocks | | Smart money inflow | Top tokens by net buying from tracked smart wallets | | Meme token rank | Top 100 Meme tokens from Pulse launchpad, scored by breakout potential | | Trader PnL ranking | Address-level realized P&L over 7d/30d/90d | **Supported chains:** BSC, Base, Solana ``` Which tokens have the highest social buzz right now? What are smart money wallets buying lately? Show me the Binance Alpha picks ranking ``` --- ### meme-rush Real-time Meme token tracking + AI hot topic discovery, built for fast-paced Meme trading. Includes two core features: **Meme Rush — Launchpad token lifecycle tracking** | Operation | Description | | --------------- | ---------------------------------------------------------------------------- | | New tokens | Tracks newly launched tokens on the bonding curve | | Migrating soon | Monitors tokens near the end of the bonding curve, about to migrate to DEX | | Migrated tokens | Tokens that just completed migration — capture early liquidity opportunities | **Topic Rush — AI hot topic discovery** | Operation | Description | | ------------- | -------------------------------------------------------- | | Latest topics | Discover newest market hot topics with associated tokens | | Rising topics | Topics gaining momentum (all-time high inflow $1k–$20k) | Each topic returns: topic name, AI summary, net inflow (total/1h), associated token list (with market cap, liquidity, net inflow, holder count, etc.). **Supported chains:** Solana (Pump.fun, Raydium, etc.), BSC (Four.meme, Flap, etc.) ``` What new Meme tokens launched on Solana recently? Which Meme tokens are about to migrate to DEX? What topics are trending right now? What are the rising hot topics? ``` --- ### trading-signal Monitors on-chain smart money trading activity and outputs structured buy/sell signals for reference. **Supported operations** | Operation | Description | | ---------------- | ---------------------------------------------------------------------------------------------------------- | | Signal feed | Buy/sell signals from smart money wallets on Solana and BSC | | Price comparison | Signal trigger price vs current price — gauge whether entry is still relevant | | Signal quality | Returns peak gain (maxGain) and smart money exit rate (exitRate) | | Token tags | Labels tokens with Social Events, Launch Platform (e.g., Pumpfun), Sensitive Events (e.g., whale buy/sell) | | Signal status | Classifies signals as `active` / `timeout` / `completed` | **Supported chains:** Solana, BSC ``` What are the latest smart money buy signals? Are there any new on-chain signals on BNB Chain? What was the peak gain after this signal triggered? ``` --- ### binance-tokenized-securities-info Query real-time on-chain data and status for Ondo Finance tokenized US stocks. **Supported operations** | Operation | Description | | ------------------ | ------------------------------------------------------------------------------------------------- | | Asset list | All supported tokenized stocks with contract addresses | | Company info | CEO, industry, concept tags, attestation report links | | Market status | Whether the Ondo market is open/paused, and next open/close times | | Corporate actions | Per-token halt status (splits, dividends, mergers, etc.) | | Live on-chain data | Token price, 24h change, holder count, supply, market cap, and fundamentals (P/E, dividend yield) | | Candlestick data | OHLC data from 1-minute to 1-day intervals | **Supported chains:** Ethereum, BSC > Note: Each token represents `multiplier` shares, not 1 share. To compare with the reference price: > `referencePrice = tokenPrice ÷ sharesMultiplier`. ``` Is the Ondo market open right now? What's the current price of the AAPL tokenized stock? Which tokenized stocks are halted due to corporate actions? ``` --- ## Agentic Wallet Skill `binance-agentic-wallet` provides wallet management, token transfers, market swaps, and limit orders. → See [Agentic Wallet Documentation](../agentic-wallet/introduction) for details. --- ## Related - [Binance Wallet Skills Overview](./introduction) --- ## Document: Binance Wallet Skills URL: /en/dev-docs/products/wallet-skills/introduction # Binance Wallet Skills Binance Wallet Skills are composable AI modules for developers. They expose Binance Web3's on-chain capabilities in a form that any LLM Agent or application can call directly. ## What Are Skills Traditional APIs require developers to manually parse intent, call endpoints, and handle errors. Skills wrap all of that into modules an AI can understand and invoke directly: - Triggered by **natural language intent** — no API calls to write - Each Skill is a standalone module — integrate individually or combine - Compatible with Claude, ChatGPT, Copilot, and major AI Agent environments ## Published Wallet Skills (binance-web3) 8 Skills are currently published on [binance-skills-hub](https://github.com/binance/binance-skills-hub/tree/main/skills/binance-web3): | Skill | Type | Core Capability | | ------------------------------------- | ------------ | ------------------------------------------------------------------------------------ | | **binance-agentic-wallet** | Read + Write | Wallet management, token transfers, market swaps, limit orders (BSC/ETH/Base/Solana) | | **query-token-info** | Read | Token search, metadata, live market data, candlestick charts | | **query-token-audit** | Read | Token security audit: risk scoring, honeypot detection, contract verification | | **query-address-info** | Read | Wallet address token holdings with prices and balances | | **crypto-market-rank** | Read | Market rankings: social buzz, smart money inflow, Meme coins, trader PnL | | **meme-rush** | Read | Meme token tracking (new/migrating/migrated) + AI narrative discovery | | **trading-signal** | Read | On-chain smart money signals with signal status and peak gain data | | **binance-tokenized-securities-info** | Read | Tokenized securities (Ondo Finance) — live prices, market status, on-chain data | → [View full Skills list](./supported-skills) --- ## Document: Introduction On-chain wallet balance and transaction queries across multiple chains and tokens URL: /en/dev-docs/products/wallet-api/introduction # Introduction The Wallet API provides on-chain wallet data services, including supported chain queries, token balance lookups across multiple chains, and on-chain transaction history. ## Feature Overview | Feature | Endpoint | Method | Description | | ------------------------- | ----------------------------------------------------------- | ------ | --------------------------------------------- | | Supported Chains | `/api/v1/dex/balance/supported/chain` | GET | Query supported blockchain networks | | All Token Balances | `/api/v1/dex/balance/all-token-balances-by-address` | GET | Get all token balances for a wallet | | Token Balances by Address | `/api/v1/dex/balance/token-balances-by-address` | POST | Get balances for specific tokens | | Transaction History | `/api/v1/dex/post-transaction/transactions-by-address` | GET | Get on-chain transaction history for a wallet | | Transaction Detail | `/api/v1/dex/post-transaction/transaction-detail-by-txhash` | GET | Get full transaction detail by hash | --- ## Document: Error Codes Wallet API error code reference — complete list of business error codes, causes, and troubleshooting guidance. URL: /en/dev-docs/products/wallet-api/error-codes # Error Codes ## Response Format All Wallet API responses — including errors — return **HTTP 200**. The business result is indicated by the `code` field in the response body. ```json { "code": 0, "msg": "success", "data": { ... }, "timestamp": 1718000000000 } ``` A non-zero `code` always indicates an error. Check the `msg` field for a human-readable description. --- ## Success | Code | Description | | ---- | ----------------- | | `0` | Request succeeded | --- ## Parameter Errors | Code | Message | Cause | Affected Endpoints | | ------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | | `40001` | `Parameter [field] error: ` | Request parameter failed validation — field format invalid, value out of range, required parameter missing, or unsupported enum value. The `msg` field includes the specific field name and reason. | All endpoints | **Common `40001` triggers:** - `address` is blank or missing - `pageSize` is out of range (must be `1 ≤ pageSize ≤ 100`) - `tokenContractAddresses` list in `POST /token-balances-by-address` contains invalid entries (blank `binanceChainId` or `tokenContractAddress`) - Required `@RequestParam` or `@RequestBody` field is absent --- ## Authentication & Authorization Errors These codes are enforced by the API Gateway before the request reaches the Wallet API service. | Code | Message | Cause | | ------- | ------------------- | ----------------------------------------------------------------------------------------------------- | | `40101` | `Invalid API Key` | The `X-OC-APIKEY` header is missing, malformed, or the key has been deleted / disabled | | `40102` | `Signature error` | The `X-OC-SIGN` value does not match the expected HMAC-SHA256 or Ed25519 signature | | `40103` | `Timestamp expired` | The `X-OC-TIMESTAMP` is outside the allowed `recv_window` relative to server time (default ±5 000 ms) | | `40104` | `Permission denied` | The API Key does not have the required permission for this endpoint | --- ## Rate Limit Errors | Code | Message | Cause | | ------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | `42900` | `Request rate limit exceeded. Please refer to the API docs and reduce request frequency` | Per-IP, per-API-Key, per-user, or per-endpoint rate limit has been reached. Retry after the duration indicated in the `Retry-After` response header | --- ## Compliance Errors ### IP Compliance | Code | Message | Cause | | ------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- | | `40301` | `Service not available in your region` | The client IP originates from a sanctioned jurisdiction (e.g. North Korea, Iran, Cuba, Syria, or OFAC-listed territory) | | `40302` | `Proxy or VPN detected. Please use direct connection` | A high-risk VPN or proxy was detected on the client connection | | `40303` | `Unusual IP activity detected. Please contact support` | Anomalous IP activity such as frequent location switching or concurrent multi-region access | --- ## Server Errors | Code | Message | Cause | | ------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | `50000` | `Internal server error, please retry later` | An unexpected server-side error occurred (e.g. null pointer, serialization error). If the problem persists, contact support with the request timestamp | | `50001` | `Service temporarily unavailable, please retry later` | An upstream balance data provider is unreachable or returned an error. Retry after a short delay | --- ## Error Code Reference by Endpoint | Endpoint | Possible Error Codes | | --------------------------------------------------------------- | ------------------------- | | `GET /api/v1/dex/balance/supported/chain` | `40001`, `50000` | | `GET /api/v1/dex/balance/all-token-balances-by-address` | `40001`, `50000`, `50001` | | `POST /api/v1/dex/balance/token-balances-by-address` | `40001`, `50000`, `50001` | | `GET /api/v1/dex/post-transaction/transactions-by-address` | `40001`, `50000`, `50001` | | `GET /api/v1/dex/post-transaction/transaction-detail-by-txhash` | `40001`, `50000`, `50001` | --- ## Troubleshooting Guide | Symptom | Likely Code | Action | | -------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------- | | Signature mismatch | `40102` | Verify pre-hash string: `timestamp + METHOD + requestPath + body`. Ensure `requestPath` includes the raw query string exactly as sent | | Timestamp drift | `40103` | Sync your system clock with an NTP server. Use `X-OC-RECV-WINDOW` to extend tolerance (max 60 000 ms) | | pageSize out of range | `40001` | Keep `pageSize` within `[1, 100]` | | All retries return `50001` | `50001` | The upstream balance service is degraded. Check the [status page](https://developers.binance.com) or contact support | --- ## Document: Introduction On-chain transaction simulation and broadcasting URL: /en/dev-docs/products/transaction-api/introduction # Introduction The Transaction API provides gas estimation, off-chain simulation, and signed transaction broadcasting. ## Feature Overview | Feature | Endpoint | Method | Description | | --------------------- | --------------------------------------------------- | ------ | --------------------------------------- | | Supported Chains | `/api/v1/dex/pre-transaction/supported/chain` | GET | Query supported blockchain networks | | Get Gas Price | `/api/v1/dex/pre-transaction/gas-price` | GET | Get current gas price for a chain | | Get Gas Limit | `/api/v1/dex/pre-transaction/gas-limit` | POST | Estimate gas limit for a transaction | | Simulate Transaction | `/api/v1/dex/pre-transaction/simulate` | POST | Simulate transaction execution | | Broadcast Transaction | `/api/v1/dex/pre-transaction/broadcast-transaction` | POST | Broadcast a signed transaction on-chain | | Get Broadcast Orders | `/api/v1/dex/post-transaction/orders` | GET | Query broadcast order status | --- ## Document: Error Codes Transaction API error code reference — complete list of business error codes, causes, and troubleshooting guidance. URL: /en/dev-docs/products/transaction-api/error-codes # Error Codes ## Response Format All Transaction API responses — including errors — return **HTTP 200**. The business result is indicated by the `code` field in the response body. ```json { "code": 0, "msg": "success", "data": { ... }, "timestamp": 1718000000000 } ``` A non-zero `code` always indicates an error. Check the `msg` field for a human-readable description. --- ## Success | Code | Description | | ---- | ----------------- | | `0` | Request succeeded | --- ## Parameter Errors | Code | Message | Cause | Affected Endpoints | | ------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | | `40001` | `Parameter [field] error: ` | Request parameter failed validation — field format invalid, value out of range, required parameter missing, or unsupported enum value. The `msg` field includes the specific field name and reason. | All endpoints | **Common `40001` triggers:** - `binanceChainId` is blank or not on the supported-chain list - `address` is blank or malformed - Broadcast request is missing both `evmTx` and `solTx` (one is required) - `evmTx.gasLimit` or `evmTx.gasPrice` is not a valid numeric string - `limit` is outside the range `[1, 100]` - Required `@RequestParam` or `@RequestBody` field is absent --- ## Authentication & Authorization Errors These codes are enforced by the API Gateway before the request reaches the Transaction API service. | Code | Message | Cause | | ------- | ------------------- | ----------------------------------------------------------------------------------------------------- | | `40101` | `Invalid API Key` | The `X-OC-APIKEY` header is missing, malformed, or the key has been deleted / disabled | | `40102` | `Signature error` | The `X-OC-SIGN` value does not match the expected HMAC-SHA256 or Ed25519 signature | | `40103` | `Timestamp expired` | The `X-OC-TIMESTAMP` is outside the allowed `recv_window` relative to server time (default ±5 000 ms) | | `40104` | `Permission denied` | The API Key does not have the required permission for this endpoint | --- ## Rate Limit Errors | Code | Message | Cause | | ------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | `42900` | `Request rate limit exceeded. Please refer to the API docs and reduce request frequency` | Per-IP, per-API-Key, per-user, or per-endpoint rate limit has been reached. Retry after the duration indicated in the `Retry-After` response header | --- ## Compliance Errors ### IP Compliance | Code | Message | Cause | | ------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- | | `40301` | `Service not available in your region` | The client IP originates from a sanctioned jurisdiction (e.g. North Korea, Iran, Cuba, Syria, or OFAC-listed territory) | | `40302` | `Proxy or VPN detected. Please use direct connection` | A high-risk VPN or proxy was detected on the client connection | | `40303` | `Unusual IP activity detected. Please contact support` | Anomalous IP activity such as frequent location switching or concurrent multi-region access | ### KYT (Know Your Transaction) KYT compliance checks are performed before broadcasting a transaction. All four codes may be returned by `POST /broadcast-transaction`. | Code | Message | Cause | | ------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | | `40311` | `Transaction rejected due to high-risk address` | The counterparty address has a risk score ≥ 70; transaction is blocked outright | | `40312` | `Address is on sanctions list` | The address matches an OFAC or UN sanctions list entry | | `40313` | `Transaction rejected due to risky fund origin` | Upstream fund tracing (3–5 hops) links the transaction to a sanctioned address, gambling site, or dark-web entity | | `40314` | `Medium-risk address detected. Please confirm to proceed` | Risk score is 40–69; the client must display a confirmation prompt and resubmit with the user's explicit acknowledgement | | `40434` | `KYT verification failed. Transaction involves high-risk address` | Final KYT check failed immediately before broadcast; the transaction is blocked | --- ## Transaction API Business Errors ### Chain Support | Code | Message | Cause | Affected Endpoints | | ------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------- | | `40411` | `This chain is not supported` | The supplied `binanceChainId` is not in the supported-chain whitelist, or the chain has been temporarily disabled via configuration | `/gas-price`, `/gas-limit`, `/simulate`, `/broadcast-transaction` | ### Broadcast | Code | Message | Cause | Affected Endpoints | | ------- | ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------ | | `40431` | `Transaction broadcast failed, please check gas settings and retry` | The `wallet-direct` RPC service rejected the transaction or returned no result. Common sub-causes: gas too low, nonce conflict, RPC node error, or malformed raw transaction bytes | `/broadcast-transaction` | --- ## Server Errors | Code | Message | Cause | | ------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `50000` | `Internal server error, please retry later` | An unexpected server-side error occurred (e.g. null pointer, serialization error, downstream service failure). If the problem persists, contact support with the request timestamp | | `50001` | `Service temporarily unavailable, please retry later` | An upstream dependency (e.g. transaction history service, order service) is unreachable or returned an error. Retry after a short delay | --- ## Error Code Reference by Endpoint | Endpoint | Possible Error Codes | | -------------------------------------------------------- | ------------------------------------------------------------------------------- | | `GET /api/v1/dex/pre-transaction/supported/chain` | `40001`, `50000` | | `GET /api/v1/dex/pre-transaction/gas-price` | `40001`, `40411`, `50000` | | `POST /api/v1/dex/pre-transaction/gas-limit` | `40001`, `40411`, `50000` | | `POST /api/v1/dex/pre-transaction/simulate` | `40001`, `40411`, `50000` | | `POST /api/v1/dex/pre-transaction/broadcast-transaction` | `40001`, `40311`, `40312`, `40313`, `40314`, `40411`, `40431`, `40434`, `50000` | | `GET /api/v1/dex/post-transaction/orders` | `40001`, `50000`, `50001` | --- ## Troubleshooting Guide | Symptom | Likely Code | Action | | -------------------------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------- | | Signature mismatch | `40102` | Verify pre-hash string: `timestamp + METHOD + requestPath + body`. Ensure `requestPath` includes the raw query string exactly as sent | | Timestamp drift | `40103` | Sync your system clock with an NTP server. Use `X-OC-RECV-WINDOW` to extend tolerance (max 60 000 ms) | | Broadcast rejected | `40431` | Verify `gasLimit` and `gasPrice` are sufficient. Pre-call `/gas-price` and `/gas-limit` to get current estimates before broadcasting | | KYT high-risk block | `40311`/`40312`/`40313` | The destination address is flagged. Review the address risk profile; transactions cannot proceed for sanctioned addresses | | KYT medium-risk prompt | `40314` | Display a risk warning to the end user and resubmit with the user's explicit confirmation flag | | Chain not supported | `40411` | Call `GET /api/v1/dex/pre-transaction/supported/chain` to retrieve the current chain whitelist | | All retries return `50001` | `50001` | The history or order service is degraded. Check the [status page](https://developers.binance.com) or contact support | --- ## Document: Introduction Cross-DEX aggregated quotes and swaps URL: /en/dev-docs/products/trading-api/introduction # Introduction The Trading API provides cross-DEX token quotes, swaps, and approval services, automatically selecting the optimal route for token exchanges. ## Feature Overview | Feature | Endpoint | Method | Description | | ---------------------- | -------------------------------------------- | ------ | ------------------------------------------- | | Supported Chains | `/api/v1/dex/aggregator/supported/chain` | GET | Query supported blockchain networks | | Get Quote | `/api/v1/dex/aggregator/quote` | GET | Get a token swap quote | | Execute Swap | `/api/v1/dex/aggregator/swap` | GET | Generate swap transaction data | | Approve Transaction | `/api/v1/dex/aggregator/approve-transaction` | GET | Generate token approval transaction data | | Get Transaction Status | `/api/v1/dex/aggregator/history` | GET | Query DEX swap transaction status by txHash | --- ## Document: Error Codes Trading API error code reference — complete list of business error codes, causes, and troubleshooting guidance. URL: /en/dev-docs/products/trading-api/error-codes # Error Codes ## Response Format All Trading API responses — including errors — return **HTTP 200**. The business result is indicated by the `code` field in the response body. ```json { "code": 0, "msg": "success", "data": { ... }, "timestamp": 1718000000000 } ``` A non-zero `code` always indicates an error. Check the `msg` field for a human-readable description. --- ## Success | Code | Description | | ---- | ----------------- | | `0` | Request succeeded | --- ## Parameter Errors | Code | Message | Cause | Affected Endpoints | | ------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | | `40001` | `Parameter [field] error: ` | Request parameter failed validation — field format invalid, value out of range, required parameter missing, or unsupported enum value. The `msg` field includes the specific field name and reason. | All endpoints | **Common `40001` triggers:** - `chainId` is not a positive integer or not on the supported-chain list - `fromTokenAddress` / `toTokenAddress` is not a valid EVM address or Solana pubkey - `amount` is not a positive numeric string - `slippagePercent` is not a valid decimal string - `gasLevel` is not one of the allowed enum values - Required `@RequestParam` is absent from the request --- ## Authentication & Authorization Errors These codes are enforced by the API Gateway before the request reaches the Trading API service. | Code | Message | Cause | | ------- | ------------------- | ----------------------------------------------------------------------------------------------------- | | `40101` | `Invalid API Key` | The `X-OC-APIKEY` header is missing, malformed, or the key has been deleted / disabled | | `40102` | `Signature error` | The `X-OC-SIGN` value does not match the expected HMAC-SHA256 or Ed25519 signature | | `40103` | `Timestamp expired` | The `X-OC-TIMESTAMP` is outside the allowed `recv_window` relative to server time (default ±5 000 ms) | | `40104` | `Permission denied` | The API Key does not have the required permission for this endpoint | --- ## Rate Limit Errors | Code | Message | Cause | | ------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | `42900` | `Request rate limit exceeded. Please refer to the API docs and reduce request frequency` | Per-IP, per-API-Key, per-user, or per-endpoint rate limit has been reached. Retry after the duration indicated in the `Retry-After` response header | --- ## Compliance Errors ### IP Compliance | Code | Message | Cause | | ------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- | | `40301` | `Service not available in your region` | The client IP originates from a sanctioned jurisdiction (e.g. North Korea, Iran, Cuba, Syria, or OFAC-listed territory) | | `40302` | `Proxy or VPN detected. Please use direct connection` | A high-risk VPN or proxy was detected on the client connection | | `40303` | `Unusual IP activity detected. Please contact support` | Anomalous IP activity such as frequent location switching or concurrent multi-region access | ### KYT (Know Your Transaction) | Code | Message | Cause | | ------- | --------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ | | `40311` | `Transaction rejected due to high-risk address` | The counterparty address has a risk score ≥ 70; transaction is blocked outright | | `40312` | `Address is on sanctions list` | The address matches an OFAC or UN sanctions list entry | | `40313` | `Transaction rejected due to risky fund origin` | Upstream fund tracing (3–5 hops) links the transaction to a sanctioned address, gambling site, or dark-web entity | | `40314` | `Medium-risk address detected. Please confirm to proceed` | Risk score is 40–69; the client must display a confirmation prompt and resubmit with the user's explicit acknowledgement | --- ## Trading API Business Errors ### Chain Support | Code | Message | Cause | Affected Endpoints | | ------- | -------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | | `40411` | `This chain is not supported` | The supplied `chainId` is not in the supported-chain whitelist, or the chain has been temporarily disabled via configuration | `/approve-transaction`, `/quote`, `/swap`, `/history` | | `40412` | `DEX contract not configured for this chain, please contact administrator` | The on-chain approve contract address has not been configured for this chain in the backend. This is an operational configuration issue — contact support | `/approve-transaction` | ### Quote | Code | Message | Cause | Affected Endpoints | | ------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | | `40401` | `Quote expired. Please request a new quote` | The `quoteId` was not found in cache — either the 30-second TTL has elapsed since the `/quote` call or the ID is invalid | `/swap` | | `40421` | `Insufficient liquidity for this trading pair` | No active liquidity provider (vendor) is available for the requested chain or token pair at this time | `/quote` | | `40441` | `No valid quote result from any vendor, please retry later` | All vendors were contacted but none returned a valid quote (all responses were empty, contained errors, or returned a zero output amount) | `/quote` | | `40442` | `fromTokenAddress and toTokenAddress must be different` | `fromTokenAddress` and `toTokenAddress` are identical | `/quote` | ### Swap | Code | Message | Cause | Affected Endpoints | | ------- | -------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | | `40461` | `No valid swap route found, please try other token pair` | The route cached for the given `quoteId` references an unknown or missing vendor — request a fresh quote and retry | `/swap` | | `40462` | `quoteId does not match request parameters` | The `quoteId` exists in cache but one or more parameters differ from those used in the original quote request (`chainId`, `fromTokenAddress`, `toTokenAddress`, or `amount`) | `/swap` | | `40463` | `Price impact exceeds protection threshold` | The vendor-reported price impact exceeds the protection threshold (default 90%). Pass `priceImpactProtectionPercent=100` to disable this check | `/swap` | | `40464` | `slippagePercent out of allowed range` | `slippagePercent` is not a valid number, or is outside the allowed range: `[0, 100]` for EVM chains, `[0, 99.9]` for Solana | `/swap` | | `40465` | `Vendor swap call failed, please retry later` | The vendor failed to build the swap transaction. Common sub-causes: vendor timeout, null response, Gas estimation failure, Solana ALT account resolution error, EVM proxy address not configured, or missing API Key context. Retry after a short delay | `/swap` | ### Gas | Code | Message | Cause | Affected Endpoints | | ------- | -------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | ---------------------- | | `40432` | `Failed to estimate gas price, please retry later` | The gas price service (`wallet-direct`) returned no data. This is usually a transient issue — retry after a few seconds | `/approve-transaction` | --- ## Server Errors | Code | Message | Cause | | ------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | `50000` | `Internal server error, please retry later` | An unexpected server-side error occurred (e.g. null pointer, database failure, serialization error). If the problem persists, contact support with the request timestamp | | `50001` | `Service temporarily unavailable, please retry later` | An upstream dependency (e.g. transaction history service) is unreachable or returned an error. Retry after a short delay | --- ## Error Code Reference by Endpoint | Endpoint | Possible Error Codes | | -------------------------- | ------------------------------------------------------------------------------- | | `GET /supported/chain` | `40001`, `50000` | | `GET /approve-transaction` | `40001`, `40411`, `40412`, `40432`, `50000` | | `GET /quote` | `40001`, `40411`, `40421`, `40441`, `40442`, `50000` | | `GET /swap` | `40001`, `40401`, `40411`, `40461`, `40462`, `40463`, `40464`, `40465`, `50000` | | `GET /history` | `40001`, `40411`, `50001`, `50000` | --- ## Troubleshooting Guide | Symptom | Likely Code | Action | | --------------------------- | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | Signature mismatch | `40102` | Verify pre-hash string construction: `timestamp + METHOD + requestPath + body`. Ensure `requestPath` includes the raw query string exactly as sent | | Timestamp drift | `40103` | Sync your system clock with an NTP server. Use `X-OC-RECV-WINDOW` to extend tolerance (max 60 000 ms) | | Quote works but swap fails | `40401` | Re-call `/quote` immediately before `/swap`. The quote TTL is 30 seconds | | Swap returns param mismatch | `40462` | Ensure `chainId`, `fromTokenAddress`, `toTokenAddress`, and `amount` passed to `/swap` exactly match those used in the `/quote` call | | High price impact warning | `40463` | Reduce trade size, or pass `priceImpactProtectionPercent=100` to bypass the check (not recommended for large orders) | | Chain not supported | `40411` | Call `GET /supported/chain` to retrieve the current whitelist before building your request | | All retries return `50001` | `50001` | The history service is degraded. Check the [status page](https://developers.binance.com) or contact support | --- ## Document: Support Contact info and support channels for Binance Web3 API URL: /en/dev-docs/products/others/support # Support import { Callout } from "zudoku/ui/Callout.js"; ## Contact Us If you encounter any issues while using the Binance Web3 API, please reach out through the channels below. ### Technical Support For API integration, request errors, signature verification, and other technical questions. | Language | Telegram Group | | -------- | ------------------------------------------------------------ | | English | [t.me/binance_api_english](https://t.me/binance_api_english) | | Chinese | [t.me/Binance_api_Chinese](https://t.me/Binance_api_Chinese) | ### Business Support For partnership inquiries, quota requests, and other commercial topics. - Submit a request: [forms.gle/3zjCNC1J5dBRUAsr7](https://forms.gle/3zjCNC1J5dBRUAsr7) --- ## Before You Reach Out To help us diagnose the issue faster, please have the following information ready: - **Request timestamp** (value of `X-OC-TIMESTAMP`) - **API Key** (first 8 characters only — never share the full key) - **Endpoint path** and HTTP method - **Error code** and the `msg` field from the response body - **Steps to reproduce** If you suspect a security incident or that your API Key has been compromised, contact us immediately via the Telegram technical support group and rotate your API Key on the developer platform without delay. --- ## Document: Change Log Binance Web3 API version change log URL: /en/dev-docs/products/others/changelog # Change Log ## 2026-06-01 **v1.0.0 — Initial Release** - Released Market API: market data, candlesticks, token search and analytics - Released Trading API: cross-DEX aggregated quotes, swaps, approvals - Released Transaction API: on-chain transaction simulation and broadcasting - Released Wallet API: wallet balance queries across multiple chains --- ## Document: Introduction Real-time market data, candlestick data, token analytics URL: /en/dev-docs/products/market-api/introduction # Introduction The Market API provides comprehensive market data services, including real-time prices, candlestick data, token search, and token analytics. ## Feature Overview | Feature | Endpoint | Method | Description | | -------------------------- | ---------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Get Supported Chains | `/api/v1/dex/market/supported/chain` | GET | Return the list of blockchains supported by the market service. | | Get Token Price | `/api/v1/dex/market/price` | POST | Get the latest price for tokens. Supports batch queries, up to 100 tokens per request. | | Get Token Candlestick Data | `/api/v1/dex/market/candles` | GET | Return candlestick (K-line) data for a token. | | Search Tokens | `/api/v1/dex/market/token/search` | GET | Search tokens by symbol or contract address. | | Get Hot Token Rankings | `/api/v1/dex/market/token/hot-token` | GET | Get hot token ranking list. Supports sorting by volume, price change, market cap, etc., with filters for holding distribution, developer behavior, liquidity, and more. | | Get Token Basic Info | `/api/v1/dex/market/token/basic-info` | POST | Return basic metadata for a token: name, symbol, logo, decimals, creator address, creation time, and tag info. | | Get Token Advanced Info | `/api/v1/dex/market/token/advanced-info` | GET | Return comprehensive metrics for a token, including creator and launch info, holding percentages by address type (smart money, KOL, sniper, bundler, fresh wallet, etc.), and token tags. | | Get Token Trading Info | `/api/v1/dex/market/price-info` | POST | Get token price and trading data (volume, transactions, market cap, holders, etc.). Supports batch queries for up to 100 tokens. | | Get Token Liquidity Pools | `/api/v1/dex/market/token/top-liquidity` | GET | Return the top liquidity pools for a token, including pool name, protocol, liquidity in USD, pool address, and per-token composition. | | Get Token Trade History | `/api/v1/dex/market/trades` | GET | Return on-chain trade history for a token. Supports tag filtering and wallet address filtering. | | Get Holders Ranking | `/api/v1/dex/market/token/holder` | GET | Return the holders ranking list for a token, including holding amount, holding percentage, native-token balance, average buy/sell price, realized PnL, and funding source. Up to 100 records. Pagination is not supported. | | Get Top Traders | `/api/v1/dex/market/token/top-trader` | GET | Return the top profit-making addresses for a token, ranked by realized PnL descending. Includes holding amount, average buy/sell price, realized PnL, and funding source. Up to 100 records. Pagination is not supported. | --- ## Document: Error Codes Market API error code reference — complete list of business error codes, causes, and troubleshooting guidance. URL: /en/dev-docs/products/market-api/error-codes # Error Codes ## Response Format All Market API responses — including errors — return **HTTP 200**. The business result is indicated by the `code` field in the response body. ```json { "code": 0, "msg": "success", "data": { ... }, "timestamp": 1718000000000 } ``` A non-zero `code` always indicates an error. Check the `msg` field for a human-readable description. --- ## Success | Code | Description | | ---- | ----------------- | | `0` | Request succeeded | --- ## Parameter Errors | Code | Message | Cause | Affected Endpoints | | ------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | | `40001` | `Parameter [field] error: ` | Request parameter failed validation — field format invalid, value out of range, required parameter missing, or unsupported enum value. The `msg` field includes the specific field name and reason. | All endpoints | **Common `40001` triggers:** - `binanceChainId` is blank or not on the supported-chain list - `tokenContractAddress` is blank or malformed - Batch request list exceeds 100 items (`POST /price`, `POST /price-info`) - `limit` is out of range (e.g. `GET /trades` requires `1 ≤ limit ≤ 500`) - `walletAddressFilter` contains more than 2 comma-separated addresses - `tagFilter` is set to an unsupported value - `bar` (candlestick interval) is not one of the allowed enum values - `rankBy`, `rankingTimeFrame`, `pageId`, or `size` is out of range for hot-token queries - Required `@RequestParam` is absent from the request --- ## Authentication & Authorization Errors These codes are enforced by the API Gateway before the request reaches the Market API service. | Code | Message | Cause | | ------- | ------------------- | ----------------------------------------------------------------------------------------------------- | | `40101` | `Invalid API Key` | The `X-OC-APIKEY` header is missing, malformed, or the key has been deleted / disabled | | `40102` | `Signature error` | The `X-OC-SIGN` value does not match the expected HMAC-SHA256 or Ed25519 signature | | `40103` | `Timestamp expired` | The `X-OC-TIMESTAMP` is outside the allowed `recv_window` relative to server time (default ±5 000 ms) | | `40104` | `Permission denied` | The API Key does not have the required permission for this endpoint | --- ## Rate Limit Errors | Code | Message | Cause | | ------- | ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | `42900` | `Request rate limit exceeded. Please refer to the API docs and reduce request frequency` | Per-IP, per-API-Key, per-user, or per-endpoint rate limit has been reached. Retry after the duration indicated in the `Retry-After` response header | --- ## Compliance Errors ### IP Compliance | Code | Message | Cause | | ------- | ------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------- | | `40301` | `Service not available in your region` | The client IP originates from a sanctioned jurisdiction (e.g. North Korea, Iran, Cuba, Syria, or OFAC-listed territory) | | `40302` | `Proxy or VPN detected. Please use direct connection` | A high-risk VPN or proxy was detected on the client connection | | `40303` | `Unusual IP activity detected. Please contact support` | Anomalous IP activity such as frequent location switching or concurrent multi-region access | --- ## Market API Business Errors ### Chain Support | Code | Message | Cause | Affected Endpoints | | ------- | ----------------------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | `40411` | `This chain is not supported` | The supplied `binanceChainId` is not in the supported-chain whitelist, or the chain has been temporarily disabled via configuration | All endpoints that accept `binanceChainId` | --- ## Server Errors | Code | Message | Cause | | ------- | ----------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------ | | `50000` | `Internal server error, please retry later` | An unexpected server-side error occurred (e.g. null pointer, serialization error). If the problem persists, contact support with the request timestamp | | `50001` | `Service temporarily unavailable, please retry later` | An upstream data provider (e.g. CoinMarketCap DEX service) is unreachable or returned an error. Retry after a short delay | --- ## Error Code Reference by Endpoint | Endpoint | Possible Error Codes | | -------------------------------------------- | ---------------------------------- | | `GET /api/v1/dex/market/supported/chain` | `40001`, `50000` | | `POST /api/v1/dex/market/price` | `40001`, `40411`, `50000`, `50001` | | `POST /api/v1/dex/market/price-info` | `40001`, `40411`, `50000`, `50001` | | `GET /api/v1/dex/market/candles` | `40001`, `40411`, `50000`, `50001` | | `GET /api/v1/dex/market/token/search` | `40001`, `50000`, `50001` | | `POST /api/v1/dex/market/token/basic-info` | `40001`, `40411`, `50000`, `50001` | | `GET /api/v1/dex/market/token/hot-token` | `40001`, `50000`, `50001` | | `GET /api/v1/dex/market/token/advanced-info` | `40001`, `40411`, `50000`, `50001` | | `GET /api/v1/dex/market/token/top-liquidity` | `40001`, `40411`, `50000`, `50001` | | `GET /api/v1/dex/market/token/holder` | `40001`, `40411`, `50000`, `50001` | | `GET /api/v1/dex/market/token/top-trader` | `40001`, `40411`, `50000`, `50001` | | `GET /api/v1/dex/market/trades` | `40001`, `40411`, `50000`, `50001` | --- ## Troubleshooting Guide | Symptom | Likely Code | Action | | -------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------- | | Signature mismatch | `40102` | Verify pre-hash string: `timestamp + METHOD + requestPath + body`. Ensure `requestPath` includes the raw query string exactly as sent | | Timestamp drift | `40103` | Sync your system clock with an NTP server. Use `X-OC-RECV-WINDOW` to extend tolerance (max 60 000 ms) | | Unsupported chain | `40411` | Call `GET /api/v1/dex/market/supported/chain` to retrieve the current whitelist before building your request | | Batch list too large | `40001` | Split your token list into batches of ≤ 100 items per request | | All retries return `50001` | `50001` | The upstream data provider is degraded. Check the [status page](https://developers.binance.com) or contact support | --- ## Document: Tutorial and Use Cases URL: /en/dev-docs/products/agentic-wallet/tutorial # Tutorial and Use Cases After completing [Install Agentic Wallet](./install) and signing in, you can talk directly to your AI Agent in natural language. Agentic Wallet Skills will parse your intent and execute on-chain automatically. --- ## Minimal Tutorial The minimal workflow: check status → get a quote → confirm and swap. **1. Check wallet connection** > "Is my wallet connected? What's my address?" The AI returns your connection status and wallet address. **2. Check balances** > "How much BNB and USDT do I have?" The AI returns all non-zero balances with USD valuation. **3. Get a swap quote (no execution)** > "How much USDT would I get for 0.01 BNB? Don't execute." The AI returns the estimated output, slippage, and gas estimate — no on-chain transaction is triggered. **4. Execute the swap** > "Go ahead and execute." The AI requests your confirmation, then submits the on-chain swap and returns an order ID for tracking. --- ## Use Case 1: Wallet Operations ### Check status > "Is my wallet connected?" > "Which chain am I on? What networks are supported?" > "What's my wallet address?" ### Check balances > "What are all my token balances?" > "How much USDT do I have?" > "What's the total USD value of my assets?" ### View transaction history > "What are my recent transactions?" > "Are there any pending transactions?" > "Check the status of transaction 0xabc123..." ### Check daily quota > "How much of my daily limit is left today?" > "What's my daily limit and how much have I used?" --- ## Use Case 2: Send Tokens Transfer tokens to a whitelisted address. > **Prerequisite:** The recipient address must be added to the Address Book in the Binance App > (Wallet → Settings → Address Book). **Send native token:** > "Send 0.02 BNB to 0x1234...5678" **Send ERC-20 token:** > "Transfer 10 USDT to 0x1234...5678" The AI will show you the amount and destination address before executing. After success, it returns a transaction hash. You can follow up: > "Has that transfer been confirmed on-chain?" --- ## Use Case 3: Market Order (Swap) ### Get a quote > "How much USDT would I get for 0.1 BNB? Quote only, don't execute." The AI returns the estimated output, slippage, and routing — no on-chain transaction. ### Execute a market swap > "Swap 0.1 BNB for USDT" > "Buy BNB with 50 USDT, slippage max 2%" The AI shows the quote and waits for confirmation. Say "confirm" or "go ahead" to trigger the swap. ### Check order status > "Has my last swap completed?" > "Show me my recent swap orders" > "Any swaps still pending?" | Status | Description | | ---------- | --------------------- | | `PENDING` | Processing on-chain | | `FINISHED` | Executed successfully | | `FAILED` | Execution failed | --- ## Use Case 4: Limit Order Set a target price — the AI executes automatically when triggered. No need to watch the market. > **Note:** Limit orders are only supported on BSC and Solana. Buy orders: `fromToken` must be USDT, > USDC, USD1, U or native token. Sell orders: `toToken` must be USDT, USDC, USD1, U or native token. ### Place a limit buy > "Buy BNB with 100 USDT when the price drops to $500" > "When WETH drops to $2800, buy some with 200 USDT on BSC" The AI creates the conditional order and returns a strategy ID. It executes automatically when the price is hit. ### Place a limit sell > "Sell 1 BNB for USDT when the price reaches $650" > "Sell 0.5 WETH on BSC when it hits $3500" ### Check limit orders > "What limit orders do I have open?" > "Show me limit orders still waiting to trigger" > "Check the status of limit order 9876543210" | Status | Description | | ----------- | ------------------------- | | `WORKING` | Waiting for trigger price | | `TRIGGERED` | Price hit, executing | | `PENDING` | Processing on-chain | | `FINISHED` | Executed successfully | | `FAILED` | Execution failed | | `EXPIRED` | Order expired | | `CANCELED` | Order canceled | ### Cancel a limit order > "Cancel my BNB limit buy order" > "Cancel all my open orders" --- ## Use Case 5: Prediction Market Trade on prediction markets — browse markets, bet on outcomes, manage positions, and claim winnings. ### Browse markets > "Search the most popular market in the sport category" > "What prediction markets are available in the crypto category?" ### Place a prediction order > "Buy "Up" in the most recent BTC 15m price market" The AI fetches a quote, shows you the expected cost and payout, and waits for your confirmation before placing the order. ### Check positions & PnL > "What are my current prediction positions?" > "Show my prediction portfolio and unrealized PnL" > "What's my prediction trading history?" ### Redeem winnings > "Do I have any winning predictions ready to claim?" > "Redeem my winning prediction positions" The AI checks for `PENDING_CLAIM` positions and triggers the redemption. ### Cancel an order > "Cancel my pending prediction order" | Status | Description | | ------------------ | -------------------------------- | | `PENDING` | Order created, not yet submitted | | `SUBMITTED` | Submitted, awaiting execution | | `FILLED` | Fully filled | | `PARTIALLY_FILLED` | Partially filled | | `CANCELLED` | Cancelled by user or system | | `FAILED` | Execution failed | | `EXPIRED` | Expired due to market ending | --- ## Use Case 6: Security & Settings Security settings can only be modified in the Binance App. You can query the current configuration anytime through the AI: > "What's my current daily limit?" > "What's my tradable token scope?" > "Are high-risk transactions set to auto-reject or require confirmation?" To modify: **Binance App → Agentic Wallet management page → Settings icon (top right)** --- ## Use Case 7: Automated Trading Strategies Combine Agentic Wallet with published Wallet Skills like `meme-rush`, `trading-signal`, `query-token-info`, and `query-token-audit` to build end-to-end automated trading strategies. > **Tip:** The following use cases require the corresponding Skills to be installed. Get them from > [binance-skills-hub](https://github.com/binance/binance-skills-hub/tree/main/skills/binance-web3). ### Strategy 1: Meme Token Sniping Use `meme-rush` to monitor newly launched or migrating Meme tokens, run security pre-checks with `query-token-audit`, and execute trades when safe. **Example conversation:** > "What new Meme tokens launched on Solana recently?" The AI uses `meme-rush` to return tokens on the bonding curve. > "Audit the security of token XXX for me" The AI uses `query-token-audit` to return risk score, honeypot detection, tax analysis, etc. > "Looks safe enough. Buy with 50 USDT" The AI confirms and executes a market swap via Agentic Wallet. --- ### Strategy 2: Smart Money Following Use `trading-signal` to monitor smart money buy signals in real-time, auto-check security, and follow trades. **Basic usage:** > "What are the latest smart money buy signals?" The AI uses `trading-signal` to return active signals with token, trigger price, current price, max gain, etc. > "Is the token from this signal safe? Check it for me" The AI calls `query-token-audit` to return the security audit. > "Looks good, buy with 50 USDT" The AI executes the trade via Agentic Wallet. **Advanced usage — automated following:** > "Check smart money signals every 5 minutes. When a new signal appears, auto-audit it. If risk > level is LOW, buy with 50 USDT" The AI Agent will set up a scheduled task to automatically: fetch signals → security audit → execute trade if safe. The specific implementation is planned by the Agent based on your instructions. --- ### Strategy 3: Narrative Trend Capture Use `meme-rush`'s AI narrative detection to discover market hot spots and position early. **Example conversation:** > "What narratives are trending right now? Which themes have the most capital inflow?" The AI uses `meme-rush` to return narrative themes ranked by net capital inflow. > "What are the representative tokens for this narrative?" The AI returns related tokens with market data. > "Check the holder distribution and liquidity for XXX" The AI uses `query-token-info` to return token details, holder analytics, and liquidity data. > "Liquidity looks deep. Set a limit sell order for 50% when it reaches $1.2" The AI creates a limit sell order via Agentic Wallet. --- ### Best Practices | Principle | Description | | ----------------------- | --------------------------------------------------------------------------- | | **Audit before buying** | For any non-mainstream token, audit with `query-token-audit` before trading | | **Start small** | Test new strategies with small amounts before scaling up | | **Set stop-losses** | Use limit sell orders to define exit points and avoid being stuck | | **Diversify** | Don't put all funds into a single token or narrative | | **Monitor regularly** | Check limit order status and portfolio changes periodically | > ⚠️ **Risk Warning:** On-chain trading involves slippage, MEV attacks, and contract risks. All > trading decisions should be based on your own research (DYOR). Skills provide information and > execution capabilities only — they do not constitute investment advice. --- ## What's Next - [Skills Reference](./skills-reference) — Full capability reference for all Skills modules - [Supported Skills](../wallet-skills/introduction) — View all available Wallet Skills --- ## Document: Skills Reference URL: /en/dev-docs/products/agentic-wallet/skills-reference # Skills Reference The `binance-agentic-wallet` skill provides wallet management and on-chain trading through the `baw` CLI. **Supported chains:** BNB Smart Chain (BSC), Ethereum, Base, Solana --- ## Skill Documentation Structure ``` binance-agentic-wallet/ ├── SKILL.md # Main doc: command routing, security policy, common token addresses └── references/ ├── preflight.md # Preflight checks: skill version, CLI version ├── authentication.md # Sign-in/sign-out flow ├── wallet-view.md # Wallet queries: status, address, balance, history, etc. ├── wallet-setting.md # Security settings (read-only) ├── send.md # Token transfer ├── market-order.md # Market order (swap) ├── limit-order.md # Limit order ├── prediction.md # Prediction market trading └── security.md # Pre-trade security check flow ``` --- ## Key Features ### Wallet Management Query wallet status, addresses, balances, transaction history, and security settings. ``` Is my wallet connected? What's my wallet address? How much BNB and USDT do I have? Show me my recent transactions How much of my daily limit is left? ``` ### Token Transfer Send tokens to addresses in your address book (Binance App → Wallet → Settings → Address Book). ``` Send 0.02 BNB to 0x1234...5678 Transfer 10 USDT to 0x1234...5678 ``` ### Market Swap Get quotes or execute swaps at current market price. Supports custom slippage and MEV protection. ``` How much USDT would I get for 0.1 BNB? Quote only Swap 0.1 BNB for USDT Buy BNB with 50 USDT, max slippage 2% ``` ### Limit Order Set a target price — executes automatically when triggered. > **Note:** Limit orders are only supported on BSC and Solana. ``` Buy BNB with 100 USDT when the price drops to $500 Sell 1 BNB for USDT when the price reaches $650 Show my open limit orders Cancel my BNB limit order ``` ### Prediction Market Trade on prediction markets — browse markets, place bets on outcomes, track positions, and redeem winnings. ``` Search the most popular market in the sport category Buy "Up" in the most recent BTC 15m price market What are my current prediction positions? Show my prediction PnL Redeem my winning predictions Cancel my pending prediction order ``` --- ## Related - [Install Agentic Wallet](./install) - [Tutorial and Use Cases](./tutorial) --- ## Document: Binance Agentic Wallet URL: /en/dev-docs/products/agentic-wallet/introduction # Binance Agentic Wallet ## What is Binance Agentic Wallet On-chain operations are getting more complex by the day — limit orders, multi-chain asset management… every step demands manual action, constant monitoring, and the risk of missing the right moment. **Binance Agentic Wallet changes all of that.** Just tell your AI what you want in plain language. The AI understands your intent, finds the optimal path, and executes on-chain within the safety rules you define. No contract addresses to memorize. No parameters to type. No screen to watch. ### Why Binance Agentic Wallet **MPC Keyless Security** Built on the same MPC Keyless technology as Binance Wallet. Your private key is never fully reconstructed on any single device or server. The AI Agent cannot directly hold or transfer your keys. Every operation is logged and auditable on-chain. **You Set the Rules — the AI Stays Within Them** Set your daily limit, tradable token scope, and high-risk transaction handling in the Binance App. These rules constrain the Agent at the API level. Any action outside your rules is automatically rejected or requires a second confirmation from you. **Natural Language as the Interface** Swap, transfer, place orders, check balances — all through conversation. Install the Skills and connect to Claude, ChatGPT, Copilot, or any major AI Agent. Agentic Wallet is ready immediately. --- ## Core Capabilities | Capability | Description | | --------------------- | ------------------------------------------------------------------------------ | | **Authentication** | QR code sign-in, session management, sign-out | | **Wallet** | Status, address, balances, transaction history, daily quota, security settings | | **Market Order** | Market swap, quote, order tracking | | **Limit Order** | Limit buy/sell, order management, cancel | | **Prediction Market** | Browse markets, place predictions, manage positions, redeem winnings | > More features coming soon. ### Security: MPC Keyless - Private key is never fully reconstructed on any single device or server - All Agent operations are logged and auditable at any time - The Agent is constrained at the API level and cannot exceed user-defined rules ### You Define the Rules - Set daily limits and tradable token scope in the Binance App - Sign out of Agentic Wallet anytime to revoke the Agent's access - High-risk transactions can be auto-rejected or sent for App confirmation --- ## Key Use Cases **Check your assets** > "What's my wallet address? How much USDT do I have? How much of my daily limit is left?" **Market swap** > "Swap 0.1 BNB for USDT" — the AI fetches a quote, confirms with you, then executes. **Limit order** > "Buy 100 USDT worth of BNB when the price drops to $500" — the order waits for the trigger > automatically. **Token transfer** > "Send 10 USDT to 0x123" — the AI confirms with you before executing, address must be in your > address book **Prediction market** > "Bet 10 USDT on YES for BTC 5-min price up" — the AI shows current odds, confirms your bet, then > places the prediction. --- ## Install Run the following command to install Skills. The CLI will be set up automatically: ```bash npx skills add binance/binance-skills-hub/skills/binance-web3/binance-agentic-wallet ``` See [Install Agentic Wallet](./install) for the full setup guide. --- ## Chain Support Current version supports 4 major networks, with more chains coming soon. | Network | Chain ID | Status | | --------------------- | -------- | -------------- | | BNB Smart Chain (BSC) | 56 | ✅ Supported | | Ethereum | 1 | ✅ Supported | | Base | 8453 | ✅ Supported | | Solana | CT_501 | ✅ Supported | | More networks | — | 🔜 Coming Soon | --- ## Document: Install Agentic Wallet URL: /en/dev-docs/products/agentic-wallet/install # Install Agentic Wallet Two steps to start operating on-chain through natural language with your AI Agent. --- ## Prerequisites **Node.js 18+** — required by the Skills installer. **Binance Account & MPC Wallet** 1. You need a Binance account to get started 2. After signing in to Binance, create an MPC Wallet in the Binance App — this is required before you can create an Agentic Wallet --- ## Step 1: Install Skills ```bash npx skills add binance/binance-skills-hub/skills/binance-web3/binance-agentic-wallet ``` > If the `baw` CLI is not installed, Skills will detect this and install it automatically on first > use. --- ## Step 2: Sign In Once installed, say this to your AI Agent: > "Sign in to Binance Agentic Wallet" The Agent will return a signin link. If you click this link on mobile, you will be directly redirected to the Binance App. If you open it on the web, you will need to scan the QR code in the page using the Binance App and confirm the signin in the App. If this is your first time signing in, the Binance App will walk you through the Agentic Wallet creation process. Once complete, you'll land on the Agentic Wallet management page. To sign out, tell your AI: > "Sign out" --- ## Security Recommendations Security rules can only be configured in the Binance App — the AI can read them but cannot modify them. For first-time setup, we recommend: - Set a small daily limit (e.g., $50) to start - Restrict tradable tokens to the Limited scope - Set high-risk transaction handling to "Require App confirmation" To modify: **Binance App → Agentic Wallet management page → Settings icon (top right)** --- ## Next Steps → [Tutorial and Use Cases](./tutorial) --- ## Document: Python URL: /en/dev-docs/sdks-tools/connectors/python # Python The official Python connector for the Binance Web3 Wallet API, designed for backend applications running on Python. The connector is published as the `binance-web3-wallet` PyPI package. It supports the Web3 Wallet REST API and provides built-in request signing and typed request/response models. For source code, issues, and release notes, see the [binance-web3-connector-python](https://github.com/binance/binance-web3-connector-python) repository on GitHub. ## Supported environments - Python 3.9 or newer - Backend Python applications and services > This connector is intended for server-side usage only. Interactive or client-side Python > environments are not supported. ## Typical use cases - Backend services querying balances, transactions, and supported chains - Building and submitting swap and transfer transactions - Integrating Web3 Wallet market and pricing data into backend systems ## Key features - Support for the Binance Web3 Wallet REST API - Built-in request signing for authenticated endpoints - Typed request and response models - Consistent API design ## Getting started Install the package: ```bash pip install binance-web3-wallet ``` Create a client and send a request: ```python from binance_sdk_web3_wallet.web3_wallet import Web3Wallet, ConfigurationRestAPI configuration_rest_api = ConfigurationRestAPI( api_key=os.environ["BINANCE_API_KEY"], api_secret=os.environ["BINANCE_API_SECRET"], ) client = Web3Wallet(config_rest_api=configuration_rest_api) response = client.rest_api.get_supported_chains() ``` The example above uses HMAC-based authentication. Asymmetric key authentication using a private key is also supported. Refer to the package documentation for REST API examples. ## Notes and best practices - Store API keys securely using environment variables or a secrets manager - Monitor rate limits and endpoint weights when building high-throughput services --- ## Document: JavaScript URL: /en/dev-docs/sdks-tools/connectors/javascript # JavaScript The official JavaScript connector for the Binance Web3 Wallet API, designed for backend applications running on Node.js. The connector is published as the `@binance-web3/wallet` npm package. It supports the Web3 Wallet REST API and provides built-in request signing, connection management and TypeScript definitions. For source code, issues, and release notes, see the [binance-web3-connector-js](https://github.com/binance/binance-web3-connector-js) repository on GitHub. ## Supported environments - Node.js v22.12.0 or newer (LTS versions recommended) - JavaScript and TypeScript backend applications > This connector is intended for server-side usage only. > Browser environments are not supported at this time. ## Typical use cases - Backend services querying balances, transactions, and supported chains - Building and submitting swap and transfer transactions - Integrating Web3 Wallet market and pricing data into backend systems ## Key features - Support for the Binance Web3 Wallet REST API - Built-in request signing for authenticated endpoints - First-class TypeScript definitions - Configurable timeouts, retries, and proxy support - Consistent API design ## Getting started Install the package: ```bash npm install @binance-web3/wallet ``` Create a client and send a request: ```ts import { Web3Wallet, Web3WalletRestAPI } from "@binance-web3/wallet"; const configurationRestAPI = { apiKey: process.env.BINANCE_API_KEY, apiSecret: process.env.BINANCE_API_SECRET, }; const client = new Web3Wallet({ configurationRestAPI }); const response = await client.restAPI.getSupportedChains(); const data = await response.data(); ``` The example above uses HMAC-based authentication. Asymmetric key authentication using a private key is also supported. Refer to the package documentation for REST API examples. ## Notes and best practices - Store API keys securely using environment variables or a secrets manager - Monitor rate limits and endpoint weights when building high-throughput services --- ## Document: Java URL: /en/dev-docs/sdks-tools/connectors/java # Java The official Java connector for the Binance Web3 Wallet API, designed for backend applications and services running on the JVM. The connector provides an idiomatic Java interface to the Web3 Wallet REST API. It includes built-in request signing and strongly typed request and response models to help you build reliable and maintainable integrations. For source code, issues, and release notes, see the [binance-web3-connector-java](https://github.com/binance/binance-web3-connector-java) repository on GitHub. ## Supported environments - Java 11 or newer - Backend Java applications and JVM-based services > This connector is intended for server-side usage only. ## Typical use cases - Backend services querying balances, transactions, and supported chains - Building and submitting swap and transfer transactions - Integrating Web3 Wallet market and pricing data into backend systems ## Key features - Support for the Binance Web3 Wallet REST API - Built-in request signing for authenticated endpoints - Strongly typed request and response models - Consistent and idiomatic Java API design ## Getting started Add the dependency for the Web3 Wallet connector: ```xml io.github.binance binance-web3-wallet ``` Create a client and send a request: ```java import com.binance.connector.client.common.configuration.ClientConfiguration; import com.binance.connector.client.common.configuration.SignatureConfiguration; import com.binance.connector.client.web3_wallet.rest.Web3WalletRestApiUtil; import com.binance.connector.client.web3_wallet.rest.api.Web3WalletRestApi; public class Main { public static void main(String[] args) throws Exception { SignatureConfiguration signatureConfiguration = new SignatureConfiguration(); signatureConfiguration.setApiKey(System.getenv("BINANCE_API_KEY")); signatureConfiguration.setSecretKey(System.getenv("BINANCE_API_SECRET")); ClientConfiguration clientConfiguration = Web3WalletRestApiUtil.getClientConfiguration(); clientConfiguration.setSignatureConfiguration(signatureConfiguration); Web3WalletRestApi web3WalletApi = new Web3WalletRestApi(clientConfiguration); web3WalletApi.getSupportedChains(); } } ``` The example above uses HMAC-based authentication. Asymmetric key authentication using a private key is also supported. Refer to the package documentation for REST API examples. ## Notes and best practices - Store API keys securely using environment variables or a secrets manager - Monitor rate limits and endpoint weights when building high-throughput services --- ## API Reference --- ### Binance Web3 API (1.0.0) Cross-chain wallet, market, trading, and transaction APIs for the Binance Web3 API platform. #### Market API ##### `GET /api/v1/dex/market/supported/chain` Get Supported Chains Return the list of blockchains supported by the market service. Operation ID: `getSupportedChains` ##### `POST /api/v1/dex/market/price` Get Token Price Get the latest price for tokens. Supports batch queries, up to 100 tokens per request. Operation ID: `getTokenPrice` ##### `POST /api/v1/dex/market/price-info` Get Token Trading Info Get token price and trading data (volume, transactions, market cap, holders, etc.). Supports batch queries for up to 100 tokens. Operation ID: `getTokenTradingInfo` ##### `GET /api/v1/dex/market/candles` Get Candles Return candlestick (K-line) data for a token. Operation ID: `getCandles` ##### `GET /api/v1/dex/market/token/search` Search Token Search tokens by symbol or contract address. Operation ID: `searchToken` ##### `POST /api/v1/dex/market/token/basic-info` Get Token Basic Info Return basic metadata for a token: name, symbol, logo, decimals, creator address, creation time, and tag info. Operation ID: `getTokenBasicInfo` ##### `GET /api/v1/dex/market/token/advanced-info` Get Token Advanced Info Return comprehensive metrics for a token, including creator and launch info, holding percentages by address type (smart money, KOL, sniper, bundler, fresh wallet, etc.), and token tags. Operation ID: `getTokenAdvancedInfo` ##### `GET /api/v1/dex/market/token/hot-token` Get Hot Token List Get hot token ranking list. Supports sorting by volume, price change, market cap, etc., with filters for holding distribution, developer behavior, liquidity, and more. Operation ID: `getHotTokenList` ##### `GET /api/v1/dex/market/token/holder` Get Holders Ranking Return the holders ranking list for a token, including holding amount, holding percentage, native-token balance, average buy/sell price, realized PnL, and funding source. Up to 100 records. Pagination is not supported. Operation ID: `getHoldersRanking` ##### `GET /api/v1/dex/market/token/top-trader` Get Top Traders Return the top profit-making addresses for a token, ranked by realized PnL descending. Includes holding amount, average buy/sell price, realized PnL, and funding source. Up to 100 records. Pagination is not supported. Operation ID: `getTopTraders` ##### `GET /api/v1/dex/market/token/top-liquidity` Get Top Liquidity Pools Return the top liquidity pools for a token, including pool name, protocol, liquidity in USD, pool address, and per-token composition. Operation ID: `getTopLiquidityPools` ##### `GET /api/v1/dex/market/trades` Get Token Trades Return on-chain trade history for a token. Supports tag filtering and wallet address filtering. Operation ID: `getTokenTrades` #### Trading API ##### `GET /api/v1/dex/aggregator/supported/chain` Get Aggregator Supported Chains Return blockchain networks supported by the DEX aggregator. The supported list is dynamically configured server-side and may change over time. Pass `binanceChainId` to filter to a single chain; omit it to get the full list. Operation ID: `getAggregatorSupportedChains` ##### `GET /api/v1/dex/aggregator/approve-transaction` Get ERC-20 Approve Transaction Build the on-chain transaction data needed to approve the DEX router to spend a user's ERC-20 token before a swap. Calldata is encoded per the ERC-20 ABI standard (`approve()` selector + spender + amount). Operation ID: `getErc20ApproveTransaction` ##### `GET /api/v1/dex/aggregator/quote` Get Aggregated Quote Query multiple DEX vendors in parallel and return the priced routes sorted by `toTokenAmount` (descending). Each route carries an independent `quoteId` (TTL ~30s) that the swap endpoint consumes to construct calldata for the chosen route. Operation ID: `getAggregatedQuote` ##### `GET /api/v1/dex/aggregator/swap` Build Swap Transaction Build the on-chain swap calldata for a previously quoted route. The request is matched against the cached quote by `quoteId` (TTL ~30s); if the entry has expired, `QUOTE_EXPIRED` (40401) is returned, and if the request parameters disagree with the cached quote, `SWAP_QUOTE_MISMATCH` (40462) is returned. Operation ID: `buildSwapTransaction` ##### `GET /api/v1/dex/aggregator/history` Get Transaction Status Look up the on-chain status of a DEX swap by `binanceChainId` + `txHash`. Response semantics: - Transaction not found: `data` is `null` (not HTTP 404). - Transaction failed: `status=failed` with `errorMsg`; aggregator business fields (`txType`, `dexRouter`, `fromTokenDetails`, `toTokenDetails`) are `null`. - Transaction succeeded: `status=success` with full token details when an aggregator event is present. Operation ID: `getTransactionStatus` #### Transaction API ##### `GET /api/v1/dex/pre-transaction/supported/chain` Get Transaction Supported Chains Return the blockchain networks supported by the Transaction service for gas estimation, simulation, and broadcasting. The list is dynamically configured server-side and may change over time. Operation ID: `getTransactionSupportedChains` ##### `GET /api/v1/dex/pre-transaction/gas-price` Get Gas Price Query the current network gas price for the specified chain. The response shape varies by chain family: - EVM chains return both `evmLegacyGasPrice` (legacy gasPrice) and `eip1559GasPrice` (baseFee + priority/max fees) when EIP-1559 is supported. - Solana returns `solanaGasPrice` (compute-unit prices and Jito tips). Fields not applicable to the chain family are returned as `null`. Operation ID: `getGasPrice` ##### `POST /api/v1/dex/pre-transaction/gas-limit` Get Gas Limit Estimate the gas limit (or compute-unit ceiling on Solana) for an unsigned transaction. Provide either `evmTx` for EVM chains or `solTx` for Solana, matching the value of `binanceChainId`. Operation ID: `getGasLimit` ##### `POST /api/v1/dex/pre-transaction/simulate` Simulate Transactions Simulate transaction execution off-chain to predict its outcome before broadcasting. The response includes the predicted execution status, balance changes per affected account/token, and ERC-20 allowance changes (EVM chains). Provide either `evmTx` (EVM chains) or `solTx` (Solana) matching `binanceChainId`. Operation ID: `simulateTransactions` ##### `POST /api/v1/dex/pre-transaction/broadcast-transaction` Broadcast Transactions Broadcast a client-signed transaction to the chain via the Binance Web3 API relay. Returns the transaction hash and an internal `orderId` you can use to track on-chain status via the post-transaction service. Optional MEV protection (EVM chains only) routes the transaction through a private mempool to mitigate front-running and sandwich attacks. Operation ID: `broadcastTransactions` ##### `GET /api/v1/dex/post-transaction/orders` Get Broadcast Orders Look up broadcast orders previously submitted via `/pre-transaction/broadcast-transaction`. Filter by `txStatus` or `orderId`, paginate with `cursor`. Operation ID: `getBroadcastOrders` #### Wallet API ##### `GET /api/v1/dex/balance/supported/chain` Get Wallet Supported Chains Return blockchain networks for which the Wallet service can return balances. The supported list is dynamically configured server-side and may change over time. Pass `binanceChainId` to filter to a single chain; omit to get the full list. Operation ID: `getWalletSupportedChains` ##### `GET /api/v1/dex/balance/all-token-balances-by-address` Get All Token Balances by Address Return all token balances held by an address across one or more chains, with pagination support. Set `excludeRiskToken=true` to filter out airdrop-risk and honeypot tokens (honeypot detection currently applies only to ETH / BSC / SOL / BASE). Operation ID: `getAllTokenBalancesByAddress` ##### `POST /api/v1/dex/balance/token-balances-by-address` Get Token Balances by Address Return token balances for a specific list of (chain, contract) pairs. Up to 20 entries per request. Set `excludeRiskToken="0"` to exclude risk-flagged tokens (default), or `"1"` to include them. Operation ID: `getTokenBalancesByAddress` ##### `GET /api/v1/dex/post-transaction/transactions-by-address` Get Transactions by Address Return on-chain transaction history for a wallet address across one or more chains. Results are limited to the most recent 6 months and sorted by time (descending). Supports cursor pagination, time-range filtering, and token-contract filtering. Operation ID: `getTransactionsByAddress` ##### `GET /api/v1/dex/post-transaction/transaction-detail-by-txhash` Get Transaction Detail by Hash Look up the full on-chain transaction detail by `binanceChainId` + `txHash`. Returns one or more entries describing transaction inputs, outputs, internal calls, and token transfers. Operation ID: `getTransactionDetailByHash`