---
title: "Observed-value comparison"
method: POST
path: "/api/paid/v1/compare"
---

# Observed-value comparison

`POST /api/paid/v1/compare`

## Request

- Base URL: `https://api.xguardgate.com`
- URL: `https://api.xguardgate.com/api/paid/v1/compare`
- Auth: none declared. Required headers: `Idempotency-Key`

Compare the last stored observation at or before each of two times. Reports observation times and evidence; unavailable historical values remain UNKNOWN. Submit the unsigned request first. Sign only the returned x402 v2 exact offer on Base if it fits your USDC limit. Retry with the original body and idempotency key, the signature and the returned quote. After uncertainty, recover the original operation via the catalog instructions.

## Headers

- `Idempotency-Key` string, required
- `Payment-Signature` string
- `X-XGuard-Quote` string

## Request body

- object
  - `max_amount_atomic` string, required: Buyer-authorized maximum in 6-decimal USDC atomic units. No payment occurs merely by supplying a cap.
  - `fact` string, required: Canonical public fact ID, e.g. npm/react/latest-version; never an arbitrary URL.
  - `from` string, date-time, required
  - `to` string, date-time, required

## Response `200`

Purchased result with settlement evidence and signed receipt

- object
  - `ok` unknown, required
  - `result` object, required
  - `receipt` object, required
  - `settlement` object, required
  - `proofrail` object, required

## Other responses

- `400`: Invalid request, budget, idempotency key, or quote
- `402`: Payment challenge or payment rejected
- `404`: Requested fact unavailable
- `409`: Conflicting or already reserved payment operation
- `413`: Request body too large
- `415`: Expected application/json
- `429`: Rate limit exceeded
- `503`: Service unavailable or settlement uncertain. Recover the original operation before any new purchase.

---

[API](https://skmtc.dev/xguardgate/apis/xguard-live-paid-data-api.md) - [All operations](https://skmtc.dev/xguardgate/apis/xguard-live-paid-data-api/llms.txt) - [OpenAPI document](https://skmtc.dev/xguardgate/apis/xguard-live-paid-data-api/revisions/d4c8fb72eb1c?raw)
