{"openapi":"3.1.0","info":{"title":"Crypto Spot Prices API","version":"1.0.0","description":"Ticker spot prices comparing Chainlink Data Feeds on Base with the Coinbase Exchange public ticker, plus on-chain Chainlink price history. Paid with x402 exact USDC on Base. No account is required.","contact":{"email":"support@brainiac.software"},"x-guidance":"BRAINIAC.software is a pay-per-call API for software agents. No account or API key is required.\nThis root OpenAPI is a token-light discovery index. Full request/response schemas and examples are at /api/{group}/openapi.json; x-api-groups lists every group URL.\nPayment uses x402 with exact USDC on Base (8453). Unpaid GET/HEAD/POST return 402 payment terms for discovery.\nHow to call: POST JSON → verify payTo/asset/network against /api/v1/catalog and /.well-known/x402 → pay and retry with payment-signature. Settlement only on HTTP 2xx.\nIdempotency-Key: 64 hex chars. Coverage HTTP 2xx with status complete|partial and real data is charged; failed or empty results are not charged. Free lookup: GET /api/v1/results/{result_id}.\nOutputs are drafts for human review — not official determinations or legal advice."},"servers":[{"url":"https://www.brainiac.software"}],"paths":{"/api/v1/crypto-prices/spot":{"post":{"operationId":"crypto_prices_spot","summary":"Crypto spot price","description":"Return a USD spot price for a crypto ticker by comparing Chainlink Data Feeds on Base and the Coinbase Exchange public ticker. Docs: https://www.brainiac.software/api/crypto-prices/spot","externalDocs":{"url":"https://www.brainiac.software/api/crypto-prices/spot"},"tags":["crypto-prices","crypto price","spot price","bitcoin price","ETH price","ticker","SOL price","BTC USD","Chainlink","Coinbase","two source","mark price","24h change"],"x-keywords":["crypto price","spot price","bitcoin price","ETH price","SOL price","ticker","BTC USD","Chainlink","Coinbase","two source","mark price","24h change"],"x-empty-json-probe":false,"x-probe-body":{"symbol":"BTC"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":24},"quote":{"type":"string","minLength":2,"maxLength":12}},"required":["symbol"],"additionalProperties":false},"example":{"symbol":"BTC"}}}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"JSON result. A settled 2xx includes payment-response. Settlement is only for HTTP 2xx with status complete or partial and real data; status failed or empty payloads return non-2xx and are not charged.","headers":{"payment-response":{"$ref":"#/components/headers/PaymentResponse"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"retrievedAt":{"type":"string"},"symbol":{"type":"string"},"quote":{"type":"string"},"price":{"type":"string"},"agree":{"type":"string"},"differencePct":{"type":"number"},"change24hPct":{"type":"number"},"volume24h":{"type":"string"},"sources":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"network":{"type":"string"},"feed":{"type":"string"},"proxy":{"type":"string"},"price":{"type":"string"},"updatedAt":{"type":"string"},"decimals":{"type":"number"},"productId":{"type":"string"},"bid":{"type":"string"},"ask":{"type":"string"},"time":{"type":"string"}},"additionalProperties":true},"description":"Provenance only (source, url, retrievedAt). Not keyed by check id and does not carry success or error. A check in missing_items does not remove its upstream from sources[]; unavailability is only in missing_items (and unavailable findings)."},"unavailable":{"type":"array","items":{}},"missing_items":{"type":"array","items":{}},"agreeThresholdPct":{"type":"number"}},"additionalProperties":true},"example":{"status":"complete","retrievedAt":"2026-11-20T21:36:20.000Z","symbol":"BTC","quote":"USD","price":"58718.89","agree":"pass","differencePct":0.04,"change24hPct":-4.47,"volume24h":"23253.21341197","sources":[{"name":"chainlink","network":"base","feed":"BTC / USD","proxy":"0x0000000000000000000000000000000000000001","price":"58740.12","updatedAt":"2026-11-20T21:35:00.000Z","decimals":8},{"name":"coinbase","productId":"BTC-USD","price":"58718.89","bid":"58718.89","ask":"58718.90","time":"2026-11-20T21:36:20.000Z"}],"unavailable":[],"missing_items":[],"agreeThresholdPct":1}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"413":{"$ref":"#/components/responses/RequestTooLarge"},"500":{"$ref":"#/components/responses/OperationFailed"},"502":{"$ref":"#/components/responses/SettlementUnknown"},"503":{"$ref":"#/components/responses/PaymentsUnavailable"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.001"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}},"/api/v1/crypto-prices/history":{"post":{"operationId":"crypto_prices_history","summary":"Crypto price history","description":"Historical USD prices for a crypto ticker such as BTC, ETH, or SOL from Chainlink Data Feeds on Base. Docs: https://www.brainiac.software/api/crypto-prices/history","externalDocs":{"url":"https://www.brainiac.software/api/crypto-prices/history"},"tags":["crypto-prices","crypto price","price history","chainlink","BTC ETH SOL","on-chain","crypto price history","Chainlink history","BTC USD history","ETH price chart","SOL historical price","aggregator rounds","first last high low","on-chain feed"],"x-keywords":["crypto price history","Chainlink history","BTC USD history","ETH price chart","SOL historical price","aggregator rounds","first last high low","on-chain feed"],"x-empty-json-probe":false,"x-probe-body":{"symbol":"ETH","days":30},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"symbol":{"type":"string","minLength":1,"maxLength":24},"quote":{"type":"string","minLength":2,"maxLength":12},"days":{"default":30,"type":"integer","minimum":1,"maximum":365},"cursor":{"type":"string","minLength":1,"maxLength":4000}},"required":["symbol"],"additionalProperties":false},"example":{"symbol":"ETH","days":30}}}},"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"responses":{"200":{"description":"JSON result. A settled 2xx includes payment-response. Settlement is only for HTTP 2xx with status complete or partial and real data; status failed or empty payloads return non-2xx and are not charged.","headers":{"payment-response":{"$ref":"#/components/headers/PaymentResponse"}},"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"symbol":{"type":"string"},"quote":{"type":"string"},"days":{"type":"number"},"first":{"type":"string"},"last":{"type":"string"},"high":{"type":"string"},"low":{"type":"string"},"changePct":{"type":"string"},"points":{"type":"array","items":{"type":"object","properties":{"time":{"type":"string"},"price":{"type":"string"},"roundId":{"type":"string"}},"additionalProperties":true}},"source":{"type":"string"},"asOf":{"type":"string"},"limitation":{"type":"string"},"missing_items":{"type":"array","items":{}}},"additionalProperties":true},"example":{"status":"complete","data":{"symbol":"ETH","quote":"USD","days":30,"first":"3120.12","last":"3045.55","high":"3350.01","low":"2890.40","changePct":"-2.3901","points":[{"time":"2026-10-21T12:00:00.000Z","price":"3120.12","roundId":"18446744073709552000"},{"time":"2026-11-20T12:00:00.000Z","price":"3045.55","roundId":"18446744073709553000"}],"asOf":"2026-11-20T22:40:00.000Z","limitation":"On-chain aggregator rounds, not exchange OHLCV or volume. first/last/high/low/changePct are derived from the official rounds returned."},"nextCursor":null,"progress":{"processed":0,"total":null,"unit":"items","scannedRange":null},"sources":[],"missing_items":[],"limitations":[]}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"402":{"$ref":"#/components/responses/PaymentRequired"},"409":{"$ref":"#/components/responses/IdempotencyConflict"},"413":{"$ref":"#/components/responses/RequestTooLarge"},"500":{"$ref":"#/components/responses/OperationFailed"},"502":{"$ref":"#/components/responses/SettlementUnknown"},"503":{"$ref":"#/components/responses/PaymentsUnavailable"}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.002"},"protocols":[{"x402":{"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}],"facilitator":"https://api.cdp.coinbase.com/platform/v2/x402"}}}},"components":{"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}},"headers":{"PaymentResponse":{"description":"Present on settled 2xx only. Facilitator settlement receipt for the x402 payment (not present on 4xx/5xx, which are not charged).","schema":{"type":"string"}}},"responses":{"InvalidRequest":{"description":"Invalid JSON or request schema. Not charged (no payment-response). If this 400 is returned before the Idempotency-Key is reserved, the key is not stored — fix the body and you may reuse the key. If an operation-path 400 was stored after a payment-signature was attached, the same key + same body replays it; the same key + a different body returns 409."},"PaymentRequired":{"description":"Payment required. The JSON body is the x402 PaymentRequired object. An unpaid 402 does not store the Idempotency-Key. A 402 after payment-signature releases the key and includes prior-payment-attempt (nonce, settled false|unknown). Not charged; no payment-response. Before re-signing after a post-signature 402, check USDC authorizationState(payer, nonce) on Base."},"IdempotencyConflict":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Same key with a different body after a stored result returns conflict. Reusing the key cannot trigger a second charge. Not charged when settlement did not occur."},"RequestTooLarge":{"description":"Request body exceeds the 24 MB limit. Not charged."},"SettlementUnknown":{"description":"Facilitator verify/settle transport failure (often timeout). After payment-signature this is returned as SETTLEMENT_UNKNOWN with prior-payment-attempt; the outcome is stored under the Idempotency-Key. With the shared store configured, other instances replay it instead of settling again; without it, each instance keeps its own memory. The authorization may already be settled on-chain — do not re-sign until USDC authorizationState(payer, nonce) on Base is false."},"PaymentsUnavailable":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run. Not charged; no payment-response. A 503 after payment-signature releases the Idempotency-Key and includes prior-payment-attempt."},"OperationFailed":{"description":"Operation failed before settlement, so no payment is taken (no payment-response). The error is stored: reuse the same Idempotency-Key and body to retrieve it without paying again. Use a new key for a fresh attempt with a new payment-signature."}},"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}