The power-user toolkit for
Robinhood Chain

Where hood-js hides complexity, hoodkit weaponizes it: reconnecting real-time streams, request-coalescing cache, multicall batching, a local SQLite indexer for holders and OHLCV, agent strategy primitives (PnL, TWAP, spend caps), and SSR-safe React hooks — all built on the hoodchain core SDK.

$ npm install hoodkit 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.

This board is the exact pattern streamPrices() wraps: poll every feed in one multicall, emit only on a changed Chainlink round. Here it's raw JSON-RPC so the page works with zero dependencies; the package version is a few lines with reconnect + backpressure handling.

Live launches — NOXA + The Odyssey

watching factory logs…
watching for new launches — this polls live, leave it open

The exact pattern streamLaunches() wraps: poll eth_getLogs for both factories, decode TokenLaunched / TokenCreated, advance a cursor only after a chunk fully delivers — so a dropped connection re-scans the missed range instead of silently skipping it.

Quickstart

Node ≥ 20. hoodchain and viem are peer dependencies. better-sqlite3, react, and ws are optional — only needed for the modules that use them.

npm install hoodkit hoodchain viem
import { createHoodClient } from 'hoodchain'
import { streamSwaps, createHoodCache, plan, createIndexer } from 'hoodkit'

const hood = createHoodClient()

// Reconnecting, gap-filled swap stream
const swaps = await streamSwaps(hood, { token: '0x…WEN' })
swaps.on('data', (s) => console.log(s.buysToken0 ? 'BUY' : 'SELL', s.price))

// Request-coalescing cache — 100 concurrent reads, 1 RPC call
const cache = createHoodCache(hood)
await Promise.all(Array.from({ length: 100 }, () => cache.getQuote('AAPL')))

// Local SQLite index: holders, OHLCV candles, 24h volume
const indexer = await createIndexer({ client: hood, path: './hood.sqlite', tokens: ['0x…'] })
await indexer.sync({ fromBlock: 0n })
console.log(indexer.holderCount('0x…'), indexer.candles('0x…', '1h'))

React hooks live at the hoodkit/react subpath:

import { HoodProvider, useQuote, useLaunches } from 'hoodkit/react'

function Ticker() {
  const { data } = useQuote('AAPL')
  return <span>{data ? `$${data.priceUsd.toFixed(2)}` : '…'}</span>
}

Modules

Import only what you use. Heavy deps (better-sqlite3, react) are optional peers — the core install stays light.

stream

Backpressure-safe Stream<T> (event-emitter AND async-iterator) over prices, swaps, launches, and portfolio changes. Gap-fill log cursor: a dropped connection re-scans the missed block range, never silently skips it.

Guide →

cache

Read-through cache with request coalescing — N concurrent identical reads become 1 upstream call — and per-datatype TTLs. Pluggable store: in-memory LRU by default, bring your own Redis adapter.

Guide →

batch

plan() batches arbitrary reads into the fewest Multicall3 round-trips, chunked and failure-isolated. createBatcher() is a DataLoader-style batcher: unrelated call sites sharing one tick collapse into one multicall automatically.

Guide →

indexer

A local SQLite indexer: incremental sync from the last synced block, holders(), candles() (real OHLCV from swap events), volume24h() — all answered with zero RPC once synced.

Guide →

strategy

What autonomous agents need: multiplier-aware Position PnL tracking, a TwapExecutor with per-slice slippage bounds and a hard SpendCap, price-cross triggers, and a real eth_call dry-run mode.

Guide →

react

hoodkit/react: useQuote, usePortfolio, useLaunches, useSwap over the stream/cache layers. SSR-safe — every subscription lives inside useEffect.

Guide →
Stock Token eligibility. hoodkit inherits hoodchain's eligibility gate: reads are unrestricted, but any swap whose output is a canonical Stock Token throws until the operator's client sets acknowledgeStockTokenEligibility: true. Stock Tokens are tokenized debt securities and may not be offered, sold, or delivered to US persons (additional limits: Canada, UK, Switzerland).

hoodkit vs hood-js vs the core SDK

An honest decision table. Most apps start with hood-js and never need more.

You needReach for
A quote, a swap, a portfolio read — one-off scripts, simple UIshoodchain directly
The friendliest possible API surface, sane defaults baked inhood-js
Real-time UI that must survive dropped connections without missing eventshoodkit (stream)
A backend serving many users hitting the same hot readshoodkit (cache + batch)
Holder counts, price charts, or trade history without re-scanning logs every requesthoodkit (indexer)
An autonomous agent that trades, tracks PnL, and must never overspendhoodkit (strategy)
A React dashboard wired to live chain datahoodkit/react

hoodkit depends on hoodchain for every primitive (addresses, ABIs, the client, the registry) — it never re-implements chain plumbing, only the operational layer around it: what happens when a socket drops, when 100 requests want the same data at once, or when you need six months of trade history without paying for it in RPC calls every time.