Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Query crypto token market rankings and performance data via Binance Skills Hub for AI agents.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
references/cli.md
1# crypto-market-rank — 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**Supported chains:** BSC (`56`), Base (`8453`), Solana (`CT_501`). Per-command restrictions noted below.910---1112## `social-hype` — Social buzz leaderboard1314```bash15node <skill-dir>/scripts/cli.mjs social-hype '{"chainId":"56","targetLanguage":"en","timeRange":1}'16```1718### Parameters1920| Param | Type | Required | Description |21|---|---|---|---|22| `chainId` | string | **yes** | Chain identifier |23| `targetLanguage` | string | **yes** | Translation target, e.g. `"en"`, `"zh"` |24| `timeRange` | number | **yes** | Time range, `1` = 24h |25| `sentiment` | string | no | Filter: `All` / `Positive` / `Negative` / `Neutral` |26| `socialLanguage` | string | no | Content language, `"ALL"` for all |2728### Return fields (under `.data.leaderBoardList[]`)2930| Field Path | Type | Description |31|---|---|---|32| `metaInfo.symbol` / `metaInfo.logo` | string | Token symbol and icon path (prefix `https://bin.bnbstatic.com`) |33| `metaInfo.chainId` / `metaInfo.contractAddress` | string | Chain + contract |34| `metaInfo.tokenAge` | number | Creation timestamp (ms) |35| `marketInfo.marketCap` / `marketInfo.priceChange` | number | Market cap (USD), 24h % change |36| `socialHypeInfo.socialHype` | number | Total social hype index |37| `socialHypeInfo.sentiment` | string | `Positive` / `Negative` / `Neutral` |38| `socialHypeInfo.socialSummaryBrief` / `...Detail` | string | Social summary (short / detailed) |39| `socialHypeInfo.socialSummaryBriefTranslated` / `...DetailTranslated` | string | Translated summaries |4041**Nested shape:** each entry is `{metaInfo, marketInfo, socialHypeInfo}` — fields grouped by the three objects above.4243---4445## `token-rank` — Unified token rank (POST)4647> ⚠️ `rankType` determines the list: `10`=Trending · `11`=TopSearch · `20`=Alpha · `40`=Stock.4849```bash50node <skill-dir>/scripts/cli.mjs token-rank '{"rankType":10,"chainId":"56","page":1,"size":20}'51```5253### Parameters (all optional; body is a JSON object)5455**Core:**5657| Field | Type | Default | Description |58|---|---|---|---|59| `rankType` | integer | `10` | `10`=Trending, `11`=TopSearch, `20`=Alpha, `40`=Stock |60| `chainId` | string | — | `"1"`, `"56"`, `"8453"`, `"CT_501"` |61| `period` | integer | `50` | `10`=1m, `20`=5m, `30`=1h, `40`=4h, `50`=24h |62| `sortBy` | integer | `0` | See Sort Options below |63| `orderAsc` | boolean | `false` | Ascending if `true` |64| `page` / `size` | integer | `1` / `200` | Pagination (size max 200) |6566**Min/Max filters (decimal unless noted):** `percentChange` · `marketCap` · `volume` · `liquidity` · `holders` (long) · `holdersTop10Percent` · `kycHolders` (long, Alpha only) · `count` (long) · `uniqueTrader` (long) · `launchTime` (long, ms).6768**Advanced filters:** `keywords` / `excludes` (string[]) · `socials` (int[]: `0`=at_least_one, `1`=X, `2`=Telegram, `3`=Website) · `alphaTagFilter` (string[]) · `auditFilter` (int[]: `0`=not_renounced, `1`=freezable, `2`=mintable) · `tagFilter` (int[]: `0`=hide_alpha, `23`=dex_paid, `29`=alpha_points, …).6970**Sort Options (`sortBy`):** `0`=Default · `1`=Web default · `2`=Search count · `10`=Launch time · `20`=Liquidity · `30`=Holders · `40`=Market cap · `50`=Price change · `60`=Tx count · `70`=Volume · `80`=KYC holders · `90`=Price · `100`=Unique traders.7172### Return fields (under `.data.tokens[]`)7374| Field | Type | Description |75|---|---|---|76| `chainId` / `contractAddress` / `symbol` / `icon` | string | Identity + logo (prefix `https://bin.bnbstatic.com`) |77| `price` / `marketCap` / `liquidity` / `holders` | string | All USD string-encoded decimals |78| `percentChange{1m,5m,1h,4h,24h}` | string | Price change per window (%) |79| `volume{window}` / `volume{window}{Buy,Sell}` | string | Volume + direction breakdown |80| `count{window}` / `count{window}{Buy,Sell}` | string | Transaction counts |81| `uniqueTrader{window}` | string | Unique traders per window |82| `alphaInfo` | object | Alpha metadata (`tagList`, `description`) |83| `auditInfo` | object | Audit info (`riskLevel`, `riskNum`, `cautionNum`) |84| `launchTime` / `decimals` | string / int | Launch timestamp (ms), token decimals |85| `kycHolders` / `holdersTop10Percent` | string | KYC holder count, top-10 % |8687`.data.total` / `.data.page` / `.data.size` provide pagination context.8889---9091## `smart-money-inflow` — Smart money net inflow rank (POST)9293> ⚠️ **BSC (`56`) and Solana (`CT_501`) only.**94> ⚠️ `tagType` defaults to `2` (the CLI injects it automatically if omitted — always the correct value).9596```bash97node <skill-dir>/scripts/cli.mjs smart-money-inflow '{"chainId":"56","period":"24h"}'98```99100### Parameters101102| Field | Type | Required | Description |103|---|---|---|---|104| `chainId` | string | **yes** | `"56"` (BSC), `"CT_501"` (Solana) |105| `period` | string | no | `"5m"` / `"1h"` / `"4h"` / `"24h"` |106| `tagType` | integer | auto | Injected as `2` if omitted — upstream only accepts `2` |107108### Return fields (under `.data[]`)109110| Field | Type | Description |111|---|---|---|112| `tokenName` / `tokenIconUrl` | string | Name + icon path (prefix `https://bin.bnbstatic.com`) |113| `ca` | string | Contract address |114| `price` / `marketCap` / `volume` / `liquidity` | string | USD, string-encoded |115| `priceChangeRate` | string | Price change in period (%) |116| `holders` / `kycHolders` / `holdersTop10Percent` | string | Holder stats |117| `count` / `countBuy` / `countSell` | string | Tx counts in period |118| `inflow` | number | **Smart money net inflow (USD)** — primary ranking metric |119| `traders` | integer | Number of smart-money addresses trading this token |120| `launchTime` | number | Launch timestamp (ms) |121| `tokenDecimals` | integer | Token decimals |122| `tokenRiskLevel` | integer | `-1`=unknown, `1`=low, `2`=medium, `3`=high |123| `link` | array | `[{label, link}]` social links |124| `tokenTag` | object | Tags by category |125126---127128## `meme-rank` — Top meme tokens from Pulse launchpad129130> ⚠️ **BSC (`56`) only.** Returns top 100 meme tokens launched via Pulse, scored and ranked by a breakout-potential algorithm.131132```bash133node <skill-dir>/scripts/cli.mjs meme-rank '{"chainId":"56"}'134```135136### Parameters137138| Param | Type | Required | Description |139|---|---|---|---|140| `chainId` | string | **yes** | Must be `"56"` (BSC) |141142### Return fields (under `.data.tokens[]`)143144| Field | Type | Description |145|---|---|---|146| `rank` / `score` | integer / string | Rank position and algorithm score (higher = stronger breakout signal) |147| `chainId` / `contractAddress` / `symbol` | string | Identity |148| `metaInfo.icon` / `metaInfo.name` / `metaInfo.decimals` | — | Logo path, full name, decimals |149| `metaInfo.aiNarrativeFlag` | int | `1` = AI narrative summary available |150| `price` / `percentChange` / `percentChange7d` | string | Current price, current %, 7-day % |151| `marketCap` / `liquidity` / `volume` | string | USD |152| `volumeBnTotal` / `volumeBn7d` | string | Binance-user volume (total / 7d) |153| `holders` / `kycHolders` / `bnUniqueHolders` / `holdersTop10Percent` | string | Holder stats |154| `count` / `countBnTotal` / `countBn7d` | integer | Transaction counts |155| `uniqueTraderBn` / `uniqueTraderBn7d` | integer | Binance unique traders |156| `impression` | integer | View count |157| `createTime` / `migrateTime` | number | Creation + migration timestamps (ms) |158| `alphaStatus` | integer | Alpha listing status |159| `previewLink` | object | `{website[], x[], telegram[]}` |160| `tokenTag` | object | Tags by category |161162---163164## `address-pnl-rank` — Top trader PnL leaderboard165166> ⚠️ **Chain support:** `"56"` (BSC), `"CT_501"` (Solana).167> ⚠️ **`period` accepted values:** `"7d"` / `"30d"` / `"90d"`.168> ⚠️ `pageSize` max = `25`.169170```bash171node <skill-dir>/scripts/cli.mjs address-pnl-rank '{"chainId":"CT_501","period":"30d","tag":"ALL","pageNo":1,"pageSize":25}'172```173174### Parameters175176| Param | Type | Required | Description |177|---|---|---|---|178| `chainId` | string | **yes** | `"56"` or `"CT_501"` |179| `period` | string | **yes** | `"7d"` / `"30d"` / `"90d"` |180| `tag` | string | **yes** | `"ALL"` or `"KOL"` |181| `sortBy` | integer | no | Sort field |182| `orderBy` | integer | no | Order direction |183| `pageNo` | integer | no | Min 1 |184| `pageSize` | integer | no | Max 25 |185186**Min/Max filters:** `PNL` (decimal) · `winRate` (decimal, e.g. `1` = 1%) · `tx` (long) · `volume` (decimal).187188### Return fields (under `.data.data[]`)189190| Field | Type | Description |191|---|---|---|192| `address` / `addressLogo` / `addressLabel` | string | Wallet, avatar, display name |193| `balance` | string | On-chain native coin balance (chain-native gas token) |194| `tags` / `genericAddressTagList` | array | Tag info (e.g. KOL; detailed version has `tagName`, `logoUrl`, `extraInfo`) |195| `realizedPnl` / `realizedPnlPercent` | string | Period PnL in USD and % |196| `dailyPNL` | array | `[{realizedPnl, dt}]` per-day breakdown |197| `winRate` | string | Win rate for the period |198| `totalVolume` / `buyVolume` / `sellVolume` / `avgBuyVolume` | string | Volume breakdown (USD) |199| `totalTxCnt` / `buyTxCnt` / `sellTxCnt` | integer | Transaction counts |200| `totalTradedTokens` | integer | Number of distinct tokens traded |201| `topEarningTokens` | array | `[{tokenAddress, tokenSymbol, tokenUrl, realizedPnl, profitRate}]` |202| `tokenDistribution` | object | `{gt500Cnt, between0And500Cnt, between0AndNegative50Cnt, ltNegative50Cnt}` |203| `lastActivity` | number | Last activity timestamp (ms) |204205Pagination: `.data.current` / `.data.size` / `.data.pages`. `dailyPNL[]` entries are `{realizedPnl, dt}`. `topEarningTokens[]` entries are `{tokenAddress, tokenSymbol, tokenUrl, realizedPnl, profitRate}`.206207---208209## Errors210211Exit codes: `0` ok · `1` upstream/usage (stderr: reason; stdout: body with business `code`) · `3` network.212Business `code`: `000000` ok · `100004` rate-limited · `100002` bad param · `000400` token not found / unsupported chain.213214---215216## Notes217218- Icon URL prefix: `https://bin.bnbstatic.com` + `icon`/`logo`/`tokenIconUrl`.219- Most price / volume / market-cap fields are string-encoded decimals — parse before arithmetic.220