{
  "openapi": "3.1.0",
  "info": {
    "title": "StablecoinPulse API",
    "description": "Real-time stablecoin market intelligence — GENIUS Act compliance reads, yield comparison, peg-stability monitoring, cross-chain flow tracking, payment-rail comparison, reserve-attestation freshness, and global regulatory status. All endpoints require x402 payment (USDC on Base mainnet) via the PAYMENT-SIGNATURE header.",
    "version": "1.0.0",
    "contact": {
      "url": "https://stablecoinpulse.theaslangroupllc.com"
    }
  },
  "servers": [
    {
      "url": "https://stablecoinpulse.theaslangroupllc.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 payment signature. Send a GET request without this header to receive a 402 with payment requirements. Sign the payment and retry with the PAYMENT-SIGNATURE header."
      }
    }
  },
  "security": [
    {
      "x402": []
    }
  ],
  "paths": {
    "/api/issuer-check": {
      "get": {
        "summary": "GENIUS Act issuer compliance check",
        "description": "GENIUS Act compliance read for a named stablecoin issuer — charter type, regulator, attestation cadence, and reserve composition where publicly disclosed, plus Federal Register rulemaking citations.",
        "operationId": "issuerCheck",
        "parameters": [
          { "name": "issuer", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Issuer name, e.g. Circle, Tether, Paxos, Ripple. One of issuer or stablecoin is required." },
          { "name": "stablecoin", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Stablecoin ticker, e.g. USDT, USDC, PYUSD. One of issuer or stablecoin is required." },
          { "name": "lang", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Response language, e.g. en, es, fr, de, ja, zh, ko, pt, ar. Default en." }
        ],
        "responses": {
          "200": { "description": "Issuer compliance brief with Federal Register citations." },
          "402": { "description": "Payment required — x402 USDC on Base." }
        },
        "x-price-usd": 0.25,
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/yield-compare": {
      "get": {
        "summary": "Stablecoin yield comparison",
        "description": "Effective-yield comparison across yield-bearing stablecoins and stablecoin neobank/card products, with the GENIUS Act interest-vs-rewards distinction labeled per product.",
        "operationId": "yieldCompare",
        "parameters": [
          { "name": "lang", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Response language, e.g. en, es, fr, de, ja, zh, ko, pt, ar. Default en." }
        ],
        "responses": {
          "200": { "description": "Yield comparison across stablecoin products." },
          "402": { "description": "Payment required — x402 USDC on Base." }
        },
        "x-price-usd": 0.25,
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/depeg-watch": {
      "get": {
        "summary": "Stablecoin peg-deviation watch",
        "description": "Live peg-deviation read for a named stablecoin — current price vs $1, 30-day peg history, and a 24h-volume liquidity-depth proxy. Deterministic math, cited to CoinGecko.",
        "operationId": "depegWatch",
        "parameters": [
          { "name": "symbol", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Stablecoin ticker, e.g. USDT, USDC, DAI, USDE, USD1." },
          { "name": "lang", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Response language, e.g. en, es, fr, de, ja, zh, ko, pt, ar. Default en." }
        ],
        "responses": {
          "200": { "description": "Peg-deviation brief with 30-day history." },
          "402": { "description": "Payment required — x402 USDC on Base." }
        },
        "x-price-usd": 0.15,
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/flows": {
      "get": {
        "summary": "Cross-chain stablecoin flow tracking",
        "description": "Cross-chain supply distribution and 7d/30d migration trends for a named stablecoin — deterministic deltas cited to DeFiLlama.",
        "operationId": "flows",
        "parameters": [
          { "name": "symbol", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Stablecoin ticker, e.g. USDT, USDC, DAI, USDE." },
          { "name": "lang", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Response language, e.g. en, es, fr, de, ja, zh, ko, pt, ar. Default en." }
        ],
        "responses": {
          "200": { "description": "Cross-chain flow brief." },
          "402": { "description": "Payment required — x402 USDC on Base." }
        },
        "x-price-usd": 0.15,
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/rails-compare": {
      "get": {
        "summary": "Stablecoin payment-rail comparison",
        "description": "Payment-rail comparison across stablecoin-native L1s (Plasma, Circle Arc, Stripe/Paradigm Tempo, Tether Stable) and incumbent chains (Tron, Solana, Base) — fees, finality, ecosystem maturity, grounded and cited.",
        "operationId": "railsCompare",
        "parameters": [
          { "name": "rails", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Comma-separated subset of rail ids, e.g. plasma,arc,tron. Default: all 7 registered rails." },
          { "name": "lang", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Response language, e.g. en, es, fr, de, ja, zh, ko, pt, ar. Default en." }
        ],
        "responses": {
          "200": { "description": "Payment-rail comparison brief." },
          "402": { "description": "Payment required — x402 USDC on Base." }
        },
        "x-price-usd": 0.25,
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/reserve-check": {
      "get": {
        "summary": "Reserve-attestation freshness check",
        "description": "Reserve-attestation freshness and composition check for a named stablecoin issuer — loud staleness flag when no recent attestation date can be found.",
        "operationId": "reserveCheck",
        "parameters": [
          { "name": "issuer", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Issuer name, e.g. Tether, Circle, Paxos. One of issuer or stablecoin is required." },
          { "name": "stablecoin", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Stablecoin ticker, e.g. USDT, USDC. One of issuer or stablecoin is required." },
          { "name": "lang", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Response language, e.g. en, es, fr, de, ja, zh, ko, pt, ar. Default en." }
        ],
        "responses": {
          "200": { "description": "Reserve-attestation freshness brief." },
          "402": { "description": "Payment required — x402 USDC on Base." }
        },
        "x-price-usd": 0.2,
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/reg-watch": {
      "get": {
        "summary": "Global stablecoin regulatory watch",
        "description": "GENIUS/CLARITY Act and global stablecoin regulatory status by jurisdiction — US grounded in the Federal Register API, non-US jurisdictions grounded in live search.",
        "operationId": "regWatch",
        "parameters": [
          { "name": "jurisdiction", "in": "query", "required": true, "schema": { "type": "string" }, "description": "Jurisdiction code or name, e.g. US, EU, UK, JP, SG, HK, AE. Any jurisdiction accepted." },
          { "name": "lang", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Response language, e.g. en, es, fr, de, ja, zh, ko, pt, ar. Default en." }
        ],
        "responses": {
          "200": { "description": "Regulatory status brief with citations." },
          "402": { "description": "Payment required — x402 USDC on Base." }
        },
        "x-price-usd": 0.15,
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/snapshot": {
      "get": {
        "summary": "Stablecoin market snapshot",
        "description": "Market-wide stablecoin dashboard read — total market cap, top 7d movers, chain-share distribution, and recent launches. Deterministic aggregates cited to DeFiLlama.",
        "operationId": "snapshot",
        "parameters": [
          { "name": "lang", "in": "query", "required": false, "schema": { "type": "string" }, "description": "Response language, e.g. en, es, fr, de, ja, zh, ko, pt, ar. Default en." }
        ],
        "responses": {
          "200": { "description": "Market snapshot brief." },
          "402": { "description": "Payment required — x402 USDC on Base." }
        },
        "x-price-usd": 0.1,
        "x-agent-use-case": "on-demand"
      }
    }
  }
}
