{"openapi":"3.1.0","info":{"title":"BStocks Launchpad API","version":"2026-09-30","description":"Read the launchpad (tokens paired with Coinbase tokenized stocks on Base) and build the exact transactions to trade or launch. No key and no login. Nothing is signed on the server: /api/tx returns calls for the visitor's own wallet. Amounts are integer strings in the smallest unit (a stock has 8 decimals, a launched token 18)."},"servers":[{"url":"https://launchpad.basestocks.finance"}],"externalDocs":{"description":"API reference with examples and Try it","url":"https://launchpad.basestocks.finance/docs/api"},"tags":[{"name":"Markets and tokens","description":"Read what the indexer recorded: tokens, prices, trades, candles, holders and wallets. Every figure comes from confirmed events or a live pool read."},{"name":"Trading and launching","description":"Quote a trade, pin a profile, and get the exact calls a wallet sends to trade or launch. Nothing here signs or sends a transaction."},{"name":"Eligibility","description":"Where the caller connects from, and the \"not a US person\" answer that quotes, pins and transaction builds wait for in a restricted country."},{"name":"Service","description":"Health of the indexer and the database, and this reference in machine-readable form."}],"paths":{"/api/markets":{"get":{"operationId":"markets","summary":"List markets","description":"Every launched token with its price, FDV, 24-hour volume and change, newest first or by volume.","tags":["Markets and tokens"],"parameters":[{"name":"stock","in":"query","required":false,"schema":{"description":"Only tokens paired with this stock.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},{"name":"creator","in":"query","required":false,"schema":{"description":"Only tokens this address launched.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},{"name":"q","in":"query","required":false,"schema":{"description":"Search name or symbol, up to 64 characters.","type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"description":"Rows to return.","type":"integer","minimum":1,"maximum":200,"default":50},"example":"5"},{"name":"offset","in":"query","required":false,"schema":{"description":"Rows to skip.","type":"integer","minimum":0,"maximum":10000,"default":0}},{"name":"orderBy","in":"query","required":false,"schema":{"description":"Sort order.","type":"string","enum":["newest","volume24h"],"default":"newest"}}],"responses":{"200":{"description":"{ markets: Market[], asOf } · asOf is when the indexer last advanced","content":{"application/json":{"schema":{"type":"object","description":"{ markets: Market[], asOf } · asOf is when the indexer last advanced"}}}},"default":{"description":"400 INVALID_QUERY · 400 INVALID_STOCK · 400 INVALID_CREATOR","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":true}},"/api/stocks":{"get":{"operationId":"stocks","summary":"List quote stocks","description":"The Coinbase tokenized stocks a token can pair with, with the latest Chainlink price, feed status and number of launches.","tags":["Markets and tokens"],"responses":{"200":{"description":"{ stocks: Stock[] }","content":{"application/json":{"schema":{"type":"object","description":"{ stocks: Stock[] }"}}}},"default":{"description":"503 STOCKS_UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":true}},"/api/tokens/{address}":{"get":{"operationId":"token","summary":"Get one token","description":"The market row with fees, lifetime figures, pool reserves and links. A launch that is confirmed but not indexed yet answers status \"indexing\", read from its factory.","tags":["Markets and tokens"],"parameters":[{"name":"address","in":"path","required":true,"schema":{"description":"The launched token.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"example":"0xb20000000000000000000023b657130129ad33e5"}],"responses":{"200":{"description":"{ status: \"indexed\", market, details, launch, profile } | { status: \"indexing\", launch }","content":{"application/json":{"schema":{"type":"object","description":"{ status: \"indexed\", market, details, launch, profile } | { status: \"indexing\", launch }"}}}},"default":{"description":"400 INVALID_ADDRESS · 400 INVALID_QUERY · 404 TOKEN_NOT_FOUND · 429 RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":true,"x-rate-limit-per-minute":120}},"/api/tokens/{address}/swaps":{"get":{"operationId":"swaps","summary":"List trades","description":"A token's swaps, newest first, with the creator's own trades flagged. Page back with the block and log index of the last row.","tags":["Markets and tokens"],"parameters":[{"name":"address","in":"path","required":true,"schema":{"description":"The launched token.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"example":"0xb20000000000000000000023b657130129ad33e5"},{"name":"limit","in":"query","required":false,"schema":{"description":"Rows to return.","type":"integer","minimum":1,"maximum":200,"default":50},"example":"10"},{"name":"before","in":"query","required":false,"schema":{"description":"Only swaps before this block.","type":"integer"}},{"name":"beforeLog","in":"query","required":false,"schema":{"description":"With before: the log index within that block.","type":"integer","minimum":0}}],"responses":{"200":{"description":"{ token, stock, stockUsd, swaps: Swap[] }","content":{"application/json":{"schema":{"type":"object","description":"{ token, stock, stockUsd, swaps: Swap[] }"}}}},"default":{"description":"400 INVALID_ADDRESS · 400 INVALID_QUERY · 404 TOKEN_NOT_FOUND · 429 RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":true,"x-rate-limit-per-minute":120}},"/api/tokens/{address}/candles":{"get":{"operationId":"candles","summary":"Get candles","description":"OHLCV in stock units per bucket, each with the stock's USD price that was live when it printed.","tags":["Markets and tokens"],"parameters":[{"name":"address","in":"path","required":true,"schema":{"description":"The launched token.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"example":"0xb20000000000000000000023b657130129ad33e5"},{"name":"bucket","in":"query","required":false,"schema":{"description":"Bucket width in minutes.","type":"string","enum":["1","5","15","60","240","1440"],"default":"1"},"example":"60"},{"name":"from","in":"query","required":false,"schema":{"description":"ISO date: first bucket.","type":"string"}},{"name":"to","in":"query","required":false,"schema":{"description":"ISO date: last bucket.","type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"description":"Buckets to return.","type":"integer","minimum":1,"maximum":2000,"default":500},"example":"24"}],"responses":{"200":{"description":"{ token, interval, quote: { symbol, usd }, candles: { time, open, high, low, close, volumeStock, volumeToken, trades, stockUsd }[] }","content":{"application/json":{"schema":{"type":"object","description":"{ token, interval, quote: { symbol, usd }, candles: { time, open, high, low, close, volumeStock, volumeToken, trades, stockUsd }[] }"}}}},"default":{"description":"400 INVALID_ADDRESS · 400 INVALID_QUERY · 404 TOKEN_NOT_FOUND · 429 RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":true,"x-rate-limit-per-minute":120}},"/api/tokens/{address}/holders":{"get":{"operationId":"holders","summary":"List holders","description":"Balances ranked, with the pool, the creator and burned dust labelled, and how concentrated the supply is.","tags":["Markets and tokens"],"parameters":[{"name":"address","in":"path","required":true,"schema":{"description":"The launched token.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"example":"0xb20000000000000000000023b657130129ad33e5"},{"name":"limit","in":"query","required":false,"schema":{"description":"Rows to return.","type":"integer","minimum":1,"maximum":500,"default":100},"example":"10"}],"responses":{"200":{"description":"{ token, holderCount, concentration, holders: { rank, address, label, balance, sharePercent }[] }","content":{"application/json":{"schema":{"type":"object","description":"{ token, holderCount, concentration, holders: { rank, address, label, balance, sharePercent }[] }"}}}},"default":{"description":"400 INVALID_ADDRESS · 400 INVALID_QUERY · 404 TOKEN_NOT_FOUND · 429 RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":true,"x-rate-limit-per-minute":120}},"/api/tokens/{address}/image":{"get":{"operationId":"image","summary":"Get the token image","description":"The image bytes from this site's own origin, at most 5 MB. Link it with ?v= as the market row gives it: a matching v on an ipfs:// image is cached for good.","tags":["Markets and tokens"],"parameters":[{"name":"address","in":"path","required":true,"schema":{"description":"The launched token.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"example":"0xb20000000000000000000023b657130129ad33e5"},{"name":"v","in":"query","required":false,"schema":{"description":"First 12 hex of the image URI's sha256.","type":"string"}}],"responses":{"200":{"description":"image bytes","content":{"image/*":{"schema":{"type":"string","format":"binary"}}}},"default":{"description":"400 INVALID_ADDRESS · 404 TOKEN_NOT_FOUND · 404 NO_IMAGE · 413 IMAGE_TOO_LARGE · 415 NOT_AN_IMAGE · 502 IMAGE_UNREACHABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":false}},"/api/tokens/{address}/dex-paid":{"get":{"operationId":"dexPaid","summary":"DEX Screener paid status","description":"Whether the token has a paid DEX Screener profile: approved, pending, none or unavailable. Cached for five minutes; 20 calls a minute per caller.","tags":["Markets and tokens"],"parameters":[{"name":"address","in":"path","required":true,"schema":{"description":"The launched token.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"example":"0xb20000000000000000000023b657130129ad33e5"}],"responses":{"200":{"description":"{ status }","content":{"application/json":{"schema":{"type":"object","description":"{ status }"}}}},"default":{"description":"400 INVALID_ADDRESS · 429 RATE_LIMITED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":false}},"/api/tokens/{address}/profile":{"get":{"operationId":"profile","summary":"Get the creator profile","description":"The creator-signed profile of a fixed-profile token: description, image, website, X, Telegram. Null when the creator never signed one.","tags":["Markets and tokens"],"parameters":[{"name":"address","in":"path","required":true,"schema":{"description":"The launched token.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"example":"0xb20000000000000000000023b657130129ad33e5"}],"responses":{"200":{"description":"{ profile: { description, imageUri, website, twitter, telegram, signer, updatedAt } | null }","content":{"application/json":{"schema":{"type":"object","description":"{ profile: { description, imageUri, website, twitter, telegram, signer, updatedAt } | null }"}}}},"default":{"description":"400 INVALID_ADDRESS","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":false},"post":{"operationId":"profileUpdate","summary":"Update the creator profile","description":"Multipart: a payload field with the EIP-712 TokenProfile the creator signed, and the image whose keccak256 it names. Stored only when the signer is the launch creator. A token with an editable profile changes it onchain instead (409).","tags":["Markets and tokens"],"parameters":[{"name":"address","in":"path","required":true,"schema":{"description":"The launched token.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"example":"0xb20000000000000000000023b657130129ad33e5"}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"payload":{"description":"JSON: signer, signature, description, website, twitter, telegram, imageHash, issuedAt.","type":"string"},"image":{"description":"The new image; its keccak256 must equal imageHash.","type":"string","format":"binary"}},"required":["payload"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ ok: true, ... }","content":{"application/json":{"schema":{"type":"object","description":"{ ok: true, ... }"}}}},"default":{"description":"400 INVALID_FORM · 400 INVALID_PAYLOAD · 400 INVALID_FIELDS · 409 ONCHAIN_PROFILE · 4xx from the signature check","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":false}},"/api/wallet/{address}":{"get":{"operationId":"wallet","summary":"Get a wallet","description":"What an address launched, holds, earned as a creator and can claim now, with its recent trades.","tags":["Markets and tokens"],"parameters":[{"name":"address","in":"path","required":true,"schema":{"description":"Any wallet.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"example":"0x1111111111111111111111111111111111111111"}],"responses":{"200":{"description":"{ wallet, created, holdings, holdingsUsd, claimable, claimableUsd, recentSwaps, ... }","content":{"application/json":{"schema":{"type":"object","description":"{ wallet, created, holdings, holdingsUsd, claimable, claimableUsd, recentSwaps, ... }"}}}},"default":{"description":"400 INVALID_ADDRESS · 429 RATE_LIMITED · 503 WALLET_UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":true,"x-rate-limit-per-minute":60}},"/api/activity":{"get":{"operationId":"activity","summary":"Activity feed","description":"Launches and swaps as one feed, newest first. Poll it to follow the launchpad; there is no webhook.","tags":["Markets and tokens"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"description":"Rows to return.","type":"integer","minimum":1,"maximum":200,"default":50},"example":"10"},{"name":"token","in":"query","required":false,"schema":{"description":"Only this token.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},{"name":"actor","in":"query","required":false,"schema":{"description":"Only this trader or creator.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}}],"responses":{"200":{"description":"{ items: { kind: \"launch\" | \"swap\", at, txHash, token, name, symbol, ... }[], asOf }","content":{"application/json":{"schema":{"type":"object","description":"{ items: { kind: \"launch\" | \"swap\", at, txHash, token, name, symbol, ... }[], asOf }"}}}},"default":{"description":"400 INVALID_QUERY · 400 INVALID_TOKEN · 400 INVALID_ACTOR · 503 ACTIVITY_UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":true}},"/api/stats":{"get":{"operationId":"stats","summary":"Platform totals","description":"Launches, traders, swaps, volume and fees, with the fees and volume per stock.","tags":["Markets and tokens"],"responses":{"200":{"description":"{ launches, creators, traders, swaps, holders, volumeUsd, feesUsd, volumeByStock, feesByStock, topCreators, asOf, ... }","content":{"application/json":{"schema":{"type":"object","description":"{ launches, creators, traders, swaps, holders, volumeUsd, feesUsd, volumeByStock, feesByStock, topCreators, asOf, ... }"}}}},"default":{"description":"503 STATS_UNAVAILABLE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":false}},"/api/names":{"get":{"operationId":"names","summary":"Resolve Basenames","description":"Base names for up to 100 addresses at once, memoised on the server.","tags":["Markets and tokens"],"parameters":[{"name":"a","in":"query","required":true,"schema":{"description":"Comma-separated addresses.","type":"string"},"example":"0x1111111111111111111111111111111111111111"}],"responses":{"200":{"description":"{ names: { [address]: name | null } }","content":{"application/json":{"schema":{"type":"object","description":"{ names: { [address]: name | null } }"}}}}},"x-partner-cors":false}},"/api/launch-config":{"get":{"operationId":"launchConfig","summary":"Launch configuration","description":"The factory, hook and router new launches use, the builder code, the deadline and the form limits. The creation fee and opening valuation are left out on purpose: read them from the factory right before the wallet opens, or let POST /api/tx/launch do it.","tags":["Trading and launching"],"responses":{"200":{"description":"{ chainId, factory, hook, router, deployBlock, builderCode, deadlineSeconds, limits, urls }","content":{"application/json":{"schema":{"type":"object","description":"{ chainId, factory, hook, router, deployBlock, builderCode, deadlineSeconds, limits, urls }"}}}},"default":{"description":"503 NOT_CONFIGURED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":true}},"/api/quote":{"post":{"operationId":"quote","summary":"Quote a trade","description":"An exact-input quote from the Uniswap v4 Quoter against the token's own pool, including a launch that is confirmed but not indexed yet.","tags":["Trading and launching"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"description":"The launched token.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"side":{"description":"buy spends the stock, sell spends the token.","type":"string","enum":["buy","sell"]},"amountIn":{"description":"Input in its smallest unit: 8 decimals for a stock, 18 for a token. An integer string.","type":"string","pattern":"^[1-9][0-9]*$"}},"required":["token","side","amountIn"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ amountIn, amountOut, feeBps, midPrice, executionPrice, priceImpactPercent, poolKey, zeroForOne, gasEstimate, liquidity }","content":{"application/json":{"schema":{"type":"object","description":"{ amountIn, amountOut, feeBps, midPrice, executionPrice, priceImpactPercent, poolKey, zeroForOne, gasEstimate, liquidity }"}}}},"default":{"description":"400 INVALID_BODY · 404 TOKEN_NOT_FOUND · 409 NO_LIQUIDITY · 429 RATE_LIMITED · 451 REGION_RESTRICTED · 503 NOT_CONFIGURED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":true,"x-rate-limit-per-minute":120,"x-eligibility":"Answers 451 from a restricted country until the visitor confirms they are not a US person."}},"/api/tx/swap":{"post":{"operationId":"txSwap","summary":"Build a swap","description":"The calls for one exact-input trade, for the account that will send them: an approval of exactly amountIn to the token's router when the allowance is short, then swapExactIn with the minimum output and a ten-minute deadline. The swap is simulated when no approval is needed.","tags":["Trading and launching"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"description":"The launched token.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"side":{"description":"buy spends the stock, sell spends the token.","type":"string","enum":["buy","sell"]},"amountIn":{"description":"Input in its smallest unit. An integer string.","type":"string","pattern":"^[1-9][0-9]*$"},"account":{"description":"The wallet that sends the calls and pays the input.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"recipient":{"description":"Who receives the output. Defaults to account.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"slippageBps":{"description":"Tolerance below the quote, in basis points.","type":"integer","minimum":10,"maximum":500,"default":100},"builderCode":{"description":"Your ERC-8021 builder code. It goes on every call beside the launchpad's, so the transaction is attributed to both.","type":"string"}},"required":["token","side","amountIn","account"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ calls: { to, data, value, description }[], quote, approval, deadline, expiresAt, simulation, router, tokenIn, tokenOut }","content":{"application/json":{"schema":{"type":"object","description":"{ calls: { to, data, value, description }[], quote, approval, deadline, expiresAt, simulation, router, tokenIn, tokenOut }"}}}},"default":{"description":"400 INVALID_BODY · 400 INVALID_AMOUNT · 404 TOKEN_NOT_FOUND · 409 NO_LIQUIDITY · 429 RATE_LIMITED · 451 REGION_RESTRICTED · 502 TX_FAILED · 503 NOT_CONFIGURED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":true,"x-rate-limit-per-minute":30,"x-eligibility":"Answers 451 from a restricted country until the visitor confirms they are not a US person."}},"/api/metadata":{"post":{"operationId":"metadata","summary":"Pin a token profile","description":"Multipart: pins the image and the ERC-7572 document to IPFS and returns the contractURI a launch takes. With token, it pins a new profile for an editable token, keeping its name and symbol. 10 pins an hour per caller.","tags":["Trading and launching"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"description":"1 to 64 characters.","type":"string"},"symbol":{"description":"A to Z and 0 to 9, up to 16.","type":"string"},"description":{"description":"Up to 1,000 characters.","type":"string"},"website":{"description":"An https link.","type":"string"},"twitter":{"description":"An X handle or x.com link.","type":"string"},"telegram":{"description":"A Telegram handle or t.me link.","type":"string"},"image":{"description":"PNG, WebP, JPEG or GIF, up to 2 MB.","type":"string","format":"binary"},"token":{"description":"An editable token to pin a new profile for.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"}},"required":["name","symbol"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ contractURI, imageUri, metadata }","content":{"application/json":{"schema":{"type":"object","description":"{ contractURI, imageUri, metadata }"}}}},"default":{"description":"400 INVALID_FIELDS · 400 IMAGE_INVALID · 409 PROFILE_FIXED · 409 PROFILE_LOCKED · 429 RATE_LIMITED · 451 REGION_RESTRICTED · 502 UPLOAD_FAILED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":true,"x-eligibility":"Answers 451 from a restricted country until the visitor confirms they are not a US person."}},"/api/tx/launch":{"post":{"operationId":"txLaunch","summary":"Build a launch","description":"The calls that launch a token from the account: an approval of exactly stockIn to the factory when a buy at launch needs one, then launchWithOptions or launchAndBuy with the creation fee as value. The account is the creator and earns 70% of every fee. Send the same salt to keep the same token address.","tags":["Trading and launching"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account":{"description":"The creator's wallet, which sends the calls.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"name":{"description":"1 to 64 bytes.","type":"string"},"symbol":{"description":"A to Z and 0 to 9, up to 16.","type":"string"},"contractURI":{"description":"ipfs://, as POST /api/metadata returns it.","type":"string"},"stock":{"description":"The stock it trades against.","type":"string","pattern":"^0x[0-9a-fA-F]{40}$"},"metadataEditable":{"description":"Let the creator point the token at a new profile later. Needs a bare-CID contractURI.","type":"boolean","default":false},"salt":{"description":"Fixes the token address; random when absent.","type":"string","pattern":"^0x[0-9a-fA-F]{64}$"},"buy":{"type":"object","description":"A buy for the creator in the same transaction.","properties":{"stockIn":{"description":"Stock to spend, 8 decimals. An integer string.","type":"string","pattern":"^[1-9][0-9]*$"},"toleranceBps":{"description":"How far the opening price may move before the launch reverts.","type":"integer","minimum":50,"maximum":500,"default":200},"acknowledgeShare":{"description":"Required once the buy is 15% of the supply or more.","type":"boolean"}},"required":["stockIn"],"additionalProperties":false},"builderCode":{"description":"Your ERC-8021 builder code. It goes on every call beside the launchpad's, so the transaction is attributed to both.","type":"string"}},"required":["account","name","symbol","contractURI","stock"],"additionalProperties":false}}}},"responses":{"200":{"description":"{ calls, functionName, predictedToken, salt, creationFee, openingFdvUsd8, buy, approval, deadline, expiresAt, simulation, tokenUrl }","content":{"application/json":{"schema":{"type":"object","description":"{ calls, functionName, predictedToken, salt, creationFee, openingFdvUsd8, buy, approval, deadline, expiresAt, simulation, tokenUrl }"}}}},"default":{"description":"400 INVALID_BODY · 400 UNKNOWN_STOCK · 409 STOCK_NOT_ENABLED · 409 BUY_TOO_LARGE · 409 SHARE_UNCONFIRMED · 409 SHARE_LIMIT · 429 RATE_LIMITED · 451 REGION_RESTRICTED · 502 TX_FAILED · 503 NOT_CONFIGURED","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":true,"x-rate-limit-per-minute":30,"x-eligibility":"Answers 451 from a restricted country until the visitor confirms they are not a US person."}},"/api/region":{"get":{"operationId":"region","summary":"Where the caller is","description":"The country the host reports, the mode, and whether quotes, pins and transaction builds wait for the eligibility answer.","tags":["Eligibility"],"responses":{"200":{"description":"{ country, blocked, mode, blockedCountry, attested, restricted }","content":{"application/json":{"schema":{"type":"object","description":"{ country, blocked, mode, blockedCountry, attested, restricted }"}}}}},"x-partner-cors":true},"post":{"operationId":"regionConfirm","summary":"Give the eligibility answer","description":"The visitor's own statement that they do not live in the United States and are not a US citizen or resident, kept as a cookie for 30 days. Refused from another site's page. A site that asks in its own UI sends x-bstocks-eligibility: confirmed on each request instead.","tags":["Eligibility"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"description":"true to confirm, false to withdraw.","type":"boolean"}},"required":["confirm"],"additionalProperties":false}}}},"responses":{"200":{"description":"the same as GET, and a Set-Cookie","content":{"application/json":{"schema":{"type":"object","description":"the same as GET, and a Set-Cookie"}}}},"default":{"description":"400 INVALID_BODY · 403 CROSS_SITE","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-partner-cors":false}},"/api/health":{"get":{"operationId":"health","summary":"Health","description":"Database, schema version, contracts, indexer lag and chain head. ok is false while the schema is behind or a launch hook is not configured.","tags":["Service"],"responses":{"200":{"description":"{ ok, database, schema, contracts, deployments, indexer, head }","content":{"application/json":{"schema":{"type":"object","description":"{ ok, database, schema, contracts, deployments, indexer, head }"}}}}},"x-partner-cors":true}},"/api/openapi.json":{"get":{"operationId":"openapi","summary":"OpenAPI spec","description":"This reference as OpenAPI 3.1, for Swagger, Postman, code generators and AI agents. Any origin may fetch it.","tags":["Service"],"responses":{"200":{"description":"OpenAPI 3.1 document","content":{"application/json":{"schema":{"type":"object","description":"OpenAPI 3.1 document"}}}}},"x-partner-cors":true}}},"components":{"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object"}}}}}}}}