Five lines to your
first Robinhood Chain trade

One import, sensible defaults, promise-first. Stock Token prices, multiplier-correct portfolios, trending memecoins, live launch streams, and swaps — chain ID 4663, public RPC by default. No wallet needed until you actually swap.

$ npm install hood-js viem Try it live Quickstart

Type a real call. Get a real answer.

loading viem + registry…

This runs live in your browser — real eth_calls to Robinhood Chain's public RPC and a real fetch to GeckoTerminal, using viem via esm.sh (no bundler, no server, no fake data). Supports price, prices, coins, and single-hop quote. portfolio and swap need the full package in Node.

>

Quickstart

Node ≥ 20. viem is a peer dependency.

npm install hood-js viem
import hood from 'hood-js'

const { usd } = await hood.price('AAPL')
console.log(`AAPL: $${usd}`)

const top = await hood.coins({ limit: 5 })
for (const c of top) console.log(c.symbol, `$${c.priceUsd}`, `${c.change24h}%`)

const q = await hood.quote({ sell: 'USDG', buy: 'WETH', amount: 100 })
const { hash, url } = await hood.swap({ ...q, wallet: process.env.PK })
console.log('done:', url)

API reference

Every read needs nothing — no key, no wallet. Only swap does.

CallReturnsWallet?
hood.price(symbol)live USD price for one Stock Tokenno
hood.prices([symbols])batched multicall, same orderno
hood.portfolio(address)multiplier-correct, USD-valued positionsno
hood.coins({ limit?, window? })trending memecoins (launchpads + Uniswap)no
hood.launches({ live? }, cb?)recent or streamed NOXA / Odyssey launchesno
hood.quote({ sell, buy, amount })a swap quote — spread into swap()no
hood.swap({ ...quote, wallet })executed swap: hash, url, amountsyes
hood.config({ ... })hood (chainable)
hood.testnet() / hood.mainnet()hood (chainable)
Stock Token eligibility. Stock Tokens are tokenized debt securities (issuer: Robinhood Assets (Jersey) Ltd) and may not be offered, sold, or delivered to US persons (additional limits: Canada, UK, Switzerland). Reading data is unrestricted; buying one throws until you call hood.config({ acknowledgeEligibility: true }), affirming eligibility. Memecoins are never gated.

One error type, always friendly

Never a raw viem stack trace — a HoodError with a plain-language message and a stable code.

Offline validation

Bad arguments (empty symbol, negative amount, missing wallet) fail instantly with BAD_INPUT — no network round-trip.

Typed codes

UNKNOWN_SYMBOL, NO_FEED, STALE_PRICE, NO_ROUTE, NEEDS_WALLET, NEEDS_ELIGIBILITY, and more.

cause preserved

The original hoodchain/viem error rides along on err.cause for debugging — nothing is hidden, just translated.