Back to Ccxt

query-token-info — CLI Reference

.agents/skills/query-token-info/references/cli.md

4.5.654.8 KB
Original Source

query-token-info — CLI Reference

Complete reference for every command in scripts/cli.mjs.

Invocation pattern: node <skill-dir>/scripts/cli.mjs <command> '<json_params>' Exit codes: 0 success · 1 usage/upstream error · 3 network failure


search — Search tokens by keyword

bash
node <skill-dir>/scripts/cli.mjs search '{"keyword":"<keyword>","chainIds":"56"}'

Parameters

ParamTypeRequiredDescription
keywordstringyesName / symbol / contract address
chainIdsstringnoComma-separated chainIds (e.g. "56", "1,56,8453,CT_501"); default: all
orderBystringnoSort key, e.g. volume24h

Return fields (under .data[])

FieldTypeDescription
chainIdstringChain identifier (e.g. "56" = BSC)
contractAddressstringToken contract address
tokenIdstringBinance-internal token ID (stable across address changes)
name, symbolstringToken display names
iconstringLogo path — prefix with https://bin.bnbstatic.com
price, percentChange24hstringLatest USD price and 24h change (%)
volume24h, marketCap, liquiditystringAll USD; string-encoded decimals
tagsInfoobjectRisk / recognition tags, categorized (e.g. "Sensitive Events": [...], "Community Recognition Level": [...])

meta — Static token metadata

bash
node <skill-dir>/scripts/cli.mjs meta '{"chainId":"56","contractAddress":"0x..."}'

Parameters

ParamTypeRequiredDescription
chainIdstringyesChain identifier
contractAddressstringyesToken contract address (case-insensitive)

Return fields (under .data)

FieldTypeDescription
tokenIdstringBinance-internal stable ID
name, symbol, decimalsDisplay name, ticker, precision
chainName, chainIconUrlstringChain display info
linksarray of {label, link}Website / whitepaper / social links
aiNarrativeFlagnumber1 = AI has narrative summary available
nativeAddressFlagbooleantrue = native chain coin (not an ERC-20)

links[] entries are {label, link} — labels include "website", "whitepaper", social platforms.


dynamic — Real-time market data

bash
node <skill-dir>/scripts/cli.mjs dynamic '{"chainId":"56","contractAddress":"0x..."}'

Parameters

ParamTypeRequiredDescription
chainIdstringyesChain identifier
contractAddressstringyesToken contract address

Return fields (under .data)

Price + volume/buy/sell breakdowns across multiple windows (5m, 1h, 4h, 24h), separated by on-chain vs Binance-routed:

Field patternMeaning
price, nativeTokenPriceCurrent USD price and chain-native price
volume{5m,1h,4h,24h}Total trading volume in window (USD)
volume{window}{Buy,Sell}Direction breakdown
volume{window}BinanceBinance-routed subset
volume{window}Net{Buy,Binance}Net flow = Buy − Sell
holdersHolder count (if available)
liquidityCurrent liquidity in USD

kline — Candlestick OHLCV

bash
node <skill-dir>/scripts/cli.mjs kline '{"chainId":"56","contractAddress":"0x...","interval":"1h","limit":24}'

Parameters

ParamTypeRequiredDescription
chainIdstringyesChain identifier — 1 (Ethereum) / 56 (BSC) / 8453 (Base) / CT_501 (Solana)
contractAddressstringyesToken contract address
intervalstringyesCandle size: 1s / 1min / 3min / 5min / 15min / 30min / 1h / 2h / 4h / 6h / 8h / 12h / 1d / 3d / 1w / 1m
limitnumbernoOptional. Max 500 per request. Has higher priority than from when both provided.
fromnumbernoOptional. Start timestamp in milliseconds.
tonumbernoOptional. End timestamp in milliseconds.
pmstringnoOptional. Price mode — p (price, default) or m (marketcap).

Return shape (under .data[])

Each row is a 2D array (7 numbers):

IndexField
[0]open price (USD)
[1]high price
[2]low price
[3]close price
[4]volume
[5]timestamp (ms since epoch, start of candle)
[6]trade count

Envelope is { data, status: {error_code, error_message} } — no code field (unlike other commands).


Errors

Exit codes: 0 ok · 1 upstream/usage (stderr: reason; stdout: body with business code) · 3 network. Business code: 000000 ok · 100004 rate-limited · 100002 bad param · 000400 token not found / unsupported chain.