{"openapi":"3.1.0","info":{"title":"Perpetual Markets API","version":"1.0.0","description":"Hyperliquid perpetual-futures snapshots and recent trades from the public info API. 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/perp-markets/hyperliquid/snapshot":{"post":{"operationId":"perp_markets_hyperliquid_snapshot","summary":"Hyperliquid perps snapshot","description":"Hyperliquid perpetual-futures snapshot from the public info API metaAndAssetCtxs endpoint. Docs: https://www.brainiac.software/api/perp-markets/hyperliquid-snapshot","externalDocs":{"url":"https://www.brainiac.software/api/perp-markets/hyperliquid-snapshot"},"tags":["perp-markets","hyperliquid","perps","funding rate","open interest","mark price","perpetual futures","oracle price","notional volume","max leverage","BTC perps","ETH perps","HYPE","venue data","official API"],"x-keywords":["hyperliquid","perpetual futures","perps","funding rate","open interest","mark price","oracle price","notional volume","max leverage","BTC perps","ETH perps","HYPE","venue data","official API"],"x-empty-json-probe":true,"x-probe-body":{"coin":"BTC"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"coin":{"type":"string","minLength":1,"maxLength":20},"limit":{"type":"integer","minimum":1,"maximum":500}},"additionalProperties":false},"example":{"coin":"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"},"venue":{"type":"string"},"asOf":{"type":"string"},"markets":{"type":"array","items":{"type":"object","properties":{"coin":{"type":"string"},"markPx":{"type":"string"},"oraclePx":{"type":"string"},"midPx":{"type":"string"},"funding":{"type":"string"},"openInterest":{"type":"string"},"prevDayPx":{"type":"string"},"dayNtlVlm":{"type":"string"},"dayBaseVlm":{"type":"string"},"premium":{"type":"string"},"maxLeverage":{"type":"number"}},"additionalProperties":true}},"source":{"type":"string"},"unavailable":{"type":"array","items":{}},"missing_items":{"type":"array","items":{}}},"additionalProperties":true},"example":{"status":"complete","venue":"hyperliquid","asOf":"2026-11-20T21:44:00.000Z","markets":[{"coin":"BTC","markPx":"91234.5","oraclePx":"91230.1","midPx":"91233.0","funding":"0.0000125","openInterest":"12345.67","prevDayPx":"90000.0","dayNtlVlm":"987654321.0","dayBaseVlm":"1089.0","premium":"0.00004","maxLeverage":40}],"source":"https://api.hyperliquid.xyz/info","unavailable":[],"missing_items":[]}}}},"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/perp-markets/hyperliquid/recent-trades":{"post":{"operationId":"perp_markets_hyperliquid_recent_trades","summary":"Hyperliquid recent trades","description":"Recent Hyperliquid perp prints from the public info API recentTrades endpoint. Docs: https://www.brainiac.software/api/perp-markets/hyperliquid-recent-trades","externalDocs":{"url":"https://www.brainiac.software/api/perp-markets/hyperliquid-recent-trades"},"tags":["perp-markets","hyperliquid","recent trades","perps","prints","btc","ETH","time and size","official API","venue tape","coin"],"x-keywords":["hyperliquid","recent trades","prints","perps","BTC","ETH","time and size","official API","venue tape","coin"],"x-empty-json-probe":false,"x-probe-body":{"coin":"BTC","limit":20},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"coin":{"type":"string","minLength":1,"maxLength":20},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["coin"],"additionalProperties":false},"example":{"coin":"BTC","limit":20}}}},"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"},"venue":{"type":"string"},"asOf":{"type":"string"},"coin":{"type":"string"},"trades":{"type":"array","items":{"type":"object","properties":{"coin":{"type":"string"},"side":{"type":"string"},"px":{"type":"string"},"sz":{"type":"string"},"time":{"type":"number"},"hash":{"type":"string"},"tid":{"type":"number"}},"additionalProperties":true}},"source":{"type":"string"},"unavailable":{"type":"array","items":{}},"missing_items":{"type":"array","items":{}}},"additionalProperties":true},"example":{"status":"complete","venue":"hyperliquid","asOf":"2026-11-20T21:44:00.000Z","coin":"BTC","trades":[{"coin":"BTC","side":"B","px":"91234.5","sz":"0.01","time":1763675040000,"hash":"0xabc","tid":1}],"source":"https://api.hyperliquid.xyz/info","unavailable":[],"missing_items":[]}}}},"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"}}}},"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":{}}}}}}}}