Stax for developers
Build with tokenized stock baskets.
Put a live Stax basket on your site, or pull basket prices and holdings into your own app, bot or AI agent. Live data from Robinhood Chain, priced by Chainlink. Free to use with an API key.
A live basket card, one line of code.
Drop this into any page. It shows the live price, chart and holdings, and the Buy button opens Stax tagged with your project.
<iframe src="https://stax.finance/embed/mag7?theme=light&ref=yourproject" width="380" height="500" style="border:0" loading="lazy" title="Stax basket"></iframe>
- theme light or dark.
- ref your project tag, so visits and mints from your embed are credited to you.
- Nothing inside the embed connects a wallet or touches funds. Buying always happens on stax.finance.
Basket data for any app or agent.
Read-only JSON over HTTPS. Send your key in the x-api-key header. Data refreshes about every 30 seconds.
Get an API key
Connect your wallet in the top bar to create a free key. Your wallet signs a short message to prove it's you. It costs nothing and isn't a transaction.
GET /api/v1/basketsEvery live basket with its price, TVL, holdings and links.GET /api/v1/baskets/{id}One basket. Add ?history=24h or ?history=7d for recorded price history.const res = await fetch("https://stax.finance/api/v1/baskets/mag7", {
headers: { "x-api-key": process.env.STAX_API_KEY },
});
const basket = await res.json();
console.log(basket.name, basket.priceUsd, basket.holdings);Response (shortened){
"id": "mag7",
"symbol": "sMAG7",
"name": "Mag 7",
"chainId": 4663,
"token": "0x…",
"priceUsd": 1.0421,
"tvlUsd": 5230.12,
"status": "live",
"holdings": [
{ "symbol": "AAPL", "weightPct": 14.29, "priceFeed": "chainlink", … }
],
"mintAsset": { "symbol": "USDG", "decimals": 6, … },
"links": { "page": "…", "mint": "…", "embed": "…" },
"updatedAt": "2026-11-12T12:00:00.000Z"
}- priceUsd is USD per basket token, computed on-chain from the vault. It is null when a basket is empty or a read fails, never a made-up number.
- status is live, empty, not_onchain or unavailable.
- Baskets are minted with USDG on Robinhood Chain (chain id 4663). Send users to links.mint to buy.
- Limits: 120 requests a minute per key. Errors come back as JSON with an error message: 401 for a missing or revoked key, 429 when you're over the limit.
- Mint quotes and ready-to-sign transactions, so apps and AI agents can buy a basket in one call. The user's wallet always signs.
- Partner stats for embeds: the visits and mints your project sends.
- Revenue share on every mint you bring.
