{"openapi":"3.1.0","info":{"title":"Gifted Stock agent API","version":"1.5.1","description":"Every write endpoint answers with a plan: unsigned transactions the caller signs and sends from its own wallet, in order. The server holds no key and sends nothing.\n\nThe guide is https://www.giftedstock.com/SKILL.md. Check every plan with the skill's verify.mjs before signing it.\n\nSend \"skill\": \"1.5.1\" in every POST body and ?skill=1.5.1 on GET /api/agent/v1 and /tokens: without it answers are skill 1.2.0's.\n\nAmounts are decimal strings in the token's own units, addresses are checksummed or all lowercase and ids are decimal strings. A refusal is { error, message } with its status; a 429 says how long to wait in retry-after and retryIn. Each endpoint has its own per-address limit a minute.\n\nPartners and campaigns: besides tx/partner and tx/campaign here, the join routes (/api/campaign/...) and the partner routes (/api/partner/...) live outside /api/agent and are not described in this document; GET /api/agent/v1?skill=1.5.1 lists them under join and partner."},"servers":[{"url":"https://www.giftedstock.com"}],"tags":[{"name":"read","description":"Public reads: no wallet needed."},{"name":"write","description":"Plans of unsigned transactions for your own wallet."},{"name":"session","description":"The agent token for partner and campaign work."}],"security":[{},{"apiKey":[]}],"paths":{"/api/agent/v1":{"get":{"operationId":"getIndex","summary":"Chains, contracts, fees and every endpoint","description":"The front door: both chains, every contract a step is sent to or approves, every function a step calls with its selector, the fees, how long each plan stays good and the list of endpoints. With ?skill=1.5.1 the list includes the partner and campaign routes outside /api/agent.","tags":["read"],"parameters":[{"name":"skill","in":"query","required":false,"description":"The skill version you follow, like \"1.5.1\". Without it the answer is skill 1.2.0's.","schema":{"$ref":"#/components/schemas/Skill"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Index"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"}}}},"/api/agent/v1/openapi.json":{"get":{"operationId":"getOpenapi","summary":"This OpenAPI document","description":"The agent API described as OpenAPI 3.1, for code generators and tool builders.","tags":["read"],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","description":"An OpenAPI 3.1 document."}}}},"401":{"$ref":"#/components/responses/BadKey"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"}}}},"/api/agent/v1/boxes":{"get":{"operationId":"getBoxes","summary":"The four mystery boxes now","description":"Each mystery box on Base and Robinhood Chain: its price, odds, bonus pot, the ETH price of one, the open fee and the onchain equities it pays out right now.","tags":["read"],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"boxes":{"type":"array","items":{"$ref":"#/components/schemas/Box"},"description":"Four boxes: normal and premium on each chain."}},"required":["boxes"]}}}},"401":{"$ref":"#/components/responses/BadKey"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"}}}},"/api/agent/v1/tokens":{"get":{"operationId":"getTokens","summary":"What can be swapped on a chain","description":"Every token the API swaps on one chain with its address, decimals, how its trades are priced and its price now, and each one's `trade`: whether it trades now (a `caution` says why not), what it trades for, its fee, its smallest trade and its pools' depth with a word for it (deep, good, thin, very thin). `market` says whether the US stock market is open. With skill 1.3.0 or later the tokens on Base (cbBTC, BNKR...) are listed too. Prices are for showing: a swap plan reads its own.","tags":["read"],"parameters":[{"name":"chain","in":"query","required":true,"description":"The chain to list.","schema":{"$ref":"#/components/schemas/Chain"}},{"name":"skill","in":"query","required":false,"description":"The skill version you follow, like \"1.5.1\". Without it the answer is skill 1.2.0's.","schema":{"$ref":"#/components/schemas/Skill"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenList"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/agent/v1/quote":{"get":{"operationId":"getQuote","summary":"Quote a swap without a wallet","description":"What an amount gets on one chain now: the amount out, the minimum, the fee, the route and how far the price is from its reference (Chainlink or the pool). The swap plan's own quote with no wallet asked; a bridge is quoted with its plan. For showing: POST /tx/swap quotes again.","tags":["read"],"parameters":[{"name":"chain","in":"query","required":false,"description":"The chain (base if left out).","schema":{"$ref":"#/components/schemas/Chain"}},{"name":"sell","in":"query","required":true,"description":"What is sold, by its symbol (USDC, ETH, NVDAc...).","schema":{"type":"string"}},{"name":"buy","in":"query","required":true,"description":"What is bought, by its symbol.","schema":{"type":"string"}},{"name":"amount","in":"query","required":true,"description":"How much of sell, as a decimal string.","schema":{"type":"string","pattern":"^\\d+(\\.\\d+)?$"}},{"name":"skill","in":"query","required":false,"description":"The skill version you follow, like \"1.5.1\". Without it the answer is skill 1.2.0's.","schema":{"$ref":"#/components/schemas/Skill"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"chain":{"type":"string"},"sell":{"type":"string"},"buy":{"type":"string"},"amount":{"type":"string"},"quote":{"type":"object","additionalProperties":true,"description":"As a swap plan's summary: from, to (expectedOut, minimumOut), fee, route, priceCheck."},"note":{"type":"string"}},"required":["chain","sell","buy","amount","quote"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"409":{"$ref":"#/components/responses/Conflict"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Busy"}}}},"/api/agent/v1/wallet/{address}":{"get":{"operationId":"getWallet","summary":"A wallet's balances and mystery boxes","description":"What a wallet holds on both chains: ETH and every token the API trades with more than nothing, then its mystery boxes sealed, opening and opened, each with a card picture. `complete` false means some boxes may be missing from this read.","tags":["read"],"parameters":[{"name":"address","in":"path","required":true,"description":"The wallet.","schema":{"$ref":"#/components/schemas/Address"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletAnswer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Busy"}}}},"/api/agent/v1/box/{chain}/{box}/{id}":{"get":{"operationId":"getBox","summary":"One mystery box and its prize","description":"One box's owner and state. Once opened it names the stock token it paid, the amount and the dollars at the price it opened at; while opening it names its batch and when you may settle it yourself.","tags":["read"],"parameters":[{"name":"chain","in":"path","required":true,"description":"The box's chain.","schema":{"$ref":"#/components/schemas/Chain"}},{"name":"box","in":"path","required":true,"description":"Which box.","schema":{"$ref":"#/components/schemas/BoxKind"}},{"name":"id","in":"path","required":true,"description":"The box (token) id.","schema":{"$ref":"#/components/schemas/Id"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoxStatus"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Busy"}}}},"/api/agent/v1/gifts":{"get":{"operationId":"getGifts","summary":"A wallet's gift boxes and the gifts it made","description":"The gift boxes a wallet received (sealed: from whom and their note; opened: what they held), the gifts it made with what is left on each link and what waits in the gift contract for it. Both lists come newest first.","tags":["read"],"parameters":[{"name":"wallet","in":"query","required":true,"description":"The wallet to read.","schema":{"$ref":"#/components/schemas/Address"}},{"name":"limit","in":"query","required":false,"description":"Only the newest N of `received` and of `created`; the answer's `more` says which list was cut. Without it, every one.","schema":{"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftsAnswer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Busy"}}}},"/api/agent/v1/gift/{batchId}":{"get":{"operationId":"getGiftLink","summary":"A gift link's public facts","description":"One gift link: open or not, boxes left, who may claim and when, who made it, its note and what each box holds.","tags":["read"],"parameters":[{"name":"batchId","in":"path","required":true,"description":"The gift's batch id (from its share URL's `batch=`).","schema":{"$ref":"#/components/schemas/Id"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftLink"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"404":{"$ref":"#/components/responses/NotFound"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"}}}},"/api/agent/v1/verify":{"get":{"operationId":"getVerify","summary":"Whether a wallet may join verified-only campaigns","description":"Whether a wallet counts as verified for campaigns that ask for it and each way it can get there: boxes opened, onchain equities traded, Coinbase, Ethos, a listed NFT, X or Farcaster. Any one way is enough.","tags":["read"],"parameters":[{"name":"wallet","in":"query","required":true,"description":"The wallet to read.","schema":{"$ref":"#/components/schemas/Address"}},{"name":"fresh","in":"query","required":false,"description":"1 reads the Coinbase badge again past its one-minute cache (a tighter limit: 10 a minute).","schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VerifyAnswer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/agent/v1/history":{"get":{"operationId":"getHistory","summary":"What a wallet has done with its boxes","description":"A wallet's history newest first: mystery boxes bought, opened, sent and received on both chains and gift boxes made, claimed, sent, received and opened. 25 lines a list a page; follow `next` for older pages. Read from the index, so it may trail the chain by a minute.","tags":["read"],"parameters":[{"name":"wallet","in":"query","required":true,"description":"The wallet to read.","schema":{"$ref":"#/components/schemas/Address"}},{"name":"before","in":"query","required":false,"description":"Only lines older than this time (exclusive), as an ISO time with Z or an offset, like 2026-11-28T12:00:00.000Z. A page's `next` gives it.","schema":{"type":"string","format":"date-time"}},{"name":"list","in":"query","required":false,"description":"One list only. Without it, both.","schema":{"type":"string","enum":["boxes","gifts"]}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HistoryAnswer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"}}}},"/api/agent/v1/session":{"get":{"operationId":"getSession","summary":"The sign-in message for an agent token","description":"A Sign-In with Ethereum message for the wallet, good for ten minutes and once. Sign it with personal_sign (EIP-191) and POST it back for a token.","tags":["session"],"parameters":[{"name":"wallet","in":"query","required":true,"description":"The wallet to read.","schema":{"$ref":"#/components/schemas/Address"}}],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The message to sign."},"sign":{"type":"string","description":"How to sign it."}},"required":["message","sign"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Unavailable"}}},"post":{"operationId":"postSession","summary":"Trade a signed message for an agent token","description":"Checks the wallet's signature over the message from GET and answers an agent token good for 24 hours. Send it as `Authorization: Bearer <token>` to tx/partner, tx/campaign, tx/basket/create and the partner routes. Keep it secret like a key.","tags":["session"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The message GET answered, exactly as it was."},"signature":{"type":"string","description":"The wallet's personal_sign signature over it.","pattern":"^0x[0-9a-fA-F]+$"},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow, like \"1.5.1\". Left out, the answer is skill 1.2.0's (its contracts, no app-fee slot on gifts): send \"1.5.1\"."}},"required":["message","signature"]}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","description":"The wallet, all lowercase."},"token":{"type":"string","description":"The agent token.","pattern":"^gsa_"},"expiresAt":{"type":"string","description":"When it stops working.","format":"date-time"},"hours":{"type":"integer","description":"How long it lasts: 24."},"use":{"type":"string","description":"How to use it."}},"required":["wallet","token","expiresAt","hours"]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"operationId":"deleteSession","summary":"Sign the wallet out everywhere","description":"Stops every agent token and every site sign-in of the token's wallet. Only a valid token can sign its own wallet out.","tags":["session"],"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"type":"string","description":"The wallet signed out."},"signedOut":{"type":"boolean","const":true},"note":{"type":"string","description":"What stopped working."}},"required":["wallet","signedOut"]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"agentToken":[]},{"agentToken":[],"apiKey":[]}]}},"/api/agent/v1/tx/buy":{"post":{"operationId":"postTxBuy","summary":"Buy mystery boxes","description":"The transactions that buy sealed mystery boxes into your wallet: an exact approval when paying with the chain's dollar or one call carrying ETH with 1% over the quote (the box sends the change back).","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address","description":"Your own wallet: the one that signs and sends every step. What a plan brings always goes to it."},"chain":{"$ref":"#/components/schemas/Chain"},"box":{"$ref":"#/components/schemas/BoxKind"},"quantity":{"type":"integer","minimum":1,"maximum":200,"description":"How many boxes."},"payWith":{"type":"string","description":"\"ETH\" (the default) or the chain's dollar: \"USDC\" on Base, \"USDG\" on Robinhood Chain.","enum":["ETH","USDC","USDG"],"default":"ETH"},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow, like \"1.5.1\". Left out, the answer is skill 1.2.0's (its contracts, no app-fee slot on gifts): send \"1.5.1\"."}},"required":["wallet","chain","box","quantity"]}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPlan"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Busy"}}}},"/api/agent/v1/tx/open":{"post":{"operationId":"postTxOpen","summary":"Open mystery boxes","description":"The call that opens sealed boxes you hold, carrying the open fee in ETH (the box sends back what is over). Without `ids` it opens every sealed box of that kind the wallet holds, up to 200 (10 such calls a minute). Prizes land in the wallet within seconds.","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address","description":"Your own wallet: the one that signs and sends every step. What a plan brings always goes to it."},"chain":{"$ref":"#/components/schemas/Chain"},"box":{"$ref":"#/components/schemas/BoxKind"},"ids":{"$ref":"#/components/schemas/IdList","description":"The boxes to open, 1 to 200. Left out: every sealed box of this kind the wallet holds."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow, like \"1.5.1\". Left out, the answer is skill 1.2.0's (its contracts, no app-fee slot on gifts): send \"1.5.1\"."}},"required":["wallet","chain","box"]}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPlan"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Busy"}}}},"/api/agent/v1/tx/send":{"post":{"operationId":"postTxSend","summary":"Send sealed mystery boxes to a wallet","description":"The call that sends sealed boxes to another wallet; they arrive sealed. On Robinhood Chain a recipient that is a smart wallet on Base with nothing at that address on Robinhood Chain is refused unless `confirmRecipient` is true.","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address","description":"Your own wallet: the one that signs and sends every step. What a plan brings always goes to it."},"chain":{"$ref":"#/components/schemas/Chain"},"box":{"$ref":"#/components/schemas/BoxKind"},"ids":{"$ref":"#/components/schemas/IdList","description":"The boxes to send, 1 to 200."},"to":{"type":"string","description":"The recipient: an address or a name ending .eth or .base.eth."},"confirmRecipient":{"type":"boolean","const":true,"description":"True only when the recipient's owner confirmed they control that address on Robinhood Chain."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow, like \"1.5.1\". Left out, the answer is skill 1.2.0's (its contracts, no app-fee slot on gifts): send \"1.5.1\"."}},"required":["wallet","chain","box","ids","to"]}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPlan"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Busy"}}}},"/api/agent/v1/tx/settle":{"post":{"operationId":"postTxSettle","summary":"Settle your own boxes left opening","description":"For a box the keeper left opening for an hour: the call that settles its batch from your own wallet. On Base, a batch with no random number for a week goes back to sealed instead (the open fee is not refunded). Earlier than that is a refusal that says when.","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address","description":"Your own wallet: the one that signs and sends every step. What a plan brings always goes to it."},"chain":{"$ref":"#/components/schemas/Chain"},"box":{"$ref":"#/components/schemas/BoxKind"},"id":{"$ref":"#/components/schemas/Id","description":"One opening box of the batch."},"acceptForfeit":{"type":"boolean","const":true,"description":"True only when your human accepts losing prizes in a stock token that cannot be sent right now."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow, like \"1.5.1\". Left out, the answer is skill 1.2.0's (its contracts, no app-fee slot on gifts): send \"1.5.1\"."}},"required":["wallet","chain","box","id"]}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPlan"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Busy"}}}},"/api/agent/v1/tx/swap":{"post":{"operationId":"postTxSwap","summary":"Swap on one chain or bridge between chains","description":"A swap on one chain (tokenized stocks on Base, stock tokens on Robinhood Chain, tokens, the chain's dollar and ETH) or a bridge of USDC, USDG or ETH between Base and Robinhood Chain through Relay. Every quote is read and checked at the request; what comes out always goes to `wallet`. Approvals are exact. No other fields are taken.","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address","description":"Your own wallet: the one that signs and sends every step. What a plan brings always goes to it."},"from":{"$ref":"#/components/schemas/SwapSide","description":"What you pay."},"to":{"$ref":"#/components/schemas/SwapSide","description":"What you get. A different chain from `from` makes it a bridge."},"amount":{"$ref":"#/components/schemas/Amount","description":"How much of the `from` token, in its own units."},"acceptPoolPriceBps":{"type":"integer","minimum":0,"maximum":1000,"description":"Says yes to a token with no Chainlink price trading this far off its pool's price, in basis points. Send it only after a confirm_pool_price refusal named the number."},"regularWallet":{"type":"boolean","const":true,"description":"For a bridge from a wallet that has sent nothing on its chain yet: true says it is a regular wallet (a private key), not a smart wallet."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow, like \"1.5.1\". Left out, the answer is skill 1.2.0's (its contracts, no app-fee slot on gifts): send \"1.5.1\"."}},"required":["wallet","from","to","amount"],"additionalProperties":false}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPlan"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Busy"}}}},"/api/agent/v1/tx/gift":{"post":{"operationId":"postTxGift","summary":"Make a gift box: to wallets or behind a link","description":"Exact approvals, then the call that makes gift boxes on Base: one box to each wallet in `to` or a link anyone allowed can claim from. Each box holds `items`, bought with USDC or ETH as the gift is made; 2.5% on top. For a link, make a fresh key locally and send only its address. A body with a field that looks like a private key is refused. The body may be up to 4.5 MB (a list link's wallets).","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftRequest"}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPlan"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Busy"}}}},"/api/agent/v1/tx/gift/claim":{"post":{"operationId":"postTxGiftClaim","summary":"Claim a box from a gift link","description":"Two calls. Without `signature`: the EIP-712 typed data the link's key signs for your wallet (the key after #k= in the share URL; never send it). With it: the claim's plan, tried on the chain first.","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address","description":"Your own wallet: the one that signs and sends every step. What a plan brings always goes to it."},"batchId":{"$ref":"#/components/schemas/Id","description":"The link's batch id (its share URL's `batch=`)."},"signature":{"type":"string","description":"The link key's EIP-712 signature over the typed data the first call gave.","pattern":"^0x[0-9a-fA-F]{130}$"},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow, like \"1.5.1\". Left out, the answer is skill 1.2.0's (its contracts, no app-fee slot on gifts): send \"1.5.1\"."}},"required":["wallet","batchId"]}}}},"responses":{"200":{"description":"Without a signature: what to sign (action \"gift_claim_sign\", no steps). With one: the claim's plan (action \"gift_claim\").","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ClaimSignRequest"},{"$ref":"#/components/schemas/AgentPlan"}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/agent/v1/tx/gift/open":{"post":{"operationId":"postTxGiftOpen","summary":"Open gift boxes","description":"The call that opens sealed gift boxes your wallet holds, up to 200; what each holds goes to the wallet.","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address","description":"Your own wallet: the one that signs and sends every step. What a plan brings always goes to it."},"ids":{"$ref":"#/components/schemas/IdList","description":"The gift boxes to open, 1 to 200."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow, like \"1.5.1\". Left out, the answer is skill 1.2.0's (its contracts, no app-fee slot on gifts): send \"1.5.1\"."}},"required":["wallet","ids"]}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPlan"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/agent/v1/tx/gift/take-back":{"post":{"operationId":"postTxGiftTakeBack","summary":"Take back boxes nobody claimed from your link","description":"For the link's maker: the call that takes back every box still unclaimed. Once mined, nothing more can be claimed from that link.","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address","description":"Your own wallet: the one that signs and sends every step. What a plan brings always goes to it."},"batchId":{"$ref":"#/components/schemas/Id","description":"The link's batch id."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow, like \"1.5.1\". Left out, the answer is skill 1.2.0's (its contracts, no app-fee slot on gifts): send \"1.5.1\"."}},"required":["wallet","batchId"]}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPlan"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/agent/v1/tx/basket":{"post":{"operationId":"postTxBasket","summary":"Buy boxes of a basket","description":"Boxes of a basket someone published on giftedstock.com/basket, each holding its mix at today's prices, bought through the gift router to your wallet with 2.5% on top (the maker's 1% among it when you buy someone else's). Needs skill 1.3.0 or later. No other fields are taken.","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address","description":"Your own wallet: the one that signs and sends every step. What a plan brings always goes to it."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow: \"1.3.0\" or later, like \"1.5.1\"."},"basket":{"type":"string","description":"The basket's code (5 lowercase letters and digits, at least one digit) or its link https://www.giftedstock.com/basket/<code>."},"quantity":{"type":"integer","minimum":1,"maximum":100,"description":"How many boxes.","default":1},"payWith":{"type":"string","description":"USDC or ETH.","enum":["USDC","ETH"],"default":"USDC"}},"required":["wallet","skill","basket"],"additionalProperties":false}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPlan"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/BadKey"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Busy"}}}},"/api/agent/v1/tx/basket/create":{"post":{"operationId":"postTxBasketCreate","summary":"Make a basket and buy its first box","description":"Reserves a new basket for your wallet and answers its first box to buy; the basket goes live at giftedstock.com/basket/<code> when that box lands. You earn 1% on every box someone else buys. Needs skill 1.5.0 and your agent token. No other fields are taken.","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address","description":"Your wallet: the one your agent token is for."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow: \"1.5.1\" or later."},"name":{"type":"string","description":"The basket's name: 1 to 24 letters, digits, spaces or . , ! ? ' - & (shown in capitals). No ticker alone.","minLength":1,"maxLength":24},"items":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string","description":"A Coinbase stock token on Base (NVDAc, TSLAc...) or a token (cbBTC, BNKR...), by ticker or address. Not USDC or AI12."},"usd":{"type":"string","description":"Dollars of it in each box, up to 2 places, at least \"0.01\".","pattern":"^\\d{1,7}(\\.\\d{1,2})?$"}},"required":["token","usd"]},"description":"2 to 20 tokens; their dollars add up to the box price.","minItems":2,"maxItems":20},"payWith":{"type":"string","description":"USDC or ETH.","enum":["USDC","ETH"],"default":"USDC"}},"required":["wallet","skill","name","items"],"additionalProperties":false}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPlan"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"agentToken":[]},{"agentToken":[],"apiKey":[]}]}},"/api/agent/v1/tx/partner":{"post":{"operationId":"postTxPartner","summary":"A partner's campaign vault transaction","description":"By `action`: \"create\" a partner on the campaign vault (the partner fee; no agent token needed), \"withdraw\" free boxes from its pool back to your wallet or name or remove a \"manager\". Needs skill 1.5.0. After sending, register or count it on the partner routes as the plan's notes say.","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PartnerCreate"},{"$ref":"#/components/schemas/PartnerWithdraw"},{"$ref":"#/components/schemas/PartnerManager"}],"discriminator":{"propertyName":"action","mapping":{"create":"#/components/schemas/PartnerCreate","withdraw":"#/components/schemas/PartnerWithdraw","manager":"#/components/schemas/PartnerManager"}}}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPlan"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"agentToken":[]},{"agentToken":[],"apiKey":[]},{},{"apiKey":[]}]}},"/api/agent/v1/tx/campaign":{"post":{"operationId":"postTxCampaign","summary":"Launch, raise or cancel a campaign or claim its boxes","description":"By `action`: \"launch\" a saved campaign through the campaign vault, \"raise\" it by more winners, \"cancel\" it before it starts or \"claim\" the boxes your wallet won. Needs skill 1.5.0 and your agent token. After sending, count it on the partner or campaign route as the plan's notes say.","tags":["write"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/CampaignLaunch"},{"$ref":"#/components/schemas/CampaignRaise"},{"$ref":"#/components/schemas/CampaignCancel"},{"$ref":"#/components/schemas/CampaignClaim"}],"discriminator":{"propertyName":"action","mapping":{"launch":"#/components/schemas/CampaignLaunch","raise":"#/components/schemas/CampaignRaise","cancel":"#/components/schemas/CampaignCancel","claim":"#/components/schemas/CampaignClaim"}}}}}},"responses":{"200":{"description":"The answer.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentPlan"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"413":{"$ref":"#/components/responses/TooLarge"},"429":{"$ref":"#/components/responses/TooMany"},"502":{"$ref":"#/components/responses/Failed"},"503":{"$ref":"#/components/responses/Unavailable"}},"security":[{"agentToken":[]},{"agentToken":[],"apiKey":[]}]}}},"components":{"schemas":{"Address":{"type":"string","description":"An EVM address: checksummed or all lowercase. Mixed case that is not its checksum is refused.","pattern":"^0x[0-9a-fA-F]{40}$"},"Amount":{"type":"string","description":"A decimal amount as a string, like \"10.5\": no sign, no exponent, no more places than the token has.","pattern":"^\\d+(\\.\\d+)?$"},"Id":{"type":"string","description":"A whole number as a decimal string (a JSON number is also taken).","pattern":"^\\d{1,30}$"},"IdList":{"type":"array","items":{"$ref":"#/components/schemas/Id"},"description":"Box ids, each once.","minItems":1,"maxItems":200,"uniqueItems":true},"Skill":{"type":"string","description":"A skill version like 1.5.0.","pattern":"^1\\.\\d{1,3}\\.\\d{1,3}$","examples":["1.5.1"]},"Chain":{"type":"string","description":"base (chain id 8453) or robinhood (Robinhood Chain, chain id 4663).","enum":["base","robinhood"]},"BoxKind":{"type":"string","description":"Which mystery box.","enum":["normal","premium"]},"Error":{"type":"object","properties":{"error":{"type":"string","description":"A code for your logic, like insufficient_funds or confirm_pool_price."},"message":{"type":"string","description":"What went wrong, in words for your human."}},"required":["error","message"]},"Busy":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"retryIn":{"type":"integer","description":"busy only: seconds to wait, as the retry-after header says (until the next 00:00 UTC)."}}}]},"RateLimited":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"retryIn":{"type":"integer","description":"Seconds to wait, as the retry-after header says."},"limit":{"type":"string","description":"The limit you hit, like 30 a minute on this endpoint."}},"required":["retryIn"]}]},"AgentStep":{"type":"object","properties":{"chain":{"$ref":"#/components/schemas/Chain"},"chainId":{"type":"integer","description":"8453 or 4663."},"to":{"$ref":"#/components/schemas/Address"},"data":{"type":"string","description":"The calldata; on Base the builder code follows the arguments.","pattern":"^0x[0-9a-fA-F]*$"},"value":{"type":"string","description":"Wei to send, as a decimal string.","pattern":"^\\d+$"},"valueEth":{"type":"string","description":"The same value in ETH."},"description":{"type":"string","description":"What it does, for your human."}},"required":["chain","chainId","to","data","value","valueEth","description"],"description":"One transaction to sign and send from your wallet, exactly as it is."},"AgentPlan":{"type":"object","properties":{"action":{"type":"string","description":"What the plan does, like buy, open, swap, bridge, gift_create or campaign_launch."},"chain":{"$ref":"#/components/schemas/Chain"},"steps":{"type":"array","items":{"$ref":"#/components/schemas/AgentStep"},"description":"Send in order, each once the one before has confirmed."},"summary":{"type":"object","additionalProperties":true,"description":"The money in and out, the fee and the quote as strings with units named: show it to your human before sending."},"validUntil":{"type":"integer","description":"Unix seconds after which the plan's checks no longer hold: build it again rather than send it late."},"notes":{"type":"array","items":{"type":"string"},"description":"What to know before and after sending."}},"required":["action","chain","steps","summary"],"description":"Unsigned transactions for your own wallet. Check them with the skill's verify.mjs before signing."},"ClaimSignRequest":{"allOf":[{"$ref":"#/components/schemas/AgentPlan"},{"type":"object","properties":{"sign":{"type":"object","properties":{"with":{"type":"string","description":"Which key signs: the link's key, after #k= in the share URL."},"typedData":{"type":"object","additionalProperties":true,"description":"EIP-712 typed data: domain, types, primaryType Claim and message { batchId, claimer }."}},"required":["with","typedData"]}},"required":["sign"]}]},"Index":{"type":"object","properties":{"name":{"type":"string","description":"Gifted Stock."},"site":{"type":"string","description":"The site.","format":"uri"},"skill":{"type":"string","description":"The guide agents read: SKILL.md.","format":"uri"},"chains":{"type":"object","additionalProperties":true,"description":"Each chain's id, explorer, public RPC, dollar token and onchain equities."},"contracts":{"type":"object","additionalProperties":true,"description":"By chain: every address a step is sent to or approves, other than the token approved."},"feeWallet":{"$ref":"#/components/schemas/Address"},"functions":{"type":"object","additionalProperties":true,"description":"Every function a step calls, with its signature and selector."},"inside":{"type":"object","additionalProperties":true,"description":"What may sit inside a multicall or execute step."},"builderCode":{"type":"object","additionalProperties":true,"description":"The bytes after a Base step's arguments."},"plansLast":{"type":"object","additionalProperties":{"type":["integer","null"]},"description":"Seconds each kind of plan stays good; null for none."},"fees":{"type":"object","additionalProperties":{"type":"string"}},"rules":{"type":"array","items":{"type":"string"},"description":"The rules every plan keeps."},"endpoints":{"type":"object","additionalProperties":{"type":"object","additionalProperties":{"type":"string"}},"description":"Groups (read, write, join, partner) of \"METHOD path\" to what it does."}},"required":["name","site","skill","chains","contracts","endpoints"]},"Box":{"type":"object","properties":{"chain":{"$ref":"#/components/schemas/Chain"},"box":{"$ref":"#/components/schemas/BoxKind"},"address":{"$ref":"#/components/schemas/Address"},"priceUsd":{"type":"string","description":"The box price in dollars."},"payWith":{"type":"array","items":{"type":"string"},"description":"ETH and the chain's dollar."},"ethPriceForOne":{"anyOf":[{"type":"string","description":"ETH for one box now; null when it cannot be read."},{"type":"null"}]},"openFeeEth":{"anyOf":[{"type":"string","description":"The open fee in ETH now; null when it cannot be read."},{"type":"null"}]},"maxPerTransaction":{"type":"integer"},"expiresDays":{"type":"integer","description":"A sealed box can be opened or sent for this many days."},"odds":{"type":"array","items":{"type":"object","properties":{"prizeUsd":{"type":"string","description":"A prize in dollars."},"chancePct":{"type":"number"}},"required":["prizeUsd","chancePct"]},"description":"Each prize and its chance."},"bonusPot":{"anyOf":[{"type":"object","properties":{"oneIn":{"type":"integer"},"prizeUsd":{"type":"string"},"whenShortUsd":{"type":"string"},"potUsd":{"type":"string"}}},{"type":"null"}]},"payingNow":{"type":"array","items":{"type":"string"},"description":"The onchain equities it pays out right now."}},"required":["chain","box","address","priceUsd","odds","payingNow"]},"TokenList":{"type":"object","properties":{"chain":{"$ref":"#/components/schemas/Chain"},"chainId":{"type":"integer"},"tokens":{"type":"array","items":{"type":"object","properties":{"symbol":{"type":"string","description":"As the site writes it: NVDAc on Base, NVDA on Robinhood Chain."},"name":{"type":"string"},"kind":{"type":"string","description":"money (ETH and the dollar), a stock token or a token (Base, skill 1.3.0 or later).","enum":["money","stock","token"]},"address":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Null for ETH."},{"type":"null"}]},"decimals":{"type":"integer"},"chainlinkFeed":{"type":"boolean","description":"A Chainlink feed prices its trades."},"priceFrom":{"type":"string","description":"What a trade in it is held to.","enum":["chainlink","pool","robinhood","dollar"]},"inBoxes":{"type":"boolean","description":"A mystery box pays it out."},"priceUsd":{"anyOf":[{"type":"string","description":"Its price now, for showing."},{"type":"null"}]},"marketClosed":{"type":"boolean","const":true,"description":"The stock market looks closed: a trade may be refused."},"trade":{"type":"object","properties":{"now":{"type":"boolean","description":"It trades right now: false when there is no price a trade could hold it to."},"caution":{"type":"string","description":"Why a trade may be refused right now (market closed for the weekend, a late feed)."},"forTokens":{"type":"array","items":{"type":"string"},"description":"What it trades for on this chain."},"feePercent":{"type":"string","description":"Our fee on a trade with it."},"minBuyUsd":{"type":"string","description":"The smallest buy, in dollars."},"minSellUsd":{"type":"string","description":"The smallest sale, in dollars."},"liquidity":{"type":"object","properties":{"word":{"type":"string","description":"How deep its pools are.","enum":["deep","good","thin","very thin","unknown"]},"depthUsd":{"type":"integer","description":"Its pools' depth in dollars (DexScreener, up to an hour old). Stocks only."},"note":{"type":"string"}},"required":["word"]}},"required":["now","forTokens","feePercent"]}},"required":["symbol","name","kind","address","decimals","priceFrom","inBoxes","priceUsd"]}},"notes":{"type":"array","items":{"type":"string"},"description":"What swaps for what, the fees and the minimums."},"market":{"type":"object","properties":{"usOpen":{"type":"boolean","description":"The US stock market's regular hours are on now."},"weekend":{"type":"boolean","description":"Closed for the weekend: stock prices rest until Monday's open (on weeknights they follow overnight trading)."},"nextChange":{"type":"string","description":"When it next opens or closes.","format":"date-time"},"words":{"type":"string"}},"required":["usOpen","weekend","nextChange","words"]}},"required":["chain","chainId","tokens"]},"HeldBox":{"type":"object","properties":{"chain":{"$ref":"#/components/schemas/Chain"},"box":{"$ref":"#/components/schemas/BoxKind"},"id":{"$ref":"#/components/schemas/Id"},"status":{"type":"string","enum":["sealed","opening","opened","expired"]},"image":{"type":"string","description":"The box's card picture.","format":"uri"}},"required":["chain","box","id","status","image"]},"WalletAnswer":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address"},"balances":{"type":"object","properties":{"base":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Balance"},"description":"Null when the chain could not be read."},{"type":"null"}]},"robinhood":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/Balance"},"description":"Null when the chain could not be read."},{"type":"null"}]}}},"sealed":{"type":"array","items":{"$ref":"#/components/schemas/HeldBox"}},"opening":{"type":"array","items":{"$ref":"#/components/schemas/HeldBox"}},"opened":{"type":"array","items":{"$ref":"#/components/schemas/HeldBox"}},"complete":{"type":"boolean","description":"False when some boxes may be missing: read again shortly."},"note":{"type":"string"}},"required":["wallet","balances","sealed","opening","opened","complete"]},"Balance":{"type":"object","properties":{"token":{"type":"string","description":"ETH or the token's symbol."},"address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}]},"kind":{"type":"string","enum":["gas","money","stock","token","index"]},"amount":{"$ref":"#/components/schemas/Amount"}},"required":["token","address","kind","amount"]},"BoxStatus":{"type":"object","properties":{"chain":{"$ref":"#/components/schemas/Chain"},"box":{"$ref":"#/components/schemas/BoxKind"},"id":{"$ref":"#/components/schemas/Id"},"owner":{"anyOf":[{"$ref":"#/components/schemas/Address","description":"Null for a box burned out of its wallet."},{"type":"null"}]},"status":{"type":"string","enum":["sealed","opening","opened","expired","unknown"]},"image":{"type":"string","description":"The box's card picture.","format":"uri"},"burned":{"type":"boolean","const":true},"prize":{"type":"object","properties":{"stock":{"anyOf":[{"type":"string","description":"The stock it paid: a tokenized stock on Base, a stock token on Robinhood Chain."},{"type":"null"}]},"amount":{"type":"string","description":"How much of it."},"usd":{"type":"string","description":"The prize in dollars."},"openedAt":{"type":"integer","description":"Unix seconds."},"forfeited":{"type":"boolean","const":true,"description":"No stock token was paid."}},"required":["usd"],"description":"Once opened."},"batch":{"type":"object","properties":{"id":{"$ref":"#/components/schemas/Id"},"openedAt":{"type":"string","format":"date-time"},"randomNumber":{"type":"boolean","description":"Its random number has come."},"youMaySettleFrom":{"type":"string","format":"date-time"},"youMayReturnToSealedFrom":{"type":"string","format":"date-time"}},"required":["id","openedAt","randomNumber","youMaySettleFrom"],"description":"While opening: its batch and when POST /tx/settle may act."},"note":{"type":"string"}},"required":["chain","box","id","owner","status","image"]},"BasketRef":{"anyOf":[{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"}},"required":["code","name","url"]},{"type":"null"}]},"GiftsAnswer":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address"},"received":{"type":"array","items":{"type":"object","properties":{"box":{"type":"integer"},"batchId":{"type":"integer"},"kind":{"type":"string","enum":["gift","basket"]},"basket":{"$ref":"#/components/schemas/BasketRef"},"state":{"type":"string","enum":["sealed","opened"]},"from":{"$ref":"#/components/schemas/Address"},"fromName":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"receivedAt":{"type":"string","format":"date-time"},"design":{"type":"string","description":"The box's design word.","pattern":"^0x[0-9a-fA-F]{64}$"},"openedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]},"held":{"type":"array","items":{"$ref":"#/components/schemas/ItemOut"},"description":"Once opened: what it held."},"heldUsd":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["box","batchId","kind","state","from","receivedAt"]},"description":"Gift boxes this wallet holds or held, newest first."},"created":{"type":"array","items":{"type":"object","properties":{"batchId":{"type":"integer"},"kind":{"type":"string","enum":["direct","link"]},"basket":{"$ref":"#/components/schemas/BasketRef"},"createdAt":{"type":"string","format":"date-time"},"boxes":{"type":"integer"},"eachBox":{"type":"array","items":{"$ref":"#/components/schemas/ItemOut"}},"eachBoxUsd":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"design":{"type":"string"},"recipients":{"type":"array","items":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"type":"string","enum":["sealed","opened"]},"openedAt":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}]}}},"description":"A direct gift's wallets."},"link":{"type":"object","properties":{"status":{"type":"string","enum":["open","not_open_yet","closed","all_claimed","taken_back","not_claimable_here"]},"who":{"type":"string","enum":["anyone","verified","list","other"]},"words":{"type":"string"},"boxesLeft":{"type":"integer"},"claimed":{"type":"integer"},"takenBack":{"type":"integer"},"opensAt":{"type":"string","description":"An ISO time or \"at once\"."},"closesAt":{"type":"string","description":"An ISO time or \"no end\"."},"linkKeyAddress":{"$ref":"#/components/schemas/Address"}}}},"required":["batchId","kind","createdAt","boxes","eachBox"]},"description":"Gifts this wallet made, newest first."},"pending":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ItemOut"},{"type":"object","properties":{"withdraw":{"type":"string","description":"The call that withdraws it."}}}]},"description":"Tokens that could not move when a box was opened, waiting in the gift contract for this wallet."},"feeBps":{"type":"integer"},"pricesAt":{"type":"string","format":"date-time"},"more":{"type":"object","properties":{"received":{"type":"boolean"},"created":{"type":"boolean"}},"required":["received","created"],"description":"With `limit`: which list was cut."}},"required":["wallet","received","created","pending"]},"ItemOut":{"type":"object","properties":{"token":{"$ref":"#/components/schemas/Address"},"ticker":{"type":"string","description":"Its ticker, like NVDAc."},"amount":{"$ref":"#/components/schemas/Amount"},"units":{"type":"string","description":"The same amount in raw units.","pattern":"^\\d+$"},"usd":{"type":"string","description":"Dollars at today's price, when known.","pattern":"^\\d+\\.\\d{2}$"}},"required":["token","ticker","amount","units"]},"GiftLink":{"type":"object","properties":{"batchId":{"type":"integer"},"status":{"type":"string","enum":["open","not_open_yet","closed","all_claimed","taken_back","not_claimable_here"]},"boxes":{"type":"integer"},"claimed":{"type":"integer"},"boxesLeft":{"type":"integer"},"takenBack":{"type":"integer"},"who":{"type":"string","enum":["anyone","verified","list","other"]},"words":{"type":"string"},"opensAt":{"type":"string","description":"An ISO time or \"at once\"."},"closesAt":{"type":"string","description":"An ISO time or \"no end\"."},"from":{"$ref":"#/components/schemas/Address"},"fromName":{"anyOf":[{"type":"string"},{"type":"null"}]},"note":{"anyOf":[{"type":"string"},{"type":"null"}]},"eachBox":{"type":"array","items":{"$ref":"#/components/schemas/ItemOut"}},"eachBoxUsd":{"anyOf":[{"type":"string"},{"type":"null"}]},"design":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"linkKeyAddress":{"$ref":"#/components/schemas/Address"},"feeBps":{"type":"integer"},"contract":{"$ref":"#/components/schemas/Address"},"claim":{"type":"string","description":"How to claim."}},"required":["batchId","status","boxes","boxesLeft","who","from","eachBox"]},"VerifyAnswer":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address"},"verified":{"type":"boolean"},"via":{"anyOf":[{"type":"string","description":"The way that counts."},{"type":"null"}]},"ways":{"type":"object","additionalProperties":{"type":"object","properties":{"done":{"type":"boolean"},"need":{"type":"string"},"how":{"type":"string"}},"required":["done"],"additionalProperties":true},"description":"boxes, trades, coinbase, ethos, nft, x, farcaster and listed: each with done, what it needs and how."},"note":{"type":"string"}},"required":["wallet","verified","via","ways"]},"HistoryAnswer":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address"},"boxes":{"type":"array","items":{"type":"object","properties":{"chain":{"$ref":"#/components/schemas/Chain"},"box":{"$ref":"#/components/schemas/BoxKind"},"kind":{"type":"string","enum":["bought","opened","sent","received"]},"at":{"type":"string","format":"date-time"},"tx":{"type":"string","description":"The transaction hash.","pattern":"^0x[0-9a-fA-F]{64}$"},"boxes":{"type":"integer"},"ids":{"type":"array","items":{"$ref":"#/components/schemas/Id"}},"usd":{"type":"string","description":"Dollars."},"stocks":{"type":"array","items":{"type":"string"},"description":"Robinhood Chain: the stock tokens an open paid."},"other":{"$ref":"#/components/schemas/Address"},"jackpot":{"type":"boolean","const":true},"batch":{"$ref":"#/components/schemas/Id"},"campaign":{"type":"object","properties":{"what":{"type":"string","enum":["reward","pool-add","pool-back"]},"name":{"type":"string"},"href":{"type":"string"}}}},"required":["chain","box","kind","at","tx","boxes"]},"description":"Mystery box lines, both chains merged, newest first. Left out with list=gifts."},"gifts":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["made","link","topup","reclaim","got","claimed","sent","received","opened","earned"]},"at":{"type":"string","format":"date-time"},"tx":{"type":"string","description":"The transaction hash.","pattern":"^0x[0-9a-fA-F]{64}$"},"boxes":{"type":"integer"},"ids":{"type":"array","items":{"$ref":"#/components/schemas/Id"}},"other":{"$ref":"#/components/schemas/Address"},"wallets":{"type":"integer"},"stocks":{"type":"array","items":{"type":"string"}},"usd":{"type":"string","description":"Dollars."},"basket":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"},"url":{"type":"string","format":"uri"}}}},"required":["kind","at","tx","boxes"]},"description":"Gift box lines, newest first. Left out with list=boxes."},"next":{"type":"object","properties":{"boxes":{"anyOf":[{"type":"string","description":"The next page of `boxes`; null at its end.","format":"uri"},{"type":"null"}]},"gifts":{"anyOf":[{"type":"string","description":"The next page of `gifts`; null at its end.","format":"uri"},{"type":"null"}]}},"description":"Each list asked for, its next page."},"robinhoodCatchingUp":{"type":"boolean","const":true},"note":{"type":"string"},"kinds":{"type":"object","additionalProperties":{"type":"string"},"description":"What each kind means."}},"required":["wallet","next"]},"SwapSide":{"type":"object","properties":{"chain":{"$ref":"#/components/schemas/Chain"},"token":{"type":"string","description":"\"ETH\", the chain's dollar (USDC or USDG), a ticker (NVDAc or NVDA on Base, NVDA on Robinhood Chain) or a token address. GET /tokens lists them.","minLength":1,"maxLength":64}},"required":["chain","token"],"additionalProperties":false},"GiftItem":{"type":"object","properties":{"token":{"type":"string","description":"A ticker (NVDAc, cbBTC, USDC, ETH) or a token address on Base. Not a Robinhood Chain stock token.","maxLength":64},"amount":{"$ref":"#/components/schemas/Amount","description":"How much of the token in each box. Give this or usd."},"usd":{"type":"string","description":"Dollars of it in each box at today's price, up to 2 places, at least \"0.01\". Give this or amount.","pattern":"^\\d{1,7}(\\.\\d{1,2})?$"}},"required":["token"],"oneOf":[{"required":["amount"]},{"required":["usd"]}]},"GiftLinkRequest":{"type":"object","properties":{"boxes":{"type":"integer","minimum":1,"maximum":100000,"description":"How many boxes the link holds."},"who":{"type":"string","description":"Who may claim: anyone with the link, wallets verified on giftedstock.com or the wallets in `list`.","enum":["anyone","verified","list"]},"list":{"type":"array","items":{"$ref":"#/components/schemas/Address"},"description":"With who \"list\" only: the wallets that may claim.","minItems":1,"maxItems":100000},"opensAt":{"type":["integer","string","null"],"description":"When claims open: unix seconds or an ISO 8601 date. Left out, 0 or null: at once."},"closesAt":{"type":["integer","string","null"],"description":"When claims close: unix seconds or an ISO 8601 date. Left out: in 7 days. 0 or null: no end."},"linkKeyAddress":{"$ref":"#/components/schemas/Address","description":"The address of a fresh key you made for this link: never your wallet's. Its private key goes into the share URL after #k=; never send it here."}},"required":["boxes","who","linkKeyAddress"]},"GiftDesign":{"type":"object","properties":{"box":{"type":"string","description":"The box colour.","pattern":"^#[0-9a-fA-F]{6}$"},"ribbon":{"anyOf":[{"type":"string","description":"The ribbon colour; null for none.","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"title":{"type":"string","description":"At most 16 letters, digits, spaces or . , ! ? ' - &.","maxLength":16},"titleColour":{"type":"string","description":"The title colour.","pattern":"^#[0-9a-fA-F]{6}$"},"stickers":{"type":"object","properties":{"left":{"anyOf":[{"type":"string"},{"type":"null"}]},"right":{"anyOf":[{"type":"string"},{"type":"null"}]},"top":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false,"description":"A sticker id or null on each side."}},"additionalProperties":false,"description":"The form's fields over the Gifted Stock box's."},"GiftRequest":{"type":"object","properties":{"wallet":{"$ref":"#/components/schemas/Address","description":"Your own wallet: the one that signs and sends every step. What a plan brings always goes to it."},"items":{"type":"array","items":{"$ref":"#/components/schemas/GiftItem"},"description":"What each box holds: 1 to 20 tokens, each once.","minItems":1,"maxItems":20},"payWith":{"type":"string","description":"USDC or ETH (any case): the gift router buys what each box holds. \"held\" (tokens the wallet holds) is skill 1.2.0's only.","enum":["USDC","ETH","held"]},"to":{"type":"array","items":{"type":"string","description":"An address or a name ending .eth (name.base.eth too)."},"description":"A box to each wallet: 1 to 100. Give this or link.","minItems":1,"maxItems":100},"link":{"$ref":"#/components/schemas/GiftLinkRequest","description":"A share link. Give this or to."},"boxes":{"type":"integer","minimum":1,"maximum":100000,"description":"Optional: must equal link.boxes or the count of `to`."},"note":{"type":"string","description":"A note shown with the gift: at most 140 characters, not starting with basket:.","maxLength":140},"design":{"oneOf":[{"type":"string","description":"A design word.","pattern":"^0x[0-9a-fA-F]{64}$"},{"$ref":"#/components/schemas/GiftDesign"}],"description":"The box's look. Left out: the Gifted Stock box."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow, like \"1.5.1\". Left out, the answer is skill 1.2.0's (its contracts, no app-fee slot on gifts): send \"1.5.1\"."}},"required":["wallet","items","payWith"],"oneOf":[{"required":["to"]},{"required":["link"]}]},"PartnerCreate":{"type":"object","properties":{"action":{"type":"string","const":"create"},"wallet":{"$ref":"#/components/schemas/Address","description":"Your own wallet: the one that signs and sends every step. What a plan brings always goes to it."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow: \"1.5.1\" or later."},"chain":{"$ref":"#/components/schemas/Chain"},"payWith":{"type":"string","description":"\"ETH\" or the chain's dollar (\"USDC\" on Base, \"USDG\" on Robinhood Chain). Default: the dollar.","enum":["USDC","USDG","ETH"]}},"required":["action","wallet","skill","chain"],"description":"A new partner on the campaign vault: the partner fee. Then POST /api/partner/create with the hash. Names and page addresses that copy a brand, a chain, a wallet, an exchange or a listed company are reserved there: the 400 says which."},"PartnerWithdraw":{"type":"object","properties":{"action":{"type":"string","const":"withdraw"},"wallet":{"$ref":"#/components/schemas/Address","description":"The partner's owner: the wallet your agent token is for."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow: \"1.5.1\" or later."},"slug":{"type":"string","description":"Your partner page's name in its link (/partner/<slug>).","pattern":"^[a-z0-9-]{2,32}$"},"chain":{"$ref":"#/components/schemas/Chain"},"box":{"$ref":"#/components/schemas/BoxKind"},"count":{"type":"integer","minimum":1,"maximum":100000,"description":"How many free boxes to take back."},"partnerId":{"$ref":"#/components/schemas/Id","description":"Your partner's vault id on this chain: the PartnerCreated event of your createPartner or GET /api/partner/<slug>/campaigns/<code>/vault."}},"required":["action","wallet","skill","slug","chain","box","count","partnerId"],"description":"Free boxes from your pool back to your wallet. Needs your agent token."},"PartnerManager":{"type":"object","properties":{"action":{"type":"string","const":"manager"},"wallet":{"$ref":"#/components/schemas/Address","description":"The partner's owner: the wallet your agent token is for."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow: \"1.5.1\" or later."},"slug":{"type":"string","description":"Your partner page's name in its link (/partner/<slug>).","pattern":"^[a-z0-9-]{2,32}$"},"chain":{"$ref":"#/components/schemas/Chain"},"manager":{"$ref":"#/components/schemas/Address","description":"The wallet to name or remove."},"on":{"type":"boolean","description":"True names the manager, false removes it."},"partnerId":{"$ref":"#/components/schemas/Id","description":"Your partner's vault id on this chain: the PartnerCreated event of your createPartner or GET /api/partner/<slug>/campaigns/<code>/vault."}},"required":["action","wallet","skill","slug","chain","manager","on","partnerId"],"description":"Name or remove a manager (20 at most). Needs your agent token. Then POST /api/partner/<slug>/managers with the hash."},"CampaignLaunch":{"type":"object","properties":{"action":{"type":"string","const":"launch"},"wallet":{"$ref":"#/components/schemas/Address","description":"The partner's owner or a manager: the wallet your agent token is for."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow: \"1.5.1\" or later."},"slug":{"type":"string","description":"Your partner page's name in its link (/partner/<slug>).","pattern":"^[a-z0-9-]{2,32}$"},"code":{"type":"string","description":"The campaign's code, as its create answered.","pattern":"^[A-Za-z0-9]{3,12}$"},"prize":{"type":"object","properties":{"chain":{"$ref":"#/components/schemas/Chain"},"box":{"$ref":"#/components/schemas/BoxKind"},"boxes":{"type":"integer","minimum":1,"maximum":1000000,"description":"Boxes in all."},"perWinner":{"type":"integer","minimum":1,"maximum":1000000,"description":"Boxes a winner."},"style":{"type":"string","enum":["raffle","fcfs"]},"startsAt":{"type":"string","description":"As saved.","format":"date-time"},"endsAt":{"type":"string","description":"As saved.","format":"date-time"}},"required":["chain","box","boxes","perWinner","style","startsAt","endsAt"],"description":"The prize as you saved the campaign: the plan launches only that."},"partnerId":{"$ref":"#/components/schemas/Id","description":"Your partner's vault id on this chain: the PartnerCreated event of your createPartner or GET /api/partner/<slug>/campaigns/<code>/vault."},"payWith":{"type":"string","description":"\"ETH\" or the chain's dollar (\"USDC\" on Base, \"USDG\" on Robinhood Chain). Default: the dollar.","enum":["USDC","USDG","ETH"]}},"required":["action","wallet","skill","slug","code","prize","partnerId"],"description":"Launch a saved campaign: your pool's free boxes first, the rest bought. Then POST /api/partner/<slug>/campaigns/<code>/vault { action: \"launched\", hash }."},"CampaignRaise":{"type":"object","properties":{"action":{"type":"string","const":"raise"},"wallet":{"$ref":"#/components/schemas/Address","description":"The partner's owner or a manager: the wallet your agent token is for."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow: \"1.5.1\" or later."},"slug":{"type":"string","description":"Your partner page's name in its link (/partner/<slug>).","pattern":"^[a-z0-9-]{2,32}$"},"code":{"type":"string","description":"The campaign's code, as its create answered.","pattern":"^[A-Za-z0-9]{3,12}$"},"chain":{"$ref":"#/components/schemas/Chain"},"campaignId":{"$ref":"#/components/schemas/Id","description":"The campaign's vault id: the CampaignLaunched event of its launch or vault.campaignId of GET /api/campaign/<code>."},"partnerId":{"$ref":"#/components/schemas/Id","description":"Your partner's vault id on this chain: the PartnerCreated event of your createPartner or GET /api/partner/<slug>/campaigns/<code>/vault."},"winners":{"type":"integer","minimum":1,"maximum":10000,"description":"How many more winners (or first-come slots)."},"payWith":{"type":"string","description":"\"ETH\" or the chain's dollar (\"USDC\" on Base, \"USDG\" on Robinhood Chain). Default: the dollar.","enum":["USDC","USDG","ETH"]}},"required":["action","wallet","skill","slug","code","chain","campaignId","partnerId","winners"],"description":"More winners on a launched campaign. Then POST /api/partner/<slug>/campaigns/<code>/vault { action: \"raised\", hash }."},"CampaignCancel":{"type":"object","properties":{"action":{"type":"string","const":"cancel"},"wallet":{"$ref":"#/components/schemas/Address","description":"The partner's owner: the wallet your agent token is for."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow: \"1.5.1\" or later."},"slug":{"type":"string","description":"Your partner page's name in its link (/partner/<slug>).","pattern":"^[a-z0-9-]{2,32}$"},"code":{"type":"string","description":"The campaign's code, as its create answered.","pattern":"^[A-Za-z0-9]{3,12}$"},"chain":{"$ref":"#/components/schemas/Chain"},"campaignId":{"$ref":"#/components/schemas/Id","description":"The campaign's vault id: the CampaignLaunched event of its launch or vault.campaignId of GET /api/campaign/<code>."}},"required":["action","wallet","skill","slug","code","chain","campaignId"],"description":"Cancel a launched campaign before it starts: its boxes go back to your pool. Then POST /api/partner/<slug>/campaigns/<code>/vault { action: \"cancelled\", hash }."},"CampaignClaim":{"type":"object","properties":{"action":{"type":"string","const":"claim"},"wallet":{"$ref":"#/components/schemas/Address","description":"The winning wallet: the one your agent token is for."},"skill":{"$ref":"#/components/schemas/Skill","description":"The skill version you follow: \"1.5.1\" or later."},"code":{"type":"string","description":"The campaign's code or its private link's code-key."},"chain":{"$ref":"#/components/schemas/Chain"},"campaignId":{"$ref":"#/components/schemas/Id","description":"The campaign's vault id: the CampaignLaunched event of its launch or vault.campaignId of GET /api/campaign/<code>."}},"required":["action","wallet","skill","code","chain","campaignId"],"description":"Claim the boxes your wallet won. Then POST /api/campaign/<code>/vault-claim { hash } for each step."}},"responses":{"BadRequest":{"description":"The request is wrong: `error` names the field or rule.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"No valid agent token or a signature that is not the wallet's.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"Not this wallet's to do.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such box, gift, basket, partner or campaign; or the feature is not live.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Conflict":{"description":"Refused as things stand now: a price, a balance, a time or the contract's own rule. The message says what would change it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooLarge":{"description":"The body is too large.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BadKey":{"description":"`bad_key`: the X-Api-Key sent is unknown or revoked. Leave it out for the keyless limits. An answer served from our CDN's cache is not checked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"Something could not be read right now: try again shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Failed":{"description":"Could not answer right now: try again shortly.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Busy":{"description":"`busy`: too busy for calls without an API key today. Wait as long as retry-after says (a few minutes or until 00:00 UTC) or send an API key. Any other 503 (`unavailable` and the endpoint's own codes) means something could not be read right now: try again shortly.","headers":{"retry-after":{"description":"busy only: seconds to wait, up to the next 00:00 UTC.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Busy"}}}},"TooMany":{"description":"Too many requests: wait as long as retry-after says.","headers":{"retry-after":{"description":"Seconds to wait.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimited"}}}}},"securitySchemes":{"agentToken":{"type":"http","scheme":"bearer","bearerFormat":"gsa_...","description":"An agent token from POST /api/agent/v1/session, good for 24 hours: `Authorization: Bearer gsa_...`."},"apiKey":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Optional. A key from giftedstock.com/developers raises your limits; calls without one keep the keyless limits. Server-side only: browsers cannot send it."}}}}