Built onRobinhood Chain
Put the stock market in your app.
Stocklayer is the trading API for tokenized stocks.
import { StocklayerClient } from "@stocklayer/sdk";const stocklayer = new StocklayerClient({ baseUrl: "https://stocklayer.dev/api/v0", apiKey: process.env.STOCKLAYER_PROJECT_KEY,});// Plan a trade with the funded sandbox wallet.const plan = await stocklayer.trades.plan({ wallet: "0x0000000000000000000000000000000000000001", intent: { type: "exact_input", tokenIn: "USDG", tokenOut: "NVDA", amountIn: "500", },});console.log(plan.status, plan.verdict.outcome);console.log(plan.signing.unsignedTransactions);Official Stocklayer packages on npm. OpenAPI spec
The US stock market is now on a public chain.
Explore the underlying network: Robinhood Chain explorer. Network activity is not Stocklayer usage. Discover supported assets through the asset API.
- NVDA
- AAPL
- TSLA
- NFLX
- MSFT
- AMZN
- GOOGL
- META
Trading them well is hard. An app has to find the real contract among lookalikes, price it across venues, build the approve and swap in the right order, and inspect simulation evidence before a user signs.
Stocklayer does all four in one call.
- Trading apps
- Wallets
- Bots
- Agents
Everything in the API.
Market data and trade building. Try every endpoint with a free test key.
Know the market
Every Stock Token, priced and current.
- Assets
The real contract for every Stock Token, with its multiplier and trading status.
- Prices
The stock reference price and the onchain token price, side by side.
- Corporate actions
Splits, dividends, and multiplier changes, surfaced before they hit a trade.
- Portfolios
Balances and positions for any wallet, at a known block.
Build the trade
From a symbol to transactions ready to sign.
- Quotes
Exact input or exact output, with the route and explicit minimum-output or maximum-input bounds.
- Routing
Provider quotes normalized into one inspectable route.
- Trade plans
Approve and swap, built in order and returned unsigned. Stored and replayable.
- Simulation
The whole sequence run against the chain before you see it.
- Policy verdicts
Your rules applied to every plan. Allow, warn, or block, with reasons.
Built for AI agents too.
Claude, Cursor, and any MCP client get eight tools backed by the same Stocklayer API.
{ "mcpServers": { "stocklayer": { "command": "npx", "args": ["-y", "@stocklayer/mcp"], "env": { "STOCKLAYER_PROJECT_KEY": "stocklayer_test_..." } } }}Local MCP server · Eight tools · Free sandbox. Requires Node.js 22.13+. Create a test key in the dashboard with all four scopes, then replace stocklayer_test_... in your client configuration. Follow the MCP quickstart.
Common questions.
- What is Stocklayer?
- A trading API for tokenized stocks on Robinhood Chain. One call finds the real token, prices it, builds the transactions, and simulates them. Your wallet signs. Apps, wallets, bots, and AI agents build on it.
- Does Stocklayer ever hold my funds or keys?
- No. Stocklayer returns unsigned transactions. Your wallet reviews, signs, and submits every one. Nothing moves until it says so.
- Which stocks can I trade?
- Discover Stock Tokens on Robinhood Chain, from NVDA and AAPL to TSLA and META. The API follows Robinhood’s asset catalog and resolves each symbol to its canonical contract and trading status.
- What can my agent do?
- Eight MCP tools connect your agent to the same Stocklayer API, simulation, and project policy. Every trade plan has an explainable allow, warn, or block verdict. Your wallet signs.
- How fast can I ship?
- Install the SDK, create a test key in the dashboard, and run the quickstart. It builds your first checked trade plan with simulated USDG and a funded sandbox wallet. Test keys use fixture data, not real liquidity. Live quotes and trade plans are not available yet; follow the docs for current availability.
- Is Stocklayer affiliated with Robinhood?
- No. Stocklayer is an independent project building on Robinhood Chain, the public chain where Robinhood issues Stock Tokens.