{"openapi":"3.1.0","info":{"title":"x402 Toolbox (lab.paidapis.net)","version":"1.0.0","description":"A toolbox of x402 payment-protocol mechanics: 28 small real endpoints on Base mainnet USDC, each demonstrating a distinct pattern (oracle, auction, escrow, invoicing, task-runner, prediction market, and more).","x-guidance":"Pay via x402 (exact scheme, USDC on Base mainnet, eip155:8453) to access any priced route below. /api/auction/bid and /api/prediction/markets are free to call and return a follow-up URL (/api/auction/claim/<bidId> or /api/prediction/markets/<marketId>/stake) that is itself dynamically priced — only the round's winning bid, or a chosen stake amount, is ever charged. /api/directory (free) lists every endpoint with live reachability and real settled-payment history.","contact":{"email":"chachiaidev@gmail.com","url":"https://lab.paidapis.net/api/directory"}},"paths":{"/api/market-snapshot":{"get":{"operationId":"get_api_market_snapshot","summary":"Aggregated market snapshot","description":"Gas price + ETH/USD price + latest Base block in one call. Optional ?ref=<address> pays that wallet a referral cut.","parameters":[{"name":"ref","in":"query","required":false,"schema":{"type":"string"},"description":"Wallet address to pay a referral cut to."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"gasPriceGwei":{"type":"number"},"ethUsdPrice":{"type":"number"},"latestBaseBlock":{"type":"object","properties":{"number":{"type":"integer"},"timestamp":{"type":"string"}}},"dataAsOf":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]}}},"/api/normalized-gas":{"get":{"operationId":"get_api_normalized_gas","summary":"Normalized Ethereum + Base gas data","description":"Ethereum and Base gas price and block data, cleaned into one consistent schema per chain.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"snapshots":{"type":"array","items":{"type":"object","properties":{"chain":{"type":"string"},"blockNumber":{"type":"integer"},"blockTimestamp":{"type":"string"},"gasPriceGwei":{"type":"number"}}}},"dataAsOf":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]}}},"/api/gas-comparator":{"get":{"operationId":"get_api_gas_comparator","summary":"Cross-chain gas comparator","description":"Real gas price on Ethereum vs Base side by side, with delta, ratio, and estimated USD cost of a standard transfer on each chain.","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ethereum":{"type":"object"},"base":{"type":"object"},"deltaGwei":{"type":"number"},"ratio":{"type":"number"},"ethUsdPrice":{"type":"number"},"checkedAt":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]}}},"/api/large-usdc-transfers":{"get":{"operationId":"get_api_large_usdc_transfers","summary":"Large USDC transfer filter","description":"Recent USDC transfers on Base above a value threshold.","parameters":[{"name":"minUsd","in":"query","required":false,"schema":{"type":"number"},"description":"Minimum USD value to include (default 10000)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"transfers":{"type":"array","items":{"type":"object","properties":{"txHash":{"type":"string"},"blockNumber":{"type":"integer"},"from":{"type":"string"},"to":{"type":"string"},"amountUsdc":{"type":"number"}}}},"scannedBlocks":{"type":"integer"},"rawEventCount":{"type":"integer"},"minUsd":{"type":"number"},"dataAsOf":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]}}},"/api/enrich-address":{"get":{"operationId":"get_api_enrich_address","summary":"On-chain address enrichment","description":"Real on-chain context for a wallet address: contract vs EOA, native balance, transaction count.","parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string"},"description":"Address to look up."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"isContract":{"type":"boolean"},"nativeBalanceEth":{"type":"number"},"transactionCount":{"type":"integer"},"classification":{"type":"string","enum":["contract","new-wallet","active-wallet"]}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]}}},"/api/gas-metrics":{"get":{"operationId":"get_api_gas_metrics","summary":"Derived gas price metrics","description":"Rolling average/min/max/volatility/trend for Ethereum gas price over a window.","parameters":[{"name":"windowMinutes","in":"query","required":false,"schema":{"type":"number"},"description":"Window size in minutes (default 10)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"windowMinutes":{"type":"integer"},"sampleCount":{"type":"integer"},"current":{"type":["number","null"]},"average":{"type":["number","null"]},"min":{"type":["number","null"]},"max":{"type":["number","null"]},"stdDev":{"type":["number","null"]},"trend":{"type":"string","enum":["up","down","flat","insufficient-data"]}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]}}},"/api/alerts/subscribe":{"post":{"operationId":"post_api_alerts_subscribe","summary":"Subscribe a gas-price alert webhook","description":"Register a one-shot webhook that fires when Ethereum gas price crosses your threshold.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"webhookUrl":{"type":"string","description":"Public http(s) URL to POST to when the alert fires."},"condition":{"type":"string","description":"Either \"above\" or \"below\".","enum":["above","below"]},"thresholdGwei":{"type":"number","description":"Gas price threshold in Gwei."}},"required":["webhookUrl","condition","thresholdGwei"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"alertId":{"type":"string"},"webhookUrl":{"type":"string"},"condition":{"type":"string","enum":["above","below"]},"thresholdGwei":{"type":"number"},"createdAt":{"type":"string"},"status":{"type":"string","enum":["active","fired","delivery-failed"]},"firedAt":{"type":["string","null"]},"gasPriceGweiAtTrigger":{"type":["number","null"]}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]}}},"/api/wallet-watch/subscribe":{"post":{"operationId":"post_api_wallet_watch_subscribe","summary":"Subscribe a wallet-activity webhook","description":"Register a webhook that fires on any native ETH or ERC-20 transfer touching a Base address, for 30 days. Unlike the gas-price alert, this can fire repeatedly.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"Base wallet address to watch."},"webhookUrl":{"type":"string","description":"Public http(s) URL to POST to on each match."}},"required":["address","webhookUrl"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"subscriptionId":{"type":"string"},"address":{"type":"string"},"webhookUrl":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"status":{"type":"string","enum":["active","expired"]},"firedCount":{"type":"integer"},"lastFiredAt":{"type":["string","null"]}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]}}},"/api/ownership/challenge":{"post":{"operationId":"post_api_ownership_challenge","summary":"Issue a wallet-ownership challenge (free)","description":"Free step 1 of 2: get a message to sign with your wallet, proving you control an address.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string","description":"The wallet address you'll prove control of."},"statement":{"type":"string","description":"Your own statement to bind into the signed message (max 500 chars) — e.g. \"I agree to terms v3\"."}},"required":["address","statement"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"challengeId":{"type":"string"},"address":{"type":"string"},"message":{"type":"string"},"createdAt":{"type":"string"},"expiresAt":{"type":"string"},"status":{"type":"string","enum":["pending","verified","expired"]}}}}}}},"security":[]}},"/api/ownership/verify":{"post":{"operationId":"post_api_ownership_verify","summary":"Verify a wallet-ownership signature","description":"Step 2 of 2: submit the signature for a challenge from /api/ownership/challenge, get back an oracle-signed proof of ownership.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"challengeId":{"type":"string","description":"The challengeId from the free challenge step."},"signature":{"type":"string","description":"The signature produced by signing the challenge's message."}},"required":["challengeId","signature"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"challengeId":{"type":"string"},"address":{"type":"string"},"message":{"type":"string"},"signature":{"type":"string"},"verifiedAt":{"type":"string"},"oracleSignerAddress":{"type":"string"},"oracleSignature":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]}}},"/api/document-anchor/create":{"post":{"operationId":"post_api_document_anchor_create","summary":"Blockchain-anchored document proof-of-existence","description":"Submit a 32-byte document hash (never the document itself) to be written into a real Base transaction's calldata.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hash":{"type":"string","description":"32-byte hex hash of the document (0x + 64 hex chars)."}},"required":["hash"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"hash":{"type":"string"},"txHash":{"type":"string"},"blockNumber":{"type":"integer"},"anchoredAt":{"type":"string"},"chain":{"type":"string","enum":["base"]}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]}}},"/api/contract-risk/summarize":{"post":{"operationId":"post_api_contract_risk_summarize","summary":"Plain-English smart-contract risk summarizer","description":"Submit Solidity source (max 50000 chars) for a structured, plain-English risk assessment.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"sourceCode":{"type":"string","description":"Solidity (or similar) source code, max 50000 characters."}},"required":["sourceCode"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"riskLevel":{"type":"string","enum":["low","medium","high","critical"]},"summary":{"type":"string"},"findings":{"type":"array","items":{"type":"object","properties":{"title":{"type":"string"},"severity":{"type":"string","enum":["low","medium","high","critical"]},"explanation":{"type":"string"}}}},"analyzedAt":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.01","max":"0.0488"},"protocols":[{"x402":{}}]}}},"/api/reliable-eth-price":{"get":{"operationId":"get_api_reliable_eth_price","summary":"Reliable ETH/USD price","description":"ETH/USD price with retry-with-backoff and last-known-good cache fallback.","parameters":[{"name":"simulateFailureRate","in":"query","required":false,"schema":{"type":"number"},"description":"0-1, simulates upstream failures to demo the fallback path."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"ethUsdPrice":{"type":"number"},"source":{"type":"string","enum":["live","cache-fallback"]},"attempts":{"type":"integer"},"cacheAgeSeconds":{"type":["number","null"]},"simulateFailureRate":{"type":"number"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]}}},"/api/wiki-summary":{"get":{"operationId":"get_api_wiki_summary","summary":"Wikipedia article summary as JSON","description":"Wikipedia article lead section, converted from rendered HTML into clean, tag-free JSON.","parameters":[{"name":"title","in":"query","required":true,"schema":{"type":"string"},"description":"Wikipedia article title."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string"},"sourceUrl":{"type":"string"},"paragraphs":{"type":"array","items":{"type":"string"}},"convertedAt":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]}}},"/api/verify-tx":{"get":{"operationId":"get_api_verify_tx","summary":"Signed on-chain transaction confirmation oracle","description":"Checks whether a Base transaction hash has confirmed on-chain, returns a signed EIP-191 attestation.","parameters":[{"name":"txHash","in":"query","required":true,"schema":{"type":"string"},"description":"32-byte transaction hash to check."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"txHash":{"type":"string"},"chain":{"type":"string"},"confirmed":{"type":"boolean"},"blockNumber":{"type":["integer","null"]},"checkedAt":{"type":"string"},"signerAddress":{"type":"string"},"signature":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]}}},"/api/verify-tx-multi-source":{"get":{"operationId":"get_api_verify_tx_multi_source","summary":"Multi-source on-chain confirmation oracle","description":"Checks a Base tx hash against 3 independent RPC providers in parallel; only signs an attestation if all agree.","parameters":[{"name":"txHash","in":"query","required":true,"schema":{"type":"string"},"description":"32-byte transaction hash to check."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"txHash":{"type":"string"},"chain":{"type":"string"},"sources":{"type":"array","items":{"type":"object"}},"agreeingSources":{"type":"integer"},"totalSources":{"type":"integer"},"consensusReached":{"type":"boolean"},"confirmed":{"type":["boolean","null"]},"blockNumber":{"type":["integer","null"]},"checkedAt":{"type":"string"},"signed":{"type":"boolean"},"signerAddress":{"type":"string"},"signature":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/attestation-log":{"get":{"operationId":"get_api_attestation_log","summary":"Signed oracle attestation history","description":"Persisted, doubly-signed log of past oracle attestations from this server.","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer"},"description":"Max entries to return, 1-100 (default 20)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"attestations":{"type":"array","items":{"type":"object"}},"count":{"type":"integer"},"generatedAt":{"type":"string"},"signerAddress":{"type":"string"},"pageSignature":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]}}},"/api/escrow/create":{"post":{"operationId":"post_api_escrow_create","summary":"Create a soft-escrow release condition","description":"Payment settles immediately; resource delivery is withheld until a named tx hash confirms on-chain.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"txHash":{"type":"string","description":"32-byte transaction hash that must confirm to release the resource."}},"required":["txHash"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"escrowId":{"type":"string"},"createdAt":{"type":"string"},"releaseCondition":{"type":"object"},"status":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.02"},"protocols":[{"x402":{}}]}}},"/api/invoice/create":{"post":{"operationId":"post_api_invoice_create","summary":"Create a signed, payable invoice","description":"Machine-to-machine invoicing: issue a signed invoice now, let the payer settle it later at its own dynamically-priced /pay sub-resource (returned in the response) instead of paying synchronously like every other endpoint here.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"payerAddress":{"type":"string","description":"Wallet address expected to pay this invoice."},"amountUsdc":{"type":"number","description":"Total amount due, in USDC."},"lineItems":{"type":"string","description":"JSON array of {\"description\",\"amountUsdc\"} objects, for record-keeping."},"memo":{"type":"string","description":"Free-text note."},"dueBy":{"type":"string","description":"ISO 8601 due date (default 7 days out)."}},"required":["payerAddress","amountUsdc"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"invoiceId":{"type":"string"},"payerAddress":{"type":"string"},"amountUsdc":{"type":"number"},"dueBy":{"type":"string"},"status":{"type":"string","enum":["pending","paid"]},"payUrl":{"type":"string"},"signerAddress":{"type":"string"},"signature":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{}}]}}},"/api/subscriptions/register":{"post":{"operationId":"post_api_subscriptions_register","summary":"Register a subscription for renewal reminders","description":"Bookkeeping only: track a subscription you hold with any service (including your own) and get a webhook reminder before it's due. This server never pays the renewal on your behalf — call /renew yourself once you've handled it elsewhere.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ownerAddress":{"type":"string","description":"Wallet address this subscription belongs to."},"serviceName":{"type":"string","description":"Display name of the subscribed service (max 80 chars)."},"serviceUrl":{"type":"string","description":"URL of the subscribed service."},"amountUsdc":{"type":"number","description":"Renewal amount, in USDC."},"renewsEverySeconds":{"type":"integer","description":"Renewal period length, in seconds."},"nextRenewalAt":{"type":"string","description":"ISO 8601 date of the next renewal (default: now + renewsEverySeconds)."},"webhookUrl":{"type":"string","description":"Public http(s) URL to POST a reminder to before renewal is due."},"reminderLeadSeconds":{"type":"integer","description":"Seconds before nextRenewalAt to fire the reminder, up to 2592000 (default 60)."}},"required":["ownerAddress","serviceName","serviceUrl","amountUsdc","renewsEverySeconds"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"subscriptionId":{"type":"string"},"ownerAddress":{"type":"string"},"serviceName":{"type":"string"},"serviceUrl":{"type":"string"},"amountUsdc":{"type":"number"},"renewsEverySeconds":{"type":"integer"},"nextRenewalAt":{"type":"string"},"webhookUrl":{"type":["string","null"]},"reminderLeadSeconds":{"type":"integer"},"status":{"type":"string","enum":["active","cancelled"]}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]}}},"/api/resize-image":{"get":{"operationId":"get_api_resize_image","summary":"Metered image resize","description":"Resize an image; priced by output megapixels (min $0.005, max 2000px per side).","parameters":[{"name":"url","in":"query","required":true,"schema":{"type":"string"},"description":"Public http(s) URL of the source image."},{"name":"width","in":"query","required":true,"schema":{"type":"integer"},"description":"Output width in px, up to 2000."},{"name":"height","in":"query","required":true,"schema":{"type":"integer"},"description":"Output height in px, up to 2000."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"width":{"type":"integer"},"height":{"type":"integer"},"format":{"type":"string"},"sizeBytes":{"type":"integer"},"imageDataUrl":{"type":"string"},"resizedAt":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.005","max":"0.0800"},"protocols":[{"x402":{}}]}}},"/api/batch-resize":{"get":{"operationId":"get_api_batch_resize","summary":"Batch metered image resize","description":"Run up to 5 image-resize jobs in one paid call; price is the sum of each job's real cost.","parameters":[{"name":"jobs","in":"query","required":true,"schema":{"type":"string"},"description":"JSON array (max 5) of {\"url\",\"width\",\"height\"} objects."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"totalJobs":{"type":"integer"},"succeededCount":{"type":"integer"},"failedCount":{"type":"integer"},"results":{"type":"array","items":{"type":"object"}},"processedAt":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.005","max":"0.4000"},"protocols":[{"x402":{}}]}}},"/api/tax-lot-calculator":{"get":{"operationId":"get_api_tax_lot_calculator","summary":"FIFO tax-lot calculator","description":"Consolidated cost-basis + capital-gains calculation across one or more wallets (Ethereum mainnet). Priced at $0.05/wallet.","parameters":[{"name":"addresses","in":"query","required":true,"schema":{"type":"string"},"description":"Comma-separated wallet addresses (max 20), treated as one taxpayer — transfers between them are internal, not taxable."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"addresses":{"type":"array","items":{"type":"string"}},"method":{"type":"string"},"lots":{"type":"array","items":{"type":"object"}},"openLots":{"type":"array","items":{"type":"object"}},"unpriced":{"type":"array","items":{"type":"object"}},"computedAt":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.05","max":"1.00"},"protocols":[{"x402":{}}]}}},"/api/freshness-priced-data":{"get":{"operationId":"get_api_freshness_priced_data","summary":"Freshness-tiered gas/price data","description":"Same gas + ETH/USD data, priced by requested freshness: cached (cheap) or live (guaranteed current).","parameters":[{"name":"freshness","in":"query","required":false,"schema":{"type":"string","enum":["cached","live"]},"description":"Either \"cached\" (default) or \"live\"."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"freshness":{"type":"string","enum":["cached","live"]},"gasPriceGwei":{"type":["number","null"]},"gasSampleCount":{"type":"integer"},"ethUsdPrice":{"type":["number","null"]},"ethPriceCachedAt":{"type":["string","null"]},"servedAt":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.002","max":"0.02"},"protocols":[{"x402":{}}]}}},"/api/leaderboard/list":{"post":{"operationId":"post_api_leaderboard_list","summary":"Pay for leaderboard visibility","description":"Pay a tiny fee to appear on a ranked scoreboard. No data product — pure visibility, ranked by cumulative amount paid.","parameters":[{"name":"name","in":"query","required":true,"schema":{"type":"string"},"description":"Display name to list (max 80 chars)."},{"name":"url","in":"query","required":false,"schema":{"type":"string"},"description":"Optional URL to associate with the listing."},{"name":"note","in":"query","required":false,"schema":{"type":"string"},"description":"Optional short note."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"message":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.005"},"protocols":[{"x402":{}}]}}},"/api/auction/bid":{"post":{"operationId":"post_api_auction_bid","summary":"Place a free, balance-verified auction bid","description":"Free to bid — gated on real on-chain USDC balance. Returns a per-bid claim URL; only the round's winning bid can pay it (dynamic price = the winning bid amount).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"bidUsdc":{"type":"number","description":"Bid amount in USDC, up to 5."},"bidderAddress":{"type":"string","description":"Bidder's wallet address (checked for real on-chain USDC balance)."}},"required":["bidUsdc","bidderAddress"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"bidId":{"type":"string"},"roundId":{"type":"string"},"bidderAddress":{"type":"string"},"bidUsdc":{"type":"number"},"closesAt":{"type":"string"}}}}}}},"security":[]}},"/api/prediction/markets":{"post":{"operationId":"post_api_prediction_markets","summary":"Create a free prediction market","description":"Free to create a gas-price-threshold market. Returns a market ID; staking on it is a separate, dynamically-priced call at the amount you choose to stake.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"thresholdGwei":{"type":"number","description":"Gas price threshold (Gwei) the market resolves against."},"resolvesInSeconds":{"type":"integer","description":"Seconds until resolution, up to 3600 (default 60)."}},"required":["thresholdGwei"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"marketId":{"type":"string"},"question":{"type":"string"},"thresholdGwei":{"type":"number"},"createdAt":{"type":"string"},"resolvesAt":{"type":"string"},"status":{"type":"string","enum":["open","resolved"]},"outcome":{"type":["string","null"]},"resolvedGasPriceGwei":{"type":["number","null"]},"stakes":{"type":"array","items":{"type":"object"}}}}}}}},"security":[]}},"/api/bundle/subscribe":{"post":{"operationId":"post_api_bundle_subscribe","summary":"Subscribe to the all-access bundle","description":"One payment unlocks 2 minutes of free access to 3 bundled endpoints instead of paying each separately.","parameters":[{"name":"subscriberAddress","in":"query","required":true,"schema":{"type":"string"},"description":"Wallet address to grant bundle access to."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"subscriberAddress":{"type":"string"},"unlockedUntil":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.03"},"protocols":[{"x402":{}}]}}},"/api/insured-feed/subscribe":{"post":{"operationId":"post_api_insured_feed_subscribe","summary":"Subscribe to the insured price feed","description":"Pay a premium for an ETH/USD price snapshot; claim a 2x refund if the real price later drifts past your insured tolerance.","parameters":[{"name":"subscriberAddress","in":"query","required":true,"schema":{"type":"string"},"description":"Wallet address eligible for the insurance payout."},{"name":"premiumUsdc","in":"query","required":true,"schema":{"type":"number"},"description":"Premium to pay, up to 5."},{"name":"maxDeviationPct","in":"query","required":false,"schema":{"type":"number"},"description":"Insured tolerance in percent (default 1)."},{"name":"checkDelaySeconds","in":"query","required":false,"schema":{"type":"integer"},"description":"Seconds until the checkpoint, up to 3600 (default 30)."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"subscriptionId":{"type":"string"},"subscriberAddress":{"type":"string"},"premiumUsdc":{"type":"number"},"snapshotEthUsdPrice":{"type":"number"},"maxDeviationPct":{"type":"number"},"subscribedAt":{"type":"string"},"checkAt":{"type":"string"},"status":{"type":"string","enum":["pending-check","held","claim-eligible","refunded"]},"liveEthUsdPriceAtCheck":{"type":["number","null"]},"actualDeviationPct":{"type":["number","null"]}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.001","max":"5"},"protocols":[{"x402":{}}]}}},"/api/reputation":{"get":{"operationId":"get_api_reputation","summary":"On-chain + ledger reputation score","description":"Trust score from real on-chain activity plus our own ledger of settled payments from this address.","parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string"},"description":"Address to score."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"address":{"type":"string"},"trustScore":{"type":"number"},"breakdown":{"type":"object"},"signals":{"type":"object"},"checkedAt":{"type":"string"}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]}}},"/api/gas-history-export":{"get":{"operationId":"get_api_gas_history_export","summary":"Historical gas price export","description":"Raw Ethereum gas price samples over a date range, JSON or CSV, priced by real row count (min $0.005, max 24h range).","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string"},"description":"ISO 8601 range start."},{"name":"to","in":"query","required":true,"schema":{"type":"string"},"description":"ISO 8601 range end."},{"name":"format","in":"query","required":false,"schema":{"type":"string","enum":["json","csv"]},"description":"Either \"json\" (default) or \"csv\"."}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"sampleCount":{"type":"integer"},"samples":{"type":"array","items":{"type":"object","properties":{"timestamp":{"type":"string"},"gasPriceGwei":{"type":"number"}}}}}}}}},"402":{"description":"Payment Required"}},"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.005","max":"2.8800"},"protocols":[{"x402":{}}]}}}}}