{
  "openapi": "3.1.0",
  "info": {
    "title": "Money Reactor API",
    "version": "2.5.0",
    "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.01) 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.002, full 0-100 trust score with reasons); (4) GET /api/crypto-price?symbol=BTC-USD ($0.002, live USD spot price, edge-cached 30s); (5) GET /api/url-to-text?url=https://... ($0.003, any public web page as clean plain text, up to 8KB); (6) GET /api/crypto-news ($0.001, top crypto headlines with source links); (7) GET /api/weather?city=London ($0.002, current weather anywhere); (8) GET /api/erc20-balance?contract=0x..&address=0x.. ($0.001, on-chain ERC20 balance on Base); (9) GET /api/block-number ($0.001, latest Base block); (10) GET /api/uuid ($0.001, random UUID v4); (11) GET /api/time ($0.001, UTC now). 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://money-reactor.makar52nn2016.workers.dev"
    }
  },
  "x-payment-info": {
    "price": {
      "mode": "fixed",
      "currency": "USD",
      "amount": "0.010000"
    },
    "protocols": [
      {
        "x402": {}
      }
    ]
  },
  "servers": [
    {
      "url": "https://money-reactor.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": "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.01)",
        "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.010000"
          },
          "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.002)",
        "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.002000"
          },
          "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.001)",
        "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.001000"
          },
          "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.002)",
        "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.002000"
          },
          "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/url-to-text": {
      "get": {
        "operationId": "readUrlText",
        "tags": [
          "Web"
        ],
        "summary": "Read any web page as plain text (paid $0.003)",
        "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.003000"
          },
          "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.001)",
        "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.001000"
          },
          "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.002)",
        "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.002000"
          },
          "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.001)",
        "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.001000"
          },
          "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.01)",
        "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.010000"
          },
          "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/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"
          }
        }
      }
    }
  }
}