Stock brains are live on Robinhood Chain. Read any stock token with one API call →
Launch Console
Brain CloudBrain APIBrain StudioConsoleChain StatusStock Universe
Stock Chain
PricingBrain APIBrain RentalsGas and Fees
ResourcesDocumentationAPI ReferenceContracts
CompanyAbout UsTermsPrivacy
Launch Console
Home/Documentation

Documentation

How a brain reads Robinhood Chain, the Brain API reference, and the BrainStudio contract you deploy and rent basket brains with.

Overview

A stock brain is one Robinhood stock token on Robinhood Chain (chain 4663), read live from every Uniswap v3 pool it trades in. One Multicall3 call reads the price, liquidity, both balances and the 30 minute time-weighted average of every pool of every stock token in the universe, plus the WETH/USDG pool that turns WETH prices into dollars. From that one read each brain works out a price, its drift, its spread, its depth and a plain read.

A basket brain weights up to eight stock brains in basis points. You can price any basket over the API, and you can publish one to the BrainStudio contract so others can rent it by the day.

Quick start

curl https://brainstocks.network/api/v1/brains/NVDA
const res = await fetch("https://brainstocks.network/api/v1/brains/NVDA");
const { block, brain } = await res.json();
console.log(block, brain.priceUsd, brain.read, brain.why);

Brain API endpoints

Base URL https://brainstocks.network/api/v1. Every endpoint is a plain GET that answers JSON, needs no key and allows any origin.

EndpointAnswers
GET/brainsEvery stock brain, deepest first, with chain figures, the universe and the rules. Add ?lite=1 to leave out pool lists.
GET/brains/{symbol}One stock brain with every pool behind its price. NVDA, nvda and nvda-brain all work.
GET/brains?basket=NVDA:6000,SPY:4000A basket brain from the same block: index level, drift, capacity and each leg.

Fields

FieldMeaning
blockThe Robinhood Chain block every figure in the answer was read at.
priceUsdDepth-weighted mid of the live pools, in dollars.
twapUsdThe same price at the pools' 30 minute time-weighted average.
driftBpsDepth-weighted move of the live pools against their own 30 minute average, in basis points.
spreadBpsDistance between the dearest and the cheapest live pool. null with one live pool.
depthUsdThe thin side of every live pool, summed: about how much can trade before prices walk.
livePools / poolsPools that count right now, out of the pools the stock has.
read, whyThe plain read and the sentence that gave it (next section).
routeThe best two-pool route between this stock's pools and its edge after pool fees. Negative means the pools are in line.
poolListEach pool: fee tier, address, live or left out, price, depth and move against its average.

Reads and rules

A pool is live when both of its sides hold at least $200 and it has liquidity at its current price. The read is the first rule that matches, in this order. The thresholds come back in every answer under rules.

ReadRule
offlineNo live pool, so no price.
thinDepth under $2,000 across the live pools.
splitLive pools 150 bps or more apart.
rising50 bps or more above the 30 minute average.
falling50 bps or more below the 30 minute average.
steadyAnything else: within 50 bps of the average, pools in line.

A read describes the pools at one block. It is not a forecast and not advice.

Basket brains

Write a basket as SYMBOL:WEIGHT pairs joined by commas: 1 to 8 legs, whole basis points above 0, adding up to exactly 10000, no stock twice. The answer prices it as an index that is 100 at the 30 minute average:

index = 100 * sum(weight * priceUsd / twapUsd)
capacityUsd = min over legs of depthUsd / weight

capacityUsd is roughly how many dollars the whole basket could move before its thinnest leg runs out of depth. thin lists legs that read thin or offline.

Errors and limits

Errors answer {"ok": false, "error": "..."} in plain words: 400 for a bad basket, 404 for an unknown symbol, 502 when the chain did not answer in time. Answers are computed at most once every twelve seconds and cached at the edge for ten, so polling faster than that returns the same block.

BrainStudio contract

BrainStudio is not deployed yet. The console builds and prices baskets now, and deploys and rentals open at launch.

BrainStudio is a registry on Robinhood Chain. Anyone can deploy a basket brain: a name, 1 to 8 stock tokens from the allow-list, weights in basis points adding up to 10000, and a daily price in ETH (zero for free). Anyone can rent a brain for 1 to 365 days by paying exactly the price times the days. A rental extends the one you already hold. The creator is credited 95% and the BrainStocks treasury 5% (the fee is read from the contract and capped at 10%), and both withdraw on their own. The owner can change the allow-list, the fee (up to the cap) and the treasury, and can never move anyone's balance.

Functions

FunctionWhoWhat it does
deploy(name, stocks, weightsBps, pricePerDay)AnyonePublishes a basket brain and returns its id.
rent(id, days) payableAnyoneRents a brain; send exactly pricePerDay x days.
withdraw()Anyone owedPays out your balance.
setPrice(id, pricePerDay)CreatorChanges the daily price for new rentals.
retire(id)CreatorStops new rentals; rentals already paid run out normally.
expiry(id, user), rentalsOf(user), brainsOf(creator), owed(user)ReadWhat the console shows for your wallet.

Events

BrainDeployed, Rented, PriceSet, Retired, Withdrawn, StockSet, plus the ownership and fee events. The site reads state through view functions and never needs to scan logs.

Robinhood Chain

Chain id4663 (0x1237)
RPChttps://rpc.mainnet.chain.robinhood.com
Explorerrobinhoodchain.blockscout.com
Gas tokenETH

The console adds the chain to your wallet when you connect, if it is not there yet.