{
  "openapi": "3.1.0",
  "info": {
    "title": "OnchainPulse API",
    "description": "Intelligence API for the onchain financial transition. Decodes legislation, tracks RWA tokenization, models sector scenarios, guides onchain integration. All endpoints require x402 payment (USDC on Base mainnet) via the PAYMENT-SIGNATURE header.",
    "version": "1.1.0",
    "contact": {
      "email": "info@theaslangroupllc.com"
    }
  },
  "servers": [
    {
      "url": "https://onchainpulse-nine.vercel.app"
    }
  ],
  "paths": {
    "/api/legislation": {
      "get": {
        "summary": "Legislative intelligence \u2014 plain English bill translation with sector impact",
        "description": "Searches Congress.gov and real-time sources to translate any pending or enacted legislation into plain English with sector impact analysis and passage probability. Global: US, EU, UK, Singapore, UAE.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "description": "Bill name or topic (e.g. 'GENIUS Act', 'stablecoin regulation', 'MiCA')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jurisdiction",
            "in": "query",
            "description": "Jurisdiction to focus on",
            "schema": {
              "type": "string",
              "enum": [
                "us",
                "eu",
                "uk",
                "sg",
                "uae",
                "global"
              ],
              "default": "us"
            }
          },
          {
            "name": "action",
            "in": "query",
            "description": "Type of analysis",
            "schema": {
              "type": "string",
              "enum": [
                "summary",
                "status",
                "impact",
                "timeline"
              ],
              "default": "summary"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "description": "Response language (ISO 639-1 code)",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Legislative intelligence brief"
          },
          "402": {
            "description": "Payment required",
            "headers": {
              "PAYMENT-REQUIRED": {
                "description": "x402 payment requirements",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-price-usd": 0.15,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/rwa": {
      "get": {
        "summary": "Real world asset intelligence \u2014 market data and institutional tracking",
        "description": "Tracks the tokenized RWA market with live DefiLlama protocol data. Covers institutional moves by BlackRock, DTCC, JPMorgan, BNY Mellon, State Street, and others.",
        "parameters": [
          {
            "name": "action",
            "in": "query",
            "description": "Analysis type",
            "schema": {
              "type": "string",
              "enum": [
                "market",
                "asset-class",
                "institutional",
                "pipeline"
              ],
              "default": "market"
            }
          },
          {
            "name": "asset_class",
            "in": "query",
            "description": "Specific asset class focus (e.g. 'US Treasuries', 'real estate', 'private credit')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "RWA market intelligence brief"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.15,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/scenario": {
      "get": {
        "summary": "Sector impact scenario modeling \u2014 if/then structural analysis",
        "description": "Models the structural sector impact of regulatory developments or institutional events. No investment advice. Describes entity types and business models that are advantaged or face headwinds.",
        "parameters": [
          {
            "name": "trigger",
            "in": "query",
            "description": "The development to model (e.g. 'GENIUS Act passes', 'DTCC full tokenization launch', 'MiCA enforcement begins')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sector",
            "in": "query",
            "description": "Sector to focus on, or 'all' for comprehensive coverage",
            "schema": {
              "type": "string",
              "default": "all"
            }
          },
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "ifthen",
                "probability",
                "timeline"
              ],
              "default": "ifthen"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Sector impact scenario brief"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.2,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/transition": {
      "get": {
        "summary": "Onchain transition guide \u2014 practical onboarding by type",
        "description": "Step-by-step practical guidance for entering the onchain economy. Covers individuals (self-custody, stablecoins), businesses (payments, treasury), developers (Base/Ethereum), and payment integration.",
        "parameters": [
          {
            "name": "type",
            "in": "query",
            "description": "Type of transition",
            "schema": {
              "type": "string",
              "enum": [
                "individual",
                "business",
                "developer",
                "payment"
              ],
              "default": "individual"
            }
          },
          {
            "name": "context",
            "in": "query",
            "description": "Additional context about the user's situation",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transition guide with steps, tools, and jurisdiction notes"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/monitor": {
      "get": {
        "summary": "Institutional onchain activity monitor \u2014 weekly/monthly brief",
        "description": "Synthesizes recent institutional onchain developments: tokenization launches, regulatory updates, infrastructure milestones, product announcements from major banks, asset managers, and exchanges.",
        "parameters": [
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "week",
                "month"
              ],
              "default": "week"
            }
          },
          {
            "name": "topic",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "rwa",
                "legislation",
                "institutional",
                "all"
              ],
              "default": "all"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Institutional activity brief"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-payment": "x402",
        "x-agent-use-case": "scheduled"
      }
    },
    "/api/compliance": {
      "get": {
        "summary": "Regulatory compliance intelligence \u2014 jurisdiction-specific framework guidance",
        "description": "Provides regulatory framework intelligence for crypto, stablecoin, and tokenized asset activities by jurisdiction. Covers MiCA (EU), GENIUS Act (US), FCA registration (UK), MAS PSA (Singapore), VARA (UAE). Educational intelligence, not legal advice.",
        "parameters": [
          {
            "name": "jurisdiction",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "us",
                "eu",
                "uk",
                "sg",
                "uae",
                "global"
              ],
              "default": "us"
            }
          },
          {
            "name": "use_case",
            "in": "query",
            "description": "What the entity wants to do (e.g. 'issue a stablecoin', 'operate a crypto exchange', 'accept USDC payments')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "framework",
            "in": "query",
            "description": "Specific framework to focus on (e.g. 'MiCA', 'GENIUS Act')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Compliance framework intelligence"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.15,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/tokenize": {
      "get": {
        "summary": "Tokenization intelligence \u2014 how to tokenize any asset type",
        "description": "Explains how tokenization works for specific asset types. Covers process, legal structure, platforms, honest costs, and liquidity reality for real estate, equities, bonds, funds, commodities, and more.",
        "parameters": [
          {
            "name": "asset_type",
            "in": "query",
            "description": "Asset type to analyze (e.g. 'real estate', 'equity', 'bond', 'private credit', 'art')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "guide",
                "platforms",
                "process",
                "legal"
              ],
              "default": "guide"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tokenization intelligence brief"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.15,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/yield": {
      "get": {
        "summary": "Tokenized yield intelligence \u2014 live rates and risk-adjusted comparison",
        "description": "Analyzes the tokenized yield landscape using live DefiLlama data. Covers tokenized T-bills (BUIDL, BENJI, ONDO, USDY), stablecoin yields (Aave, Compound), and money market funds. Risk-adjusted comparison.",
        "parameters": [
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "stablecoin",
                "tbill",
                "compare",
                "risk"
              ],
              "default": "compare"
            }
          },
          {
            "name": "risk",
            "in": "query",
            "description": "Risk tolerance for recommendations framing",
            "schema": {
              "type": "string",
              "enum": [
                "low",
                "medium",
                "high"
              ],
              "default": "medium"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Yield landscape intelligence"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/glossary": {
      "get": {
        "summary": "Plain English decoder \u2014 any onchain finance or regulatory term",
        "description": "Translates any financial, regulatory, or technical term related to blockchain, tokenization, and onchain finance into plain English. Includes analogy, concrete 2026 example, common misconception, and depth levels for beginner/intermediate/advanced.",
        "parameters": [
          {
            "name": "term",
            "in": "query",
            "description": "Term to explain (e.g. 'atomic settlement', 'MiCA', 'CASP', 'yield bearing stablecoin', 'RWA')",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "context",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "regulatory",
                "technical",
                "financial",
                "general"
              ],
              "default": "general"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Plain English term explanation"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.05,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    },
    "/api/snapshot": {
      "get": {
        "summary": "State of the transition \u2014 weekly/monthly macro brief",
        "description": "Comprehensive macro brief on where traditional finance is in its onchain journey. Scores infrastructure, regulation, institutional adoption, and retail access. Regional breakdown for US, EU, Asia, and emerging markets.",
        "parameters": [
          {
            "name": "scope",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "us",
                "eu",
                "global"
              ],
              "default": "global"
            }
          },
          {
            "name": "timeframe",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "weekly",
                "monthly"
              ],
              "default": "weekly"
            }
          },
          {
            "name": "lang",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "State of the transition macro brief"
          },
          "402": {
            "description": "Payment required"
          }
        },
        "x-price-usd": 0.1,
        "x-payment": "x402",
        "x-agent-use-case": "on-demand"
      }
    }
  },
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 payment signature. USDC on Base mainnet. See /.well-known/agent.json for payment details."
      }
    }
  }
}
