{
  "openapi": "3.1.0",
  "info": {
    "title": "FRED Macro Economic API Gateway",
    "description": "Automated macro observations pipeline gated via Base USDC microtransactions. Designed for AI agents.",
    "version": "1.0.0",
    "x-guidance": "Call GET /api/econ. Requires 0.01 USDC on Base (eip155:8453) via x402. Include PAYMENT-SIGNATURE or X-Tx-Hash after payment.",
    "contact": {
      "name": "Reigh Arnold",
      "email": "reigharnold@gmail.com"
    }
  },
  "paths": {
    "/api/econ": {
      "get": {
        "summary": "Fetch latest FRED macro economic observations",
        "description": "Requires 0.01 USDC on Base Mainnet. Returns latest UNRATE observations.",
        "operationId": "getEcon",
        "security": [
          {
            "x402Payment": []
          }
        ],
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.01"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "responses": {
          "200": {
            "description": "Data unlocked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "series": {
                      "type": "string"
                    },
                    "observations": {
                      "type": "array"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required – see PAYMENT-REQUIRED header"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "x402Payment": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "Base64 x402 payment payload, or raw 0x transaction hash in X-Tx-Hash"
      }
    }
  }
}