{
  "schema_version": "1.0.0",
  "schema_type": "x402library.discovery-contract",
  "updated_at": "2026-08-25",
  "provider": {
    "id": "x402library.com",
    "name": "x402 Library",
    "canonical_url": "https://x402library.com",
    "affiliation": "Independent service built on the open x402 standard; not the x402 Foundation."
  },
  "agent_selection": {
    "search_when": [
      "fresh BTCUSDT or ETHUSDT market and derivatives state is missing",
      "a downstream action requires a bounded preflight receipt",
      "caller-supplied market evidence needs deterministic risk classification",
      "funding, open interest, basis, positioning, and liquidity evidence must be checked together",
      "an agent must decide whether buying market analysis has positive expected utility"
    ],
    "hard_filters": ["supported input", "endpoint callable", "within budget", "Base mainnet USDC allowed", "latency acceptable", "structured result accepted"],
    "default_network": "eip155:8453",
    "default_currency": "USDC",
    "payment_protocol": "x402-v2"
  },
  "products": [
    {
      "id": "data.live-market-snapshot-v1",
      "goal": "Obtain a fresh point-in-time BTCUSDT or ETHUSDT market snapshot.",
      "intents": ["get current BTC market state", "get current ETH derivatives state", "check funding open interest basis and liquidity now"],
      "gap_types": ["FRESHNESS", "CAPABILITY"],
      "endpoint": "https://x402library.com/v1/data/market-snapshot",
      "method": "POST",
      "input_summary": { "asset": ["BTCUSDT", "ETHUSDT"] },
      "price": { "amount": "0.003", "currency": "USDC", "network": "eip155:8453", "unit": "request" },
      "availability": { "status": "sentinel_freshness_dependent", "maximum_saleable_age_seconds": 90, "stale_checked_before_payment": true },
      "buy_when": ["a fresh single-venue snapshot is sufficient", "cached market data is older than the task permits"],
      "do_not_buy_when": ["multi-venue confirmation is required", "a price forecast or trade command is required", "the endpoint reports stale data before payment"],
      "success_artifact": ["market", "derivatives", "regime", "quality", "provenance", "snapshot_hash"],
      "claim_boundary": ["single venue only", "no forecast", "no investment advice", "no order execution"]
    },
    {
      "id": "market.purchase-precheck-v1",
      "goal": "Decide whether purchasing additional market analysis is rational before payment.",
      "intents": ["should my agent buy market analysis", "compare analysis cost with expected loss reduction", "check autonomous spending policy"],
      "gap_types": ["COST", "POLICY", "RISK_PROOF"],
      "endpoint": "https://x402library.com/v1/market/purchase-precheck",
      "method": "POST",
      "price": { "amount": "0.00", "currency": "USDC", "unit": "request" },
      "buy_when": ["never required; this is a free pre-purchase check"],
      "do_not_buy_when": ["caller cannot supply probability, loss, budget, and deadline assumptions"],
      "success_artifact": ["BUY_ANALYSIS", "SKIP_ANALYSIS", "REQUIRE_APPROVAL"],
      "claim_boundary": ["caller-supplied economics", "no guaranteed loss reduction"]
    },
    {
      "id": "market.crypto-event-aware-execution-preflight-v1",
      "goal": "Audit caller-supplied market and event evidence before a crypto action.",
      "intents": ["preflight a crypto trade", "check stale event evidence before execution", "obtain a bounded execution decision receipt"],
      "gap_types": ["RISK_PROOF", "OUTCOME"],
      "endpoint": "https://x402library.com/v1/market/execution-preflight",
      "method": "POST",
      "price": { "amount": "0.01", "currency": "USDC", "network": "eip155:8453", "unit": "request" },
      "buy_when": ["the caller already has point-in-time evidence", "a deterministic bounded preflight is required"],
      "do_not_buy_when": ["market data must be fetched", "profit prediction or order execution is required"],
      "success_artifact": ["CONTINUE", "WAIT", "REDUCE", "ABSTAIN", "ESCALATE", "request_hash", "result_hash"],
      "claim_boundary": ["caller-supplied evidence only", "no source-truth verification", "no forecast", "no execution"]
    },
    {
      "id": "market.funding-crowding-risk-gate-v1",
      "goal": "Classify funding and positioning crowding from supplied derivatives evidence.",
      "intents": ["check crowded crypto positioning", "audit funding open interest and basis risk", "gate a trade on derivatives crowding"],
      "gap_types": ["RISK_PROOF", "CONFLICT"],
      "endpoint": "https://x402library.com/v1/market/funding-crowding-risk",
      "method": "POST",
      "price": { "amount": "0.01", "currency": "USDC", "network": "eip155:8453", "unit": "request" },
      "buy_when": ["funding, OI, basis, positioning, liquidity, cost, and volatility evidence are available"],
      "do_not_buy_when": ["a liquidation forecast is required", "caller lacks the required derivatives evidence"],
      "success_artifact": ["action", "crowding_state", "crowding_score", "reason_codes", "result_hash"],
      "claim_boundary": ["no liquidation forecast", "no market data bundled", "no order execution"]
    },
    {
      "id": "market.regime-risk-checkpoint-v1",
      "goal": "Classify current regime risk from supplied volatility, correlation, liquidity, spread, drawdown, and trend evidence.",
      "intents": ["check whether market regime evidence is stable", "gate an action on volatility and liquidity regime", "obtain an abstention-capable regime checkpoint"],
      "gap_types": ["RISK_PROOF", "CONFLICT"],
      "endpoint": "https://x402library.com/v1/market/regime-risk-checkpoint",
      "method": "POST",
      "price": { "amount": "0.01", "currency": "USDC", "network": "eip155:8453", "unit": "request" },
      "buy_when": ["all required regime evidence is already available", "a portable classification is needed"],
      "do_not_buy_when": ["a future regime forecast is required", "source truth must be independently verified"],
      "success_artifact": ["STABLE", "CAUTION", "DEFER", "ABSTAIN", "result_hash"],
      "claim_boundary": ["classification only", "no regime forecast", "no investment advice"]
    },
    {
      "id": "market.trade-safety-decision-v1",
      "goal": "Combine execution and derivatives evidence into a bounded trade-safety decision.",
      "intents": ["decide whether to allow reduce defer or block a proposed trade", "combine execution and crowding checks", "obtain a machine-readable trade safety receipt"],
      "gap_types": ["RISK_PROOF", "CONFLICT", "OUTCOME"],
      "endpoint": "https://x402library.com/v1/market/trade-safety-decision",
      "method": "POST",
      "price": { "amount": "0.02", "currency": "USDC", "network": "eip155:8453", "unit": "request" },
      "buy_when": ["execution and derivatives evidence are both supplied", "one combined bounded decision is preferable to separate checks"],
      "do_not_buy_when": ["the agent needs data acquisition, return prediction, or order execution"],
      "success_artifact": ["ALLOW_TRADE", "REDUCE_TRADE", "DEFER_TRADE", "BLOCK_TRADE", "size_multiplier", "component_decisions", "result_hash"],
      "claim_boundary": ["caller-supplied evidence", "no profit guarantee", "no trade execution"]
    }
  ],
  "integration": {
    "openapi": "https://x402library.com/openapi.json",
    "pricing": "https://x402library.com/pricing.json",
    "status": "https://x402library.com/status.json",
    "trust": "https://x402library.com/trust.json",
    "llms": "https://x402library.com/llms.txt",
    "agent_manifest": "https://x402library.com/.well-known/agent.json"
  },
  "failure_policy": {
    "invalid_input": "rejected before payment",
    "stale_live_data": "free 503 before payment",
    "empty_discovery_probe": "returns metadata but cannot be settled",
    "paid_retry": "retry identical request with PAYMENT-SIGNATURE and reuse X-X402LIBRARY-Request-Id"
  }
}
