Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Query detailed token information and metadata from Binance via natural language through the Binance Skills Hub.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/cli.md
1# query-token-info — CLI Reference23Complete reference for every command in `scripts/cli.mjs`.45**Invocation pattern:** `node <skill-dir>/scripts/cli.mjs <command> '<json_params>'`6**Exit codes:** `0` success · `1` usage/upstream error · `3` network failure78---910## `search` — Search tokens by keyword1112```bash13node <skill-dir>/scripts/cli.mjs search '{"keyword":"<keyword>","chainIds":"56"}'14```1516### Parameters1718| Param | Type | Required | Description |19|---|---|---|---|20| `keyword` | string | **yes** | Name / symbol / contract address |21| `chainIds` | string | no | Comma-separated chainIds (e.g. `"56"`, `"1,56,8453,CT_501"`); default: all |22| `orderBy` | string | no | Sort key, e.g. `volume24h` |2324### Return fields (under `.data[]`)2526| Field | Type | Description |27|---|---|---|28| `chainId` | string | Chain identifier (e.g. `"56"` = BSC) |29| `contractAddress` | string | Token contract address |30| `tokenId` | string | Binance-internal token ID (stable across address changes) |31| `name`, `symbol` | string | Token display names |32| `icon` | string | Logo path — prefix with `https://bin.bnbstatic.com` |33| `price`, `percentChange24h` | string | Latest USD price and 24h change (%) |34| `volume24h`, `marketCap`, `liquidity` | string | All USD; string-encoded decimals |35| `tagsInfo` | object | Risk / recognition tags, categorized (e.g. `"Sensitive Events": [...]`, `"Community Recognition Level": [...]`) |3637---3839## `meta` — Static token metadata4041```bash42node <skill-dir>/scripts/cli.mjs meta '{"chainId":"56","contractAddress":"0x..."}'43```4445### Parameters4647| Param | Type | Required | Description |48|---|---|---|---|49| `chainId` | string | **yes** | Chain identifier |50| `contractAddress` | string | **yes** | Token contract address (case-insensitive) |5152### Return fields (under `.data`)5354| Field | Type | Description |55|---|---|---|56| `tokenId` | string | Binance-internal stable ID |57| `name`, `symbol`, `decimals` | — | Display name, ticker, precision |58| `chainName`, `chainIconUrl` | string | Chain display info |59| `links` | array of `{label, link}` | Website / whitepaper / social links |60| `aiNarrativeFlag` | number | `1` = AI has narrative summary available |61| `nativeAddressFlag` | boolean | `true` = native chain coin (not an ERC-20) |6263`links[]` entries are `{label, link}` — labels include `"website"`, `"whitepaper"`, social platforms.6465---6667## `dynamic` — Real-time market data6869```bash70node <skill-dir>/scripts/cli.mjs dynamic '{"chainId":"56","contractAddress":"0x..."}'71```7273### Parameters7475| Param | Type | Required | Description |76|---|---|---|---|77| `chainId` | string | **yes** | Chain identifier |78| `contractAddress` | string | **yes** | Token contract address |7980### Return fields (under `.data`)8182Price + volume/buy/sell breakdowns across multiple windows (5m, 1h, 4h, 24h), separated by on-chain vs Binance-routed:8384| Field pattern | Meaning |85|---|---|86| `price`, `nativeTokenPrice` | Current USD price and chain-native price |87| `volume{5m,1h,4h,24h}` | Total trading volume in window (USD) |88| `volume{window}{Buy,Sell}` | Direction breakdown |89| `volume{window}Binance` | Binance-routed subset |90| `volume{window}Net{Buy,Binance}` | Net flow = Buy − Sell |91| `holders` | Holder count (if available) |92| `liquidity` | Current liquidity in USD |9394---9596## `kline` — Candlestick OHLCV9798```bash99node <skill-dir>/scripts/cli.mjs kline '{"chainId":"56","contractAddress":"0x...","interval":"1h","limit":24}'100```101102### Parameters103104| Param | Type | Required | Description |105|---|---|---|---|106| `chainId` | string | **yes** | Chain identifier — `1` (Ethereum) / `56` (BSC) / `8453` (Base) / `CT_501` (Solana) |107| `contractAddress` | string | **yes** | Token contract address |108| `interval` | string | **yes** | Candle size: `1s` / `1min` / `3min` / `5min` / `15min` / `30min` / `1h` / `2h` / `4h` / `6h` / `8h` / `12h` / `1d` / `3d` / `1w` / `1m` |109| `limit` | number | no | Optional. Max 500 per request. Has higher priority than `from` when both provided. |110| `from` | number | no | Optional. Start timestamp in **milliseconds**. |111| `to` | number | no | Optional. End timestamp in **milliseconds**. |112| `pm` | string | no | Optional. Price mode — `p` (price, default) or `m` (marketcap). |113114### Return shape (under `.data[]`)115116Each row is a 2D array (7 numbers):117118| Index | Field |119|---|---|120| `[0]` | open price (USD) |121| `[1]` | high price |122| `[2]` | low price |123| `[3]` | close price |124| `[4]` | volume |125| `[5]` | timestamp (ms since epoch, start of candle) |126| `[6]` | trade count |127128Envelope is `{ data, status: {error_code, error_message} }` — no `code` field (unlike other commands).129130---131132## Errors133134Exit codes: `0` ok · `1` upstream/usage (stderr: reason; stdout: body with business `code`) · `3` network.135Business `code`: `000000` ok · `100004` rate-limited · `100002` bad param · `000400` token not found / unsupported chain.136