{"openapi":"3.1.0","info":{"title":"Bar Integrity","version":"1.0.0","contact":{"email":"open-cost-research-20261006@agentmail.to"},"description":"Bounded OHLCV consistency-report pilot. 0.02 native USDC on Base, x402 v2 exact EIP-3009. No market forecasts. Raw input is not retained."},"servers":[{"url":"https://trading-lab-turnover-notes.vironnimo.chatgpt.site"}],"paths":{"/api/check":{"post":{"operationId":"checkOhlcv","summary":"Check up to 2000 OHLCV rows","description":"Request requirements without a payment signature. Python HTTP clients should send an honest application name in User-Agent; the default Python-urllib identifier can receive HTTP403 from hosting before this API. Confirm JSON HTTP402 payment requirements before signing. Then retry identical JSON with the buyer-signed PAYMENT-SIGNATURE. Save the signature and exact body BEFORE the first signed request. Pending (202), a timeout or a restart must resume that SAME saved purchase; a new generic x402 call can authorize another payment. Use the Node buyer helper linked in externalDocs. Invalid envelopes are rejected before settlement. Defective individual rows are valid inputs. Reports include input_sha256 of exact UTF-8 body bytes. Maximum request size: 600000 bytes.","externalDocs":{"description":"Buyer download: prepare once, then resume the saved purchase without a signer","url":"https://trading-lab-turnover-notes.vironnimo.chatgpt.site/bar-integrity#buyer-recovery"},"parameters":[{"name":"PAYMENT-SIGNATURE","in":"header","required":false,"schema":{"type":"string"},"description":"Base64 x402 v2 PaymentPayload; ordinary 65-byte EOA EIP-3009 authorization."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"OHLCV audit envelope","type":"object","required":["rows"],"additionalProperties":false,"properties":{"rows":{"type":"array","minItems":1,"maxItems":2000,"items":{},"description":"Each row is expected to contain timestamp, open, high, low, close and volume. Timestamps must be integer Unix epoch milliseconds or ISO 8601 timestamps with seconds and an explicit Z or +/-HH:MM timezone (up to three fractional-second digits); epoch seconds are not detected or converted. Prices and volume may be finite JSON numbers or decimal strings without whitespace. Malformed row items are deliberately accepted by the envelope so the report can count and identify every invalid row. Row-shape and value checks are report findings, not pre-payment rejection rules."},"interval_seconds":{"type":"integer","minimum":1,"maximum":9007199254740,"description":"Optional assertion that this series uses continuous 24/7 spacing. Omit for equity/session/calendar data unless that assumption is justified. No gaps are inferred when omitted."}}},"example":{"interval_seconds":3600,"rows":[{"timestamp":"2026-10-01T00:00:00Z","open":"100","high":"103","low":"99","close":"102","volume":"10"},{"timestamp":"2026-10-01T02:00:00Z","open":"102","high":"104","low":"101","close":"105","volume":"12"}]}}}},"responses":{"200":{"description":"Verified payment and saved deterministic report","content":{"application/json":{"schema":{"type":"object"},"example":{"schema_version":1,"checker_version":"1.0.0","status":"issues_found","row_reference":"zero_based_input_index","counts":{"rows_received":2,"rows_with_issues":1,"rows_without_issues":1,"invalid_input_rows":0,"malformed_rows":0,"valid_timestamp_rows":2,"invalid_timestamp_rows":0,"unique_valid_timestamps":2,"duplicate_timestamp_rows":0,"out_of_order_pairs":0,"ohlc_violation_rows":1,"negative_volume_rows":0,"zero_volume_rows":0,"issue_count":2,"details_returned":2,"omitted_issue_count":0},"issue_counts":{"ohlc_inconsistent":1,"gap":1},"details_truncated":false,"cadence":{"checked":true,"assumption":"caller_declares_continuous_24_7","interval_seconds":3600,"compared_unique_pairs":1,"gap_count":1,"exact_missing_intervals":1,"unaligned_gap_count":0,"off_cadence_pair_count":0},"issues":[{"row_index":1,"code":"ohlc_inconsistent","reasons":["close_above_high"]},{"row_index":1,"code":"gap","related_row_index":0,"missing_intervals":1}],"limitations":["Input inspection only: no repair, source authentication, venue rules, or independent market-data verification.","No trading advice, future-return prediction, look-ahead assessment, forming-candle check, or freshness certification.","Cadence uses sorted unique valid timestamps only. Invalid timestamps can affect apparent gaps; original rows are never reordered or discarded.","Supplying interval_seconds asserts continuous 24/7 spacing. No exchange calendars, sessions, holidays, or UTC grid alignment are inferred.","JSON numbers are inspected as received; prior precision loss is unrecoverable. Bounded decimal strings are compared exactly.","Zero or negative prices are not rejected solely by sign; instrument-specific validity is unknown. Zero volume is counted, not treated as an error.","At most 100 issue details are returned; all rows and detected issues contribute to the counts. No issues found is not a completeness guarantee."]}}}},"202":{"description":"Unresolved payment. Retry identical body and payment signature; no resubmission to facilitator."},"400":{"description":"Invalid envelope or payment"},"402":{"description":"x402 payment requirements; inspect PAYMENT-REQUIRED header"},"403":{"description":"Hosting may reject the HTTP client before the API. Use an honest application User-Agent; verify an unsigned JSON402 response before signing. A403 is not a payment request."},"409":{"description":"Authorization already bound to different input"},"410":{"description":"Pilot closed to new purchases"},"413":{"description":"Request too large"},"503":{"description":"Disabled, capacity reached or temporary unavailability"}},"x-payment-info":{"network":"eip155:8453","asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","amount":"20000","payTo":"0x01Bdd63D8630bbF133853B4F6cAfcaB369aafBc0","scheme":"exact"}}},"/api/example":{"get":{"operationId":"freeExample","security":[],"summary":"Free fixed synthetic demonstration","responses":{"200":{"description":"Example report; not a user-upload endpoint"}}}},"/api/availability":{"get":{"operationId":"availability","security":[],"summary":"Current pilot capacity and sales state","responses":{"200":{"description":"Availability"},"503":{"description":"Storage unavailable"}}}}}}