{
 "openapi": "3.1.0",
 "info": {
  "title": "Diamond Bitcoin intelligence API",
  "version": "11.0",
  "description": "Heuristic intelligence derived from public blockchain data observed by an independent Bitcoin node and from public sanctions and ransomware lists. It flags patterns, not proof. Not legal, compliance or investment advice. The absence of a flag is not evidence that an address is legitimate. Provided as-is, without warranty."
 },
 "servers": [
  {
   "url": "https://diamond.tail1b5f86.ts.net/api"
  }
 ],
 "paths": {
  "/x402/risk": {
   "get": {
    "summary": "risk (pay with USDC on Base, x402)",
    "description": "Risk check for one Bitcoin address: OFAC SDN sanctions, ransomware payment lists, ownership-clustering with sanctioned/ransomware entities, sweeper-bot collection addresses, and this node's AML cases (30 days).",
    "parameters": [
     {
      "name": "address",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Bitcoin mainnet address (bc1..., 1... or 3...)"
     }
    ],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "application/json": {}
      }
     },
     "402": {
      "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) and accepts[] (v1)"
     }
    }
   }
  },
  "/l402/risk": {
   "get": {
    "summary": "risk (300 sats over Lightning, L402)",
    "description": "Risk check for one Bitcoin address: OFAC SDN sanctions, ransomware payment lists, ownership-clustering with sanctioned/ransomware entities, sweeper-bot collection addresses, and this node's AML cases (30 days).",
    "parameters": [
     {
      "name": "address",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Bitcoin mainnet address (bc1..., 1... or 3...)"
     }
    ],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "application/json": {}
      }
     },
     "402": {
      "description": "Payment required: WWW-Authenticate L402 macaroon + invoice"
     }
    }
   }
  },
  "/x402/aml_day": {
   "get": {
    "summary": "aml_day (pay with USDC on Base, x402)",
    "description": "Every AML case (score >= 25) this node detected on one day (YYYY-MM-DD, last 30 days), gzipped JSON lines.",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Day as YYYY-MM-DD"
     }
    ],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "application/gzip": {}
      }
     },
     "402": {
      "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) and accepts[] (v1)"
     }
    }
   }
  },
  "/l402/aml_day": {
   "get": {
    "summary": "aml_day (3000 sats over Lightning, L402)",
    "description": "Every AML case (score >= 25) this node detected on one day (YYYY-MM-DD, last 30 days), gzipped JSON lines.",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Day as YYYY-MM-DD"
     }
    ],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "application/gzip": {}
      }
     },
     "402": {
      "description": "Payment required: WWW-Authenticate L402 macaroon + invoice"
     }
    }
   }
  },
  "/x402/whales_day": {
   "get": {
    "summary": "whales_day (pay with USDC on Base, x402)",
    "description": "Every transaction of US$100,000 or more this node saw on one day, gzipped JSON lines.",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Day as YYYY-MM-DD"
     }
    ],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "application/gzip": {}
      }
     },
     "402": {
      "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) and accepts[] (v1)"
     }
    }
   }
  },
  "/l402/whales_day": {
   "get": {
    "summary": "whales_day (2000 sats over Lightning, L402)",
    "description": "Every transaction of US$100,000 or more this node saw on one day, gzipped JSON lines.",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Day as YYYY-MM-DD"
     }
    ],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "application/gzip": {}
      }
     },
     "402": {
      "description": "Payment required: WWW-Authenticate L402 macaroon + invoice"
     }
    }
   }
  },
  "/x402/brief": {
   "get": {
    "summary": "brief (pay with USDC on Base, x402)",
    "description": "Today's AI analyst brief (AML patterns, whales, correlations).",
    "parameters": [],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "application/json": {}
      }
     },
     "402": {
      "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) and accepts[] (v1)"
     }
    }
   }
  },
  "/l402/brief": {
   "get": {
    "summary": "brief (500 sats over Lightning, L402)",
    "description": "Today's AI analyst brief (AML patterns, whales, correlations).",
    "parameters": [],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "application/json": {}
      }
     },
     "402": {
      "description": "Payment required: WWW-Authenticate L402 macaroon + invoice"
     }
    }
   }
  },
  "/x402/geo_report": {
   "get": {
    "summary": "geo_report (pay with USDC on Base, x402)",
    "description": "Whale x Geopolitics report for one day (YYYY-MM-DD, last 90 days): whale flows vs world news, lagged correlations, laundering patterns, headlines and the analyst brief. JSON.",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Day as YYYY-MM-DD"
     }
    ],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "application/json": {}
      }
     },
     "402": {
      "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) and accepts[] (v1)"
     }
    }
   }
  },
  "/l402/geo_report": {
   "get": {
    "summary": "geo_report (1000 sats over Lightning, L402)",
    "description": "Whale x Geopolitics report for one day (YYYY-MM-DD, last 90 days): whale flows vs world news, lagged correlations, laundering patterns, headlines and the analyst brief. JSON.",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Day as YYYY-MM-DD"
     }
    ],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "application/json": {}
      }
     },
     "402": {
      "description": "Payment required: WWW-Authenticate L402 macaroon + invoice"
     }
    }
   }
  },
  "/x402/geo_dataset": {
   "get": {
    "summary": "geo_dataset (pay with USDC on Base, x402)",
    "description": "Hourly research dataset for one day: BTC price, whale count and volume, AML cases, ransomware leak posts and 11 news-topic intensities. CSV.",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Day as YYYY-MM-DD"
     }
    ],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "text/csv": {}
      }
     },
     "402": {
      "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) and accepts[] (v1)"
     }
    }
   }
  },
  "/l402/geo_dataset": {
   "get": {
    "summary": "geo_dataset (2000 sats over Lightning, L402)",
    "description": "Hourly research dataset for one day: BTC price, whale count and volume, AML cases, ransomware leak posts and 11 news-topic intensities. CSV.",
    "parameters": [
     {
      "name": "date",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Day as YYYY-MM-DD"
     }
    ],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "text/csv": {}
      }
     },
     "402": {
      "description": "Payment required: WWW-Authenticate L402 macaroon + invoice"
     }
    }
   }
  },
  "/x402/pulse": {
   "get": {
    "summary": "pulse (pay with USDC on Base, x402)",
    "description": "Live Bitcoin market pulse from this node: fee rates for 1 block to 1 day, mempool size, the last 24 h of whale transactions (>= US$100k) and laundering-pattern (AML) cases, implied BTC/USD. JSON.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "application/json": {}
      }
     },
     "402": {
      "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) and accepts[] (v1)"
     }
    }
   }
  },
  "/l402/pulse": {
   "get": {
    "summary": "pulse (20 sats over Lightning, L402)",
    "description": "Live Bitcoin market pulse from this node: fee rates for 1 block to 1 day, mempool size, the last 24 h of whale transactions (>= US$100k) and laundering-pattern (AML) cases, implied BTC/USD. JSON.",
    "parameters": [],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "application/json": {}
      }
     },
     "402": {
      "description": "Payment required: WWW-Authenticate L402 macaroon + invoice"
     }
    }
   }
  },
  "/x402/watch": {
   "get": {
    "summary": "watch (pay with USDC on Base, x402)",
    "description": "Address Watch for 30 days: every confirmed transaction paying to or spending from one Bitcoin address, in a private feed (web, JSON, RSS) and as phone push (ntfy). Optional feed=<id> adds the address to, or extends it in, an existing feed. Returns the feed links.",
    "parameters": [
     {
      "name": "address",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Bitcoin mainnet address (bc1..., 1... or 3...)"
     },
     {
      "name": "feed",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Optional: an existing Address Watch feed id to add to or extend"
     }
    ],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "application/json": {}
      }
     },
     "402": {
      "description": "Payment required: PAYMENT-REQUIRED header (x402 v2) and accepts[] (v1)"
     }
    }
   }
  },
  "/l402/watch": {
   "get": {
    "summary": "watch (1000 sats over Lightning, L402)",
    "description": "Address Watch for 30 days: every confirmed transaction paying to or spending from one Bitcoin address, in a private feed (web, JSON, RSS) and as phone push (ntfy). Optional feed=<id> adds the address to, or extends it in, an existing feed. Returns the feed links.",
    "parameters": [
     {
      "name": "address",
      "in": "query",
      "required": true,
      "schema": {
       "type": "string"
      },
      "description": "Bitcoin mainnet address (bc1..., 1... or 3...)"
     },
     {
      "name": "feed",
      "in": "query",
      "required": false,
      "schema": {
       "type": "string"
      },
      "description": "Optional: an existing Address Watch feed id to add to or extend"
     }
    ],
    "responses": {
     "200": {
      "description": "The product",
      "content": {
       "application/json": {}
      }
     },
     "402": {
      "description": "Payment required: WWW-Authenticate L402 macaroon + invoice"
     }
    }
   }
  },
  "/mcp": {
   "post": {
    "summary": "MCP (Streamable HTTP, JSON-RPC 2.0): the same products as tools for AI agents",
    "responses": {
     "200": {
      "description": "JSON-RPC response"
     }
    }
   }
  }
 }
}
