rwa-cli
v0.2.0
Published
CLI for tokenized real-world asset market discovery and quotes across venues.
Maintainers
Readme
rwa
rwa is a Node.js CLI for discovering tokenized real-world asset markets, resolving asset wrappers, and comparing live quotes across centralized exchanges, issuers, and onchain venues.
It is designed for research, monitoring, and downstream agent workflows where you need one command-line surface for:
- venue discovery
- symbol and wrapper resolution
- normalized quote comparison
- machine-friendly JSON and agent output
Requirements
- Node.js
20+ - npm
Current venue adapters:
bitgetbinancebingxcoingeckogatebitmartlbanktrade.xyzlightermexcondoourbitraydiumstablestockvestxtxstocks- issuer summaries from
rwa.xyz:dinari,securitize,superstate,wisdomtree,stokr,backed,remora,swarm
Current commands:
rwa venuesrwa assetsrwa discover <query>rwa discover <query> --refreshrwa discover-snapshot <query>rwa cache clearrwa config listrwa config set <key> <value>rwa config unset <key>rwa resolve <asset>rwa assets --venue lighterrwa quote tslarwa quote gold --json
Install
Clone the repo and install dependencies:
node --version
npm install
npm linkRun the CLI from the shell:
rwa quote tslaOr run it directly without linking:
node src/cli.js quote tslaPublish smoke check:
npm test
npm run pack:checkAfter logging into npm:
npm publishExamples
List supported venues:
rwa venuesList all discovered tokenized assets:
rwa assetsList assets on a specific venue:
rwa assets --venue trade.xyzQuery a specific asset across venues:
rwa quote tesla
rwa quote tsla
rwa quote TSLAONUSDT
rwa quote xau
rwa quote nvda --venue vestJSON output:
rwa quote tsla --json
rwa discover gold --jsonAgent-friendly output:
rwa discover alibaba --agent
rwa resolve tesla --agent
rwa quote TSLA --exact --agentDiscovery
Use discover first when you want to map an underlying asset to wrappers and venues:
rwa discover alibaba
rwa discover golddiscover uses:
- CoinMarketCap internal RWA endpoints for underlying assets, token wrappers, and venue lists
- Uniblock direct
CoinMarketCapcategory endpoints for broader tokenized stock and tokenized commodity asset coverage - Dinari
dSharesfor public stock-list discovery plusCMC*.Dwrappers for Dinari contract-address discovery - CoinGecko tokenized-gold markets for tokenized commodity discovery
Force a refresh if you want to bypass the 24-hour cache:
rwa discover gold --refreshBuild a normalized discovery snapshot for downstream ingestion:
rwa discover-snapshot gold --json
rwa discover-snapshot gold --out tmp/discovery-gold.jsonIf you have a CoinGecko key, export one of:
export COINGECKO_API_KEY=...
# or
export COINGECKO_PRO_API_KEY=...When either variable is set, rwa uses CoinGecko's Pro host automatically.
Optional onchain enrichment keys:
export BIRDEYE_API_KEY=...
export UNIBLOCK_API_KEY=...
export ODOS_API_KEY=...
export LIFI_API_KEY=...
export ONEINCH_API_KEY=...
export OKX_API_KEY=...
export OKX_SECRET_KEY=...
export OKX_API_PASSPHRASE=...
export ZEROX_API_KEY=...Or persist them locally:
rwa config set birdeye ...
rwa config set uniblock ...
rwa config set odos ...
rwa config set lifi ...
rwa config set 1inch ...
rwa config set okx ...
rwa config set okxsecret ...
rwa config set okxpassphrase ...
rwa config set 0x ...
rwa config listThe CLI loads environment variables first and falls back to ~/.config/rwa-cli/config.json.
For provider-specific coverage, rwa prefers sources that can run without API keys when possible, skips key-only providers when credentials are missing, and prints setup hints in terminal output when optional keys would widen coverage.
Discovery cache:
# optional, defaults to ./.cache/rwa
export RWA_CACHE_DIR=...
# optional, defaults to 24
export RWA_CACHE_TTL_HOURS=24
# optional, defaults to 1
export RWA_SLIPPAGE_CACHE_TTL_HOURS=1Notes
+/-2% liquidityis normalized as combined notional liquidity resting within 2% of the mid price when the venue exposes an order book.price deviationis computed as(venue price - Yahoo reference price) / Yahoo reference price * 100.- Some venues do not expose public bid/ask or order-book depth for these assets. Those fields are returned as
nulland shown as-in table output. - Lighter now uses public REST endpoints for mark/volume/OI/funding plus its public order-book websocket, so
bid,ask, and+/-2% liquidityare available when the websocket returns a live book snapshot. - XT's frontend uses the same public
market/publicticker and depth endpoints as the CLI. Some direct symbols such asgold_usdtstill publish an empty book there, sobid,ask, and+/-2% liquiditystaynull. - Ourbit's frontend uses open
platform/spot/marketendpoints, and the CLI now reads ticker plus live depth directly from those routes. - BingX spot is now connected through the public
openApimarket endpoints. The browser frontend still uses signed first-party calls internally, but the public spot ticker and depth routes are sufficient for native bid, ask, and+/-2%liquidity. - Yahoo reference prices come from Yahoo Finance's public
v8/finance/chartendpoint with symbol mapping for commodities and selected non-US assets. coingeckonow acts as a broader bootstrap source across tokenized stocks, commodities, silver, ETFs, real estate, and treasury categories. Those prices are not venue-native and will be replaced with native connectors over time.xstocksandondouseBirdeyeto enrich Solana and EVM token market data, holder count, market cap, and onchain market lists. The CLI will use nativeBIRDEYE_API_KEYif present, otherwise it falls back toUniblock direct/BirdeyeviaUNIBLOCK_API_KEY.xstocksnow usesJupiter's Solana quote API to estimate Solana-side+/-2% liquidity, with those slippage estimates cached for 1 hour by default.xstocksnow usesOdosfor Ethereum-side route-based+/-2% liquiditywhenODOS_API_KEYis set.ondonow usesLi.fiand1inchfor Ethereum and BNB Chain route-based+/-2% liquiditywhenLIFI_API_KEYandONEINCH_API_KEYare set, and keepsOdosas an additional EVM routing source where available.OKXwallet quote support is scaffolded, but it requires the fullOKX_API_PASSPHRASEin addition to key and secret before the CLI can use it.xstocksnow usesSTON.fion TON to enrich TON-side price, pool liquidity, and route-based+/-2% liquiditywhere TON pools exist.raydiumis now a first-class Solana venue in the CLI for xStocks wrappers that are live on Raydium pools.discovercurrently uses CoinMarketCap internal endpoints. They are effective for RWA discovery but are undocumented and may change.discoveralso usesUniblockdirectCoinMarketCapcategory endpoints, whenUNIBLOCK_API_KEYis set, to widen coverage for tokenized stock, commodities, silver, ETFs, real estate, and treasury categories.- discovery responses are cached on disk for 24 hours by default under
.cache/rwato avoid repeatedly pulling the same category and RWA listing data.
Sources
- Source strategy and rollout plan: docs/data-sources.md
Agent Mode
--agentreturns a stable JSON envelope withok,command,generatedAt,query, anddata.- Structured errors are emitted with machine-readable
error.code,error.message, anderror.details. resolvegives agents a deterministic first step for canonical symbol lookup before callingquote.quote --exactavoids fuzzy matching when an agent already knows the intended symbol.
Claude Code Plugin
This repo ships as a Claude Code plugin with built-in skills for AI-assisted RWA research.
Install
Add the plugin in Claude Code:
claude plugin add /path/to/rwa-cliWhat you get
rwa-researchskill (auto-triggered): When you mention tokenized assets, RWA tokens, venue coverage, or onchain liquidity in conversation, Claude automatically knows how to use therwaCLI to answer./rwacommand (user-invoked): Quick lookup shortcut.
/rwa quote tsla # cross-venue price comparison
/rwa discover gold # find tokenized gold wrappers
/rwa resolve nvda # canonical symbol + venue coverage
/rwa assets --venue ondo # list assets on a venue
/rwa venues # all supported venues
/rwa tsla # bare query, auto-detects commandPlugin structure
.claude-plugin/
plugin.json # plugin metadata
skills/
rwa-research/SKILL.md # auto-triggered on RWA-related queries
rwa/SKILL.md # /rwa slash command