Skip to content
StockSync
Docs · CLI

Interfaces

StockSync CLI

stocksync reads Robinhood Chain Stock Token data from StockSync Core. It is read-only: it never signs, transfers, or trades, and nothing it prints is investment advice.

Commands

CommandWhat it shows
stocksync get <symbol|address>Registry entry: canonical contract, multiplier, ISIN, session tradability
stocksync price <symbol>Raw underlying bid and ask, and the token-equivalent value (quote × current multiplier)
stocksync oracle <symbol>Chainlink feed price of one token, heartbeat, pause flag, underlying conversion
stocksync verify <address> [--symbol T] [--strict]Whether a contract is a canonical Stock Token deployment on the selected chain
stocksync inspect <symbol|address>Registry entry, quote, registry vs onchain multiplier, trading status, recent actions
stocksync search <query> [--limit n]Tokens ranked by ticker, address, ISIN, and name
stocksync list [--limit n]Every registry token in ticker order
stocksync actions [symbol] [--limit n]Processed corporate actions, newest process date first
stocksync status <symbol>Asset status, active trading halt, whole and fractional tradability per session
stocksync chainNetwork configuration; configured RPC URLs are never printed
stocksync help [command], stocksync versionHelp and version

Global options: --json, --plain, --chain <mainnet|testnet|4663|46630>, -h/--help, --version.

price and oracle are separate on purpose: API quotes are the raw underlying equity, while Chainlink feeds already include the corporate-action multiplier.

Output

  • Terminal: aligned, colored when stdout is a terminal. Labels stack above values below 60 columns, and wide tables shrink their name column.
  • --plain: no color and ASCII-only symbols. NO_COLOR also disables color; FORCE_COLOR enables it for piped output.
  • --json: one JSON document on stdout, never mixed with other text.
json
{
  "schemaVersion": 1,
  "command": "get",
  "ok": true,
  "data": { "symbol": "NVDA", "": "…" },
  "freshness": { "source": "robinhood-stock-token-api", "fetchedAt": "…", "cache": "miss" },
  "sources": [],
  "warnings": []
}

Failures with --json print { "schemaVersion": 1, "command": "get", "ok": false, "error": { "code", "message", "retryable", "upstream", "issues" } } on stdout. Without --json, errors and warnings go to stderr and stdout stays clean.

Exit codes

CodeMeaning
0Success (including a completed verify without --strict)
1Unexpected internal error
2Invalid usage or input (unknown option, bad address, chain)
3Not found (unlisted symbol, no Chainlink feed)
4Upstream failure (API, RPC, or feed directory)
5Invalid environment configuration
6verify --strict: not canonical for the expected ticker
130Interrupted with Ctrl+C
bash
# Fail a deploy script unless the address is the canonical NVDA contract
stocksync verify "$TOKEN" --symbol NVDA --strict || exit 1

# Every ticker, one per line
stocksync list --json | jq -r '.data[].symbol'

Environment

VariablePurpose
STOCKSYNC_CHAINDefault chain when --chain is not given
STOCKSYNC_RPC_URL_MAINNETDedicated mainnet RPC (the public endpoint is rate-limited)
STOCKSYNC_RPC_URL_TESTNETDedicated testnet RPC
STOCKSYNC_HTTP_TIMEOUT_MSPer-request timeout, 500 to 60000 ms
STOCKSYNC_API_BASE_URLStock Token API base URL
STOCKSYNC_CHAINLINK_FEEDS_URLChainlink feed directory for mainnet