{
  "openapi": "3.1.0",
  "info": {
    "title": "Money Reactor API",
    "version": "3.16.0-defiwave",
    "description": "Agent-native micro APIs: multi-source feed of funded crypto bounty opportunities (Superteam Earn + live GitHub issues radar + GitLab), GitHub repository honeypot trust scoring, live crypto spot prices and web page reading. Payment via x402 protocol (HTTP 402), USDC on Base (eip155:8453). x402 v1 and v2 compatible; instant settle via Coinbase CDP facilitator. No accounts, no API keys.",
    "x-guidance": "Money Reactor serves AI agents that hunt funded crypto bounties, screen GitHub repositories for honeypot/rug risk, need live crypto prices, or need to READ WEB PAGES as text. Recommended workflow: (1) GET /api/bounties/demo (free) to preview feed quality; (2) GET /api/bounties ($0.001, launch promo) for the full multi-source feed: Superteam Earn (USDC/USDG) + LIVE GitHub bounty-issue radar (reaction-ranked, trust-scored) + GitLab bounty projects, trust >= 50 — one accepted bounty pays 4500x this call; (3) before working any bounty, screen its repository: GET /api/verdict?repo=owner/name ($0.001, one-line GO / CAUTION / HONEYPOT_RISK) or GET /api/honeypot?repo=owner/name ($0.001, full 0-100 trust score with reasons); (4) GET /api/crypto-price?symbol=BTC-USD ($0.001, live USD spot price, edge-cached 30s) or GET /api/usd-price?symbols=BTC-USD,ETH-USD ($0.001, multi-asset batch snapshot, default 10 majors); (5) GET /api/fear-greed ($0.001, crypto Fear & Greed index with 10-day history); (6) GET /api/market-pulse ($0.003, full snapshot: batch prices + sentiment + Base block — one poll replaces three calls, ideal for monitoring loops); (7) GET /api/url-to-text?url=https://... ($0.003, any public web page as clean plain text, up to 8KB); (8) GET /api/crypto-news ($0.001, top crypto headlines with source links); (9) GET /api/weather?city=London ($0.002, current weather anywhere); (10) GET /api/erc20-balance?contract=0x..&address=0x.. ($0.001, on-chain ERC20 balance on Base); (11) GET /api/block-number ($0.001, latest Base block); (12) GET /api/uuid ($0.001, random UUID v4); (13) GET /api/time ($0.001, UTC now); (14) POST /api/ai-chat ($0.002, LLM chat completion via Llama 3.1 8B: POST {messages:[{role,content}]} or {prompt:'...'}, optional system/max_tokens; GET ?q= for one-shots — summarize, classify, extract, answer); (15) GET /api/report?topic=... ($1.00, AI 70B 7-section research report grounded in live market data, optional ?address=0x... token grounding, ?lite=1 = $0.10 preview, guaranteed delivery even on AI outage). Payment flow: call without X-PAYMENT to receive an HTTP 402 challenge carrying payment requirements, settle with any x402 client (x402-fetch, @x402/fetch, x402 python, MCP x402 tools), then retry the same request with the X-PAYMENT header. Free endpoints: /api/health, /api/bounties/demo, /openapi.json, /llms.txt, /llms-full.txt, /.well-known/x402.json. MCP transport: POST /mcp (JSON-RPC 2.0, streamable-http) with free tools reactor_status and get_bounty_demo. Runtime 402 challenges are authoritative; prices in challenges always match this spec.",
    "contact": {
      "name": "makar-reactor",
      "email": "makar52nn2016@gmail.com",
      "url": "https://mr-river3.makar52nn2016.workers.dev"
    }
  },
  "x-payment-info": {
    "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.001000"
    },
    "protocols": [
      {
        "x402": {}
      }
    ]
  },
  "servers": [
    {
      "url": "https://mr-river3.makar52nn2016.workers.dev"
    }
  ],
  "tags": [
    {
      "name": "Bounties",
      "description": "Funded crypto bounty feed (escrow-backed Base USDC + GitHub radar)"
    },
    {
      "name": "Security",
      "description": "Honeypot/rug risk screening for GitHub repositories"
    },
    {
      "name": "Market Data",
      "description": "Live crypto spot prices and crypto news headlines"
    },
    {
      "name": "Data",
      "description": "Weather by city (Open-Meteo)"
    },
    {
      "name": "Onchain",
      "description": "Base chain reads: ERC20 balances, block height, token safety verdicts"
    },
    {
      "name": "Utility",
      "description": "UUID v4 and UTC time micro-endpoints"
    },
    {
      "name": "Web",
      "description": "Web page reading for text-only agents"
    },
    {
      "name": "AI",
      "description": "Per-call LLM chat completion (Llama 3.1 8B via Cloudflare Workers AI)"
    },
    {
      "name": "System",
      "description": "Free liveness and demo endpoints"
    }
  ],
  "components": {
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "X-PAYMENT",
        "description": "x402 payment header (v1 or v2 payload, USDC on Base). Obtain it by settling the 402 challenge with any x402 client, then retry the same request with this header.",
        "x-payment-protocol": "x402"
      }
    }
  },
  "paths": {
    "/api/bounties": {
      "get": {
        "operationId": "getBountyFeed",
        "tags": [
          "Bounties"
        ],
        "summary": "Funded bounty feed (paid $0.005)",
        "description": "Multi-source feed of funded crypto bounty opportunities: live Superteam Earn listings (USDC/USDG) + LIVE GitHub bounty-issue radar (reaction-ranked, trust-scored >= 50) + GitLab bounty projects. One accepted bounty pays 4500x the call price.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Bounty feed",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "generatedAt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "escrowBase": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string"
                          },
                          "title": {
                            "type": "string"
                          },
                          "rewardUsd": {
                            "type": "number"
                          },
                          "network": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "githubRadar": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "repo": {
                            "type": "string"
                          },
                          "issue": {
                            "type": "integer"
                          },
                          "rewardUsd": {
                            "type": "number"
                          },
                          "trust": {
                            "type": "integer"
                          }
                        }
                      }
                    },
                    "disclaimers": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/honeypot": {
      "get": {
        "operationId": "scoreRepoTrust",
        "tags": [
          "Security"
        ],
        "summary": "Honeypot trust score (paid $0.005)",
        "description": "Trust score 0-100 for a GitHub repository with verdict GO / CAUTION / HONEYPOT_RISK and the reasons; detects bounty honeypots before you waste work.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "repo",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$",
              "description": "GitHub repository as owner/name"
            },
            "example": "facebook/react"
          }
        ],
        "responses": {
          "200": {
            "description": "Trust score with verdict and reasons",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "repo": {
                      "type": "string"
                    },
                    "stars": {
                      "type": "integer"
                    },
                    "ageDays": {
                      "type": "integer"
                    },
                    "trust": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "verdict": {
                      "type": "string",
                      "enum": [
                        "GO",
                        "CAUTION",
                        "HONEYPOT_RISK",
                        "UNKNOWN"
                      ]
                    },
                    "reasons": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/verdict": {
      "get": {
        "operationId": "getRepoVerdict",
        "tags": [
          "Security"
        ],
        "summary": "One-line repo safety verdict (paid $0.005)",
        "description": "Impulse-priced pre-flight screen: one-line GO / CAUTION / HONEYPOT_RISK verdict plus the 0-100 trust number for a GitHub repository.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "repo",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Za-z0-9_.-]+/[A-Za-z0-9_.-]+$",
              "description": "GitHub repository as owner/name"
            },
            "example": "facebook/react"
          }
        ],
        "responses": {
          "200": {
            "description": "Verdict and trust",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "repo": {
                      "type": "string"
                    },
                    "verdict": {
                      "type": "string"
                    },
                    "trust": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/health": {
      "get": {
        "operationId": "getHealth",
        "tags": [
          "System"
        ],
        "summary": "Free health check",
        "description": "Liveness probe; returns service name, supported x402 versions and the receiver wallet.",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Service is alive"
          }
        }
      }
    },
    "/api/crypto-price": {
      "get": {
        "operationId": "getCryptoPrice",
        "tags": [
          "Market Data"
        ],
        "summary": "Live crypto spot price (paid $0.005)",
        "description": "Spot price in USD for a trading pair like BTC-USD, ETH-USD or SOL-USD. Sourced from Coinbase public price APIs, edge-cached up to 30 seconds.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "symbol",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[A-Z0-9]{2,10}-[A-Z]{2,10}$",
              "description": "Trading pair BASE-QUOTE"
            },
            "example": "BTC-USD"
          }
        ],
        "responses": {
          "200": {
            "description": "Spot price",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "symbol": {
                      "type": "string"
                    },
                    "base": {
                      "type": "string"
                    },
                    "quote": {
                      "type": "string"
                    },
                    "price": {
                      "type": "number"
                    },
                    "currency": {
                      "type": "string"
                    },
                    "source": {
                      "type": "string"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/usd-price": {
      "get": {
        "operationId": "getUsdPriceBatch",
        "tags": [
          "Market Data"
        ],
        "summary": "Multi-asset USD price snapshot in one call (paid $0.005)",
        "description": "Batch USD snapshot for up to 25 trading pairs in ONE call (query symbols=BTC-USD,ETH-USD,... comma-separated; default 10 majors: BTC/ETH/SOL/DOGE/XRP/ADA/AVAX/LINK/LTC/USDC). Coinbase public source, edge-cached 30 seconds. Batch beats per-pair calls for portfolio and dashboard agents.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Comma-separated pairs BASE-QUOTE, max 25"
            },
            "example": "BTC-USD,ETH-USD,SOL-USD"
          }
        ],
        "responses": {
          "200": {
            "description": "Batch price snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "requested": {
                      "type": "integer"
                    },
                    "failed": {
                      "type": "integer"
                    },
                    "prices": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "symbol": {
                            "type": "string"
                          },
                          "base": {
                            "type": "string"
                          },
                          "quote": {
                            "type": "string"
                          },
                          "price": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string"
                          }
                        }
                      }
                    },
                    "source": {
                      "type": "string"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/fear-greed": {
      "get": {
        "operationId": "getFearGreed",
        "tags": [
          "Market Data"
        ],
        "summary": "Crypto Fear & Greed index (paid $0.005)",
        "description": "Crypto market sentiment: today's Fear & Greed value and classification plus yesterday, week ago and 10-day history. Scale 0-100 (0 = extreme fear, 100 = extreme greed). Source: alternative.me, cached 10 minutes.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Fear & Greed index",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "integer"
                    },
                    "classification": {
                      "type": "string"
                    },
                    "yesterday": {
                      "type": "object"
                    },
                    "weekAgo": {
                      "type": "object"
                    },
                    "historyDays10": {
                      "type": "array",
                      "items": {
                        "type": "object"
                      }
                    },
                    "source": {
                      "type": "string"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/market-pulse": {
      "get": {
        "operationId": "getMarketPulse",
        "tags": [
          "Market Data"
        ],
        "summary": "Full market snapshot in one call (paid $0.01)",
        "description": "One poll replaces three calls for monitoring agents: batch USD prices (default BTC/ETH/SOL/XRP/DOGE, up to 15 pairs via symbols=) + Fear & Greed sentiment (today value/classification + yesterday) + latest Base mainnet block height. Sources: coinbase-spot, alternative.me, base-rpc. Built for loop agents polling every 30-60s.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "symbols",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "Comma-separated pairs BASE-QUOTE, max 15"
            },
            "example": "BTC-USD,ETH-USD,SOL-USD"
          }
        ],
        "responses": {
          "200": {
            "description": "Market snapshot: prices + sentiment + chain tip",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "pulse": {
                      "type": "string"
                    },
                    "prices": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer"
                        },
                        "failed": {
                          "type": "integer"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object"
                          }
                        }
                      }
                    },
                    "sentiment": {
                      "type": "object",
                      "properties": {
                        "value": {
                          "type": "integer"
                        },
                        "classification": {
                          "type": "string"
                        },
                        "yesterday": {
                          "type": "integer",
                          "nullable": true
                        }
                      }
                    },
                    "chain": {
                      "type": "object",
                      "properties": {
                        "blockNumber": {
                          "type": "integer"
                        },
                        "network": {
                          "type": "string"
                        }
                      }
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/ai-chat": {
      "post": {
        "operationId": "aiChat",
        "tags": [
          "AI"
        ],
        "summary": "LLM chat completion (paid $0.01)",
        "description": "One-shot LLM chat completion via Llama 3.1 8B (Cloudflare Workers AI): POST body {messages:[{role,content}]} (OpenAI-style) or {prompt:'...'}, optional system prompt and max_tokens (default 512, cap 1024). GET ?q=your+prompt also supported for simple one-shots. Per-call AI inference with zero signup and zero API keys.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "messages": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "role": {
                          "type": "string",
                          "enum": [
                            "system",
                            "user",
                            "assistant"
                          ]
                        },
                        "content": {
                          "type": "string"
                        }
                      }
                    }
                  },
                  "prompt": {
                    "type": "string"
                  },
                  "system": {
                    "type": "string"
                  },
                  "max_tokens": {
                    "type": "integer",
                    "default": 512,
                    "maximum": 1024
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "description": "One-shot prompt (GET alternative to POST body)"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "LLM reply",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "model": {
                      "type": "string"
                    },
                    "reply": {
                      "type": "string"
                    },
                    "usage": {
                      "type": "object",
                      "nullable": true
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/url-to-text": {
      "get": {
        "operationId": "readUrlText",
        "tags": [
          "Web"
        ],
        "summary": "Read any web page as plain text (paid $0.01)",
        "description": "Fetches a public http(s) URL and returns clean plain text: title + visible body (scripts, styles and nav stripped), up to 8000 characters. Lets text-only agents read the web. Private/internal hosts are blocked.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri",
              "description": "Absolute http(s) URL"
            },
            "example": "https://example.com"
          }
        ],
        "responses": {
          "200": {
            "description": "Extracted text",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string"
                    },
                    "finalUrl": {
                      "type": "string"
                    },
                    "title": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    },
                    "truncated": {
                      "type": "boolean"
                    },
                    "length": {
                      "type": "integer"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/crypto-news": {
      "get": {
        "operationId": "getCryptoNews",
        "tags": [
          "Market Data"
        ],
        "summary": "Top crypto headlines (paid $0.005)",
        "description": "Top crypto headlines aggregated from Cointelegraph, Decrypt and NewsBTC RSS: per-article title, source link and publish time, most recent first, up to 15 items.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Crypto headlines",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "count": {
                      "type": "integer"
                    },
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "title": {
                            "type": "string"
                          },
                          "url": {
                            "type": "string"
                          },
                          "source": {
                            "type": "string"
                          },
                          "publishedAt": {
                            "type": "string",
                            "nullable": true
                          }
                        }
                      }
                    },
                    "fetchedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/weather": {
      "get": {
        "operationId": "getWeather",
        "tags": [
          "Data"
        ],
        "summary": "Current weather by city (paid $0.005)",
        "description": "Current weather for any city worldwide: temperature, feels-like, humidity, wind speed and conditions code. City geocoding via Open-Meteo (no API keys).",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "city",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "description": "City name"
            },
            "example": "London"
          }
        ],
        "responses": {
          "200": {
            "description": "Current weather",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "city": {
                      "type": "string"
                    },
                    "country": {
                      "type": "string"
                    },
                    "latitude": {
                      "type": "number"
                    },
                    "longitude": {
                      "type": "number"
                    },
                    "current": {
                      "type": "object",
                      "properties": {
                        "temperature_2m": {
                          "type": "number"
                        },
                        "relative_humidity_2m": {
                          "type": "number"
                        },
                        "apparent_temperature": {
                          "type": "number"
                        },
                        "weather_code": {
                          "type": "number"
                        },
                        "wind_speed_10m": {
                          "type": "number"
                        }
                      }
                    },
                    "fetchedAt": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/erc20-balance": {
      "get": {
        "operationId": "getErc20Balance",
        "tags": [
          "Onchain"
        ],
        "summary": "ERC20 token balance on Base (paid $0.005)",
        "description": "On-chain ERC20 token balance for any Base address: raw balance, human units, decimals and symbol via eth_call balanceOf on public Base RPC.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "contract",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$",
              "description": "Token contract address"
            },
            "example": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
          },
          {
            "name": "address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$",
              "description": "Wallet address"
            },
            "example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
          }
        ],
        "responses": {
          "200": {
            "description": "Token balance",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "contract": {
                      "type": "string"
                    },
                    "address": {
                      "type": "string"
                    },
                    "symbol": {
                      "type": "string",
                      "nullable": true
                    },
                    "decimals": {
                      "type": "integer"
                    },
                    "balanceRaw": {
                      "type": "string"
                    },
                    "balance": {
                      "type": "number"
                    },
                    "network": {
                      "type": "string"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/token-verdict": {
      "get": {
        "operationId": "getTokenVerdict",
        "tags": [
          "Onchain"
        ],
        "summary": "Token safety verdict (paid $0.02)",
        "description": "Onchain safety verdict for a Base token: grade GREEN/MID/YELLOW/RED computed from liquidity, pair age, turnover, buy/sell flow and 24h volatility (DexScreener data), with reasons and a plain-language take. Also accepts POST with {tokenAddress}.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$",
              "description": "Token contract address"
            },
            "example": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"
          }
        ],
        "responses": {
          "200": {
            "description": "Token verdict",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "address": {
                      "type": "string"
                    },
                    "name": {
                      "type": "string",
                      "nullable": true
                    },
                    "symbol": {
                      "type": "string",
                      "nullable": true
                    },
                    "grade": {
                      "type": "string",
                      "enum": [
                        "GREEN",
                        "MID",
                        "YELLOW",
                        "RED",
                        "UNKNOWN"
                      ]
                    },
                    "score": {
                      "type": "integer",
                      "nullable": true
                    },
                    "verdict": {
                      "type": "string"
                    },
                    "metrics": {
                      "type": "object",
                      "nullable": true
                    },
                    "reasons": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "disclaimer": {
                      "type": "string"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/block-number": {
      "get": {
        "operationId": "getLatestBlock",
        "tags": [
          "Onchain"
        ],
        "summary": "Latest Base block height (paid $0.001)",
        "description": "Latest Base mainnet block height via eth_blockNumber on public Base RPC — the cheapest chain-tip probe for agents.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Block height",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "blockNumber": {
                      "type": "integer"
                    },
                    "hex": {
                      "type": "string"
                    },
                    "network": {
                      "type": "string"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/base-gas": {
      "get": {
        "operationId": "getBaseGas",
        "tags": [
          "Onchain"
        ],
        "summary": "Base gas snapshot (paid $0.005)",
        "description": "Live Base gas: gas price, EIP-1559 base fee and suggested priority fee in Gwei via public RPC — tx cost planning for agents.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Gas snapshot",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "gasPriceGwei": {
                      "type": "number"
                    },
                    "baseFeeGwei": {
                      "type": "number"
                    },
                    "priorityFeeGwei": {
                      "type": "number"
                    },
                    "gasPriceWei": {
                      "type": "string"
                    },
                    "network": {
                      "type": "string"
                    },
                    "at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/wallet-profile": {
      "get": {
        "operationId": "getWalletProfile",
        "tags": [
          "Onchain"
        ],
        "summary": "Wallet profile on Base (paid $0.01)",
        "description": "On-chain profile for any Base address: native ETH balance, transaction count (nonce), USDC balance and activity tier (fresh/new/active/veteran). Pre-flight check before interacting with an unknown counterparty.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.010000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "description": "Wallet address 0x.."
            },
            "example": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
          }
        ],
        "responses": {
          "200": {
            "description": "Wallet profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "address": {
                      "type": "string"
                    },
                    "txCount": {
                      "type": "integer"
                    },
                    "ethBalance": {
                      "type": "number"
                    },
                    "usdcBalance": {
                      "type": "number"
                    },
                    "activityTier": {
                      "type": "string",
                      "enum": [
                        "fresh",
                        "new",
                        "active",
                        "veteran"
                      ]
                    },
                    "network": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/coin-convert": {
      "get": {
        "operationId": "getCoinConvert",
        "tags": [
          "Market"
        ],
        "summary": "Cross-asset conversion at live USD spot (paid $0.005)",
        "description": "Convert an amount between assets at live Coinbase USD spot rates: rate + result in one call (e.g. 1 BTC = ? ETH).",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.005000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "from",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Asset code"
            },
            "example": "BTC"
          },
          {
            "name": "to",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Asset code"
            },
            "example": "ETH"
          },
          {
            "name": "amount",
            "in": "query",
            "schema": {
              "type": "number",
              "description": "Amount, default 1"
            },
            "example": 1
          }
        ],
        "responses": {
          "200": {
            "description": "Conversion",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "from": {
                      "type": "string"
                    },
                    "to": {
                      "type": "string"
                    },
                    "amount": {
                      "type": "number"
                    },
                    "fromUsd": {
                      "type": "number"
                    },
                    "toUsd": {
                      "type": "number"
                    },
                    "rate": {
                      "type": "number"
                    },
                    "result": {
                      "type": "number"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/btc-halving": {
      "get": {
        "operationId": "getBtcHalving",
        "tags": [
          "Market"
        ],
        "summary": "Bitcoin halving countdown (paid $0.003)",
        "description": "Next Bitcoin halving: current BTC height (mempool.space), blocks left, ETA days, post-halving reward. Evergreen datapoint for content and monitoring agents.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.003000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Halving countdown",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "btcHeight": {
                      "type": "integer"
                    },
                    "halvingNumber": {
                      "type": "integer"
                    },
                    "nextHalvingHeight": {
                      "type": "integer"
                    },
                    "blocksLeft": {
                      "type": "integer"
                    },
                    "daysLeft": {
                      "type": "number"
                    },
                    "eta": {
                      "type": "string"
                    },
                    "rewardAfter": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/uuid": {
      "get": {
        "operationId": "getUuid",
        "tags": [
          "Utility"
        ],
        "summary": "Random UUID v4 (paid $0.001)",
        "description": "Random UUID v4 — idempotency keys and x402 requestKeys on demand; also a canonical $0.001 target for testing an x402 payment stack end to end.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "UUID",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "uuid": {
                      "type": "string"
                    },
                    "version": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/time": {
      "get": {
        "operationId": "getTime",
        "tags": [
          "Utility"
        ],
        "summary": "Current UTC time (paid $0.001)",
        "description": "Current server time in UTC ISO-8601 plus unix seconds — cheapest liveness probe.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.001000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "UTC time",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "iso": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "unix": {
                      "type": "integer"
                    },
                    "timezone": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/bounties/demo": {
      "get": {
        "operationId": "getBountyDemo",
        "tags": [
          "System"
        ],
        "summary": "Free demo sample",
        "description": "Free preview: top-3 escrow bounties, top-3 radar entries, honeypot sample and ROI pitch — enough to evaluate quality before paying.",
        "security": [],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Demo sample"
          }
        }
      }
    },
    "/api/day-pass": {
      "get": {
        "operationId": "getDayPass",
        "tags": [
          "System"
        ],
        "summary": "x402 Day Pass (paid $0.02)",
        "description": "24 hours of unlimited calls on every $0.001 route. One payment returns a dp_ token; send it as the X-DAY-PASS header on any $0.001 route to skip per-call payment.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Day pass token"
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/dossier": {
      "get": {
        "operationId": "getResearchDossier",
        "tags": [
          "AI"
        ],
        "summary": "Full research dossier (paid $0.05)",
        "description": "Premium bundle in ONE call: batch USD prices (BTC/ETH/SOL/XRP/DOGE) + Fear & Greed + fresh headlines + Base chain tip + AI token safety verdict (optional ?address=0x..) + AI executive summary. One call replaces five - built for decision agents.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.050000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [
          {
            "name": "address",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^0x[0-9a-fA-F]{40}$",
              "description": "Optional token address for the AI verdict block"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Research dossier"
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    },
    "/api/starter-kit": {
      "get": {
        "operationId": "getStarterKit",
        "tags": [
          "System"
        ],
        "summary": "x402 Starter Kit (paid $0.02)",
        "description": "Complete onboarding bundle for an AI agent (or its owner): quickstart code, how-x402-works explainer, full endpoint catalog with prices and examples, LIVE snapshot of bounty radar + crypto news at purchase time, and seller trust proof (on-chain tx, verified badges). The one high-ticket call that turns an x402-curious agent into an operating buyer-and-seller.",
        "x-payment-info": {
          "price": {
            "mode": "fixed",
            "currency": "USD",
            "amount": "0.020000"
          },
          "protocols": [
            {
              "x402": {}
            }
          ]
        },
        "security": [
          {
            "x402": []
          }
        ],
        "parameters": [],
        "responses": {
          "200": {
            "description": "Starter kit bundle"
          },
          "402": {
            "description": "Payment Required — x402 challenge (v2 eip155:8453 + v1 base, USDC). Pay via any x402 client and retry with X-PAYMENT header."
          }
        }
      }
    }
  }
}