The TypeScript SDK for
Robinhood Chain

Typed, tree-shakeable, viem-native. 95 verified Stock Tokens, Chainlink quotes with staleness guards, multiplier-correct portfolios, Uniswap v3 swaps, USDG, launchpad watchers for NOXA & The Odyssey, and the raw sequencer firehose — chain ID 4663.

$ npm install hoodchain viem Get started API reference

Stock Tokens, live

connecting to chain 4663…
Could not reach the public RPC (rpc.mainnet.chain.robinhood.com) from your browser. It may be briefly unavailable, or an extension is blocking cross-origin requests — check the explorer and reload.

Every price on this page is read client-side from Robinhood Chain's public RPC — one eth_call per Chainlink feed, refreshed every 15 s. Feeds are multiplier-adjusted token prices and update 24/5 following market hours.

Quickstart

Node ≥ 20. viem is a peer dependency; ws is optional (Node ≤ 21 firehose only).

npm install hoodchain viem
import { createHoodClient, getQuote, getPortfolio } from 'hoodchain'

const hood = createHoodClient()               // mainnet 4663, public RPC

// Chainlink quote (multiplier-adjusted token price, staleness-guarded)
const aapl = await getQuote(hood, 'AAPL')
console.log(`AAPL: $${aapl.priceUsd}`)

// Multiplier-correct portfolio for any address
const portfolio = await getPortfolio(hood, '0xYourAddress')
console.log(`total: $${portfolio.totalUsd.toFixed(2)}`)
for (const p of portfolio.positions) {
  console.log(`${p.symbol}: ${p.balanceTokens} tokens = ${p.shareEquivalent} shares → $${p.valueUsd}`)
}

Wallet operations take a viem account:

import { privateKeyToAccount } from 'viem/accounts'

const hood = createHoodClient({
  chain: 'testnet',
  account: privateKeyToAccount(process.env.ROBINHOOD_CHAIN_PRIVATE_KEY),
})
const { hash, receipt } = await executeSwap(hood, {
  tokenIn: TESTNET_ADDRESSES.weth,
  tokenOut: TESTNET_STOCK_TOKENS.NFLX,
  amountIn: parseEther('0.0001'),
})

Modules

Import only what you use — the package is side-effect-free and tree-shakeable.

client

Thin factory over viem pinned to the official robinhood / robinhoodTestnet chain definitions. Multicall batching on by default.

stocks

The 95-token registry, Chainlink quotes with a configurable staleness guard, ERC-8056 multipliers, and portfolios whose share math matches the token's own balanceOfUI().

swap

QuoterV2 quoting across every fee tier plus two-hop routes via WETH/USDG, slippage bounds, deadlines, and calldata for the canonical router on each network.

usdg

Paxos Global Dollar: verified address, 6-decimal parse/format, balances, transfers, approvals. (No EIP-2612 permit — verified on-chain.)

launchpads

Decoded launch, curve-trade, and graduation events for NOXA and The Odyssey — watchLaunches(), getRecentLaunches(), watchGraduations().

feed

Reconnecting client for the sequencer firehose: every transaction decoded ~100–300 ms before RPC, plus a simple watchTransfers() helper.

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; swaps that acquire a Stock Token throw until the operator sets acknowledgeStockTokenEligibility: true, affirming eligibility.

Verified, not vibes

Every address the SDK ships was verified during development — and is re-verified every time the registry regenerates (npm run refresh-registry).

95 tokens, one beacon

All canonical Stock Tokens are BeaconProxies onto one shared, source-verified Stock implementation. The registry asserts the beacon slot of every entry — a counterfeit token cannot slip in.

34 Chainlink feeds

Feed proxies come from Chainlink's official directory and each one answered latestRoundData() with a positive 8-decimal price at generation.

On-chain-linked Uniswap

The router, quoter, and factory were resolved by reading factory() / WETH9() on-chain — not copied from a chain-list. Both networks' flavors handled.