{
  "openapi": "3.1.0",
  "info": {
    "title": "CoinGraph API",
    "version": "1.0.0",
    "summary": "The check before they act: verified crypto market intelligence for AI agents.",
    "description": "Humans read it, agents call it. Every response carries where the data came from (sources) and when it was true (as_of); anything unmeasured is \"unassessed\". CoinGraph never executes, custodies or advises — the caller decides.\n\nPhase: hackathon. Discover and Trust calls are free. Data calls (state, history, market) are free for 25 calls a day, then 2 tADA. Premium calls (sized checks, fresh briefs, questions, address lookups, monitors, most agents) are 5 tADA; Pro agents are 10 tADA. Paid calls answer 402 with x402 payment details on Cardano preprod; design partners use an API key instead.",
    "contact": {
      "name": "CoinGraph",
      "url": "https://coingraph.ai",
      "email": "ajay@coingraph.ai"
    },
    "x-mcp-server": "https://coingraph.ai/mcp"
  },
  "servers": [
    {
      "url": "https://coingraph.ai/api/v1",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Discover",
      "description": "Find what CoinGraph covers and whether it is healthy. Free."
    },
    {
      "name": "Understand",
      "description": "Everything CoinGraph knows, as data."
    },
    {
      "name": "Decide",
      "description": "Ask CoinGraph to think. Creates objects with ids that go into the public record."
    },
    {
      "name": "Watch",
      "description": "Get told when something changes."
    },
    {
      "name": "Trust",
      "description": "Check CoinGraph's record and prove what you were told."
    },
    {
      "name": "Agents",
      "description": "Ten ready-made agents built on the data above. Each returns a verdict, a plain summary, sourced reasons and a proof id."
    }
  ],
  "paths": {
    "/tokens": {
      "get": {
        "tags": [
          "Discover"
        ],
        "operationId": "tokens",
        "summary": "List the 100 tokens we track",
        "description": "Ids, symbols, contract addresses per chain, rank, price, changes, categories, open signals, latest headline. Use `q` to search 21,000+ coins by name, symbol or contract. Free.",
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "example": "chainlink"
          }
        ],
        "responses": {
          "200": {
            "description": "The tracked universe",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "token_list"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/TokenList"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/status": {
      "get": {
        "tags": [
          "Discover"
        ],
        "operationId": "status",
        "summary": "Is CoinGraph healthy right now?",
        "description": "Pipeline health, data freshness, coverage, prices and the payment address.",
        "responses": {
          "200": {
            "description": "Service status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "service_status"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/ServiceStatus"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/state/{token}": {
      "get": {
        "tags": [
          "Understand"
        ],
        "operationId": "state",
        "summary": "Everything we know about a token right now",
        "description": "Sections: identity, market, liquidity, derivatives, onchain, supply, security (contract risk via GoPlus), context, signals, brief. Each section carries its own sources and as_of. Free.",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "Token id (coingecko id), symbol or contract address.",
            "schema": {
              "type": "string"
            },
            "example": "chainlink"
          },
          {
            "name": "sections",
            "in": "query",
            "required": false,
            "description": "Comma-separated list of sections to return. Default: all. Valid: identity, market, liquidity, derivatives, onchain, supply, security, context, signals, brief.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Unified token state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "state"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/State"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/history/{token}": {
      "get": {
        "tags": [
          "Understand"
        ],
        "operationId": "history",
        "summary": "What happened to a token over time",
        "description": "Series (price, candles, open interest, funding, long/short, exchange net flow, reserves, TVL) and events (large transfers, liquidations, signals, headlines, briefs). Default window: 24h events, 14 days series. Series are downsampled to `resolution` buckets (last value per bucket per venue). Free.",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "Token id (coingecko id), symbol or contract address.",
            "schema": {
              "type": "string"
            },
            "example": "chainlink"
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "ISO-8601 time. Limits events (and series) to after this time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "series",
            "in": "query",
            "required": false,
            "description": "Comma list of series to include.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "resolution",
            "in": "query",
            "required": false,
            "description": "Bucket width: 15m, 1h, 6h, raw (every row) or auto (15m up to 2 days, 1h up to 30 days, 6h beyond).",
            "schema": {
              "type": "string",
              "enum": [
                "auto",
                "15m",
                "1h",
                "6h",
                "raw"
              ],
              "default": "auto"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Series and events",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "history"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/History"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/market": {
      "get": {
        "tags": [
          "Understand"
        ],
        "operationId": "market",
        "summary": "The whole market at a glance",
        "description": "Sections: overview, sectors, breadth, sentiment, flows, chains, venues, rankings, events, pulse. **Data tier:** 25 free calls a day, then 2 tADA per call via x402 on Cardano preprod (402 Payment Required → pay → retry with PAYMENT-SIGNATURE); design partners send an API key instead.",
        "parameters": [
          {
            "name": "sections",
            "in": "query",
            "required": false,
            "description": "Comma-separated list of sections to return. Default: all. Valid: overview, sectors, breadth, sentiment, flows, chains, venues, rankings, events, pulse.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Market-wide state",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "market"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/MarketState"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/inspect/{chain}/{address}": {
      "get": {
        "tags": [
          "Understand"
        ],
        "operationId": "inspect",
        "summary": "Who owns an address?",
        "description": "Label (exchange, contract, burn or unlabelled), type, balances, transaction count, recent large moves. Fetched live from the chain through NOWNodes. Free.",
        "parameters": [
          {
            "name": "chain",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "eth",
                "bsc",
                "btc",
                "sol",
                "ada"
              ]
            }
          },
          {
            "name": "address",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Address profile",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "address_profile"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AddressProfile"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/evaluate/{token}": {
      "get": {
        "tags": [
          "Decide"
        ],
        "operationId": "evaluateGet",
        "summary": "Should you act on this token right now? (standard check)",
        "description": "Verdict proceed / caution / avoid per dimension (momentum, liquidity, leverage, onchain, supply, context, contract) with reasons and sources. Independent of order size. Free.",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "Token id (coingecko id), symbol or contract address.",
            "schema": {
              "type": "string"
            },
            "example": "chainlink"
          }
        ],
        "responses": {
          "200": {
            "description": "Evaluation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "evaluation"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Evaluation"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/evaluate": {
      "post": {
        "tags": [
          "Decide"
        ],
        "operationId": "evaluate",
        "summary": "Should you act on this token right now? (with your size and rules)",
        "description": "Same verdict, scored against your order size (vs depth and daily volume) and your policy rules. **Premium tier:** 10 free calls a day, then 5 tADA per call via x402 on Cardano preprod (402 Payment Required → pay → retry with PAYMENT-SIGNATURE); design partners send an API key instead.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvaluateRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Evaluation",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "evaluation"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Evaluation"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/explain/{token}": {
      "get": {
        "tags": [
          "Decide"
        ],
        "operationId": "explainGet",
        "summary": "Why did this token move? (latest brief)",
        "description": "The latest investigated brief: what happened, likely causes with confidence, onchain evidence, market context, what to watch — every statement cites evidence ids. Free.",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "Token id (coingecko id), symbol or contract address.",
            "schema": {
              "type": "string"
            },
            "example": "chainlink"
          }
        ],
        "responses": {
          "200": {
            "description": "Brief",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "brief"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Brief"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/explain/{token}/{id}": {
      "get": {
        "tags": [
          "Decide"
        ],
        "operationId": "explainById",
        "summary": "A specific past brief",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "Token id (coingecko id), symbol or contract address.",
            "schema": {
              "type": "string"
            },
            "example": "chainlink"
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Brief",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "brief"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Brief"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/explain": {
      "post": {
        "tags": [
          "Decide"
        ],
        "operationId": "explain",
        "summary": "Run a fresh investigation (~60 s)",
        "description": "Gathers evidence, makes live onchain lookups and writes a new brief. **Premium tier:** 10 free calls a day, then 5 tADA per call via x402 on Cardano preprod (402 Payment Required → pay → retry with PAYMENT-SIGNATURE); design partners send an API key instead.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "hours": {
                    "type": "number",
                    "default": 2,
                    "minimum": 1,
                    "maximum": 24
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Brief",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "brief"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Brief"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/ask": {
      "post": {
        "tags": [
          "Decide"
        ],
        "operationId": "ask",
        "summary": "Ask a question about a token, or check a claim",
        "description": "A question gets a cited answer; a claim gets supported / contradicted / unknown with evidence. **Premium tier:** 10 free calls a day, then 5 tADA per call via x402 on Cardano preprod (402 Payment Required → pay → retry with PAYMENT-SIGNATURE); design partners send an API key instead.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string"
                  },
                  "question": {
                    "type": "string"
                  },
                  "claim": {
                    "type": "string"
                  }
                },
                "required": [
                  "token"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Answer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "answer"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Answer"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/monitor": {
      "post": {
        "tags": [
          "Watch"
        ],
        "operationId": "monitorCreate",
        "summary": "Watch tokens and receive webhooks",
        "description": "We POST to your webhook when a signal fires, a verdict changes or a new brief is written. Webhooks are signed (X-CoinGraph-Signature, HMAC-SHA256 with your secret).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MonitorRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Monitor",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "monitor"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Monitor"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Watch"
        ],
        "operationId": "monitorList",
        "summary": "List your monitors",
        "parameters": [
          {
            "name": "X-Monitor-Secret",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Monitors",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "monitor_list"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/MonitorList"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/monitor/{id}": {
      "delete": {
        "tags": [
          "Watch"
        ],
        "operationId": "monitorDelete",
        "summary": "Stop a monitor",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Monitor-Secret",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Monitor",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "monitor"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Monitor"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/record": {
      "get": {
        "tags": [
          "Trust"
        ],
        "operationId": "record",
        "summary": "Our public scorecard",
        "description": "Every evaluation, signal and brief issued, what the price did 1h/24h/7d later, and whether the call was right; calibration by kind and severity.",
        "parameters": [
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "ISO-8601 time. Limits events (and series) to after this time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "evaluation",
                "signal",
                "brief"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Record",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "record"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Record"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/record/{token}": {
      "get": {
        "tags": [
          "Trust"
        ],
        "operationId": "recordToken",
        "summary": "The scorecard for one token",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "Token id (coingecko id), symbol or contract address.",
            "schema": {
              "type": "string"
            },
            "example": "chainlink"
          },
          {
            "name": "since",
            "in": "query",
            "required": false,
            "description": "ISO-8601 time. Limits events (and series) to after this time.",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Record",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "record"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Record"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/verify/{id}": {
      "get": {
        "tags": [
          "Trust"
        ],
        "operationId": "verify",
        "summary": "Proof of what you were told",
        "description": "The canonical object, its sha256, the Chainlink CRE attestation (pending until the workflow has reached it) and the source calls behind it.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "eval_…, ans_…, run_… or a brief number",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Proof",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "proof"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Proof"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents": {
      "get": {
        "tags": [
          "Agents"
        ],
        "operationId": "agents",
        "summary": "List the agents",
        "description": "Every agent with its input schema, verdicts, price and an example input.",
        "responses": {
          "200": {
            "description": "Agents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "agent_list"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AgentList"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/{id}": {
      "get": {
        "tags": [
          "Agents"
        ],
        "operationId": "agent",
        "summary": "One agent's card",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "trade-gatekeeper",
                "wallet-guard",
                "due-diligence-analyst",
                "opportunity-scout",
                "leverage-radar",
                "whale-watch",
                "portfolio-checkup",
                "treasury-steward",
                "alert-watchtower",
                "daily-market-brief"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Agent",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "agent"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AgentCard"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/trade-gatekeeper": {
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "run_trade_gatekeeper",
        "summary": "Trade Gatekeeper: The check every trade passes before it is placed.",
        "description": "Give it a token, an order size and optionally your rules. It runs the CoinGraph check, measures the real on-chain price impact of your size (DEX aggregator quote) against order-book depth and daily volume, reads leverage, onchain flows and contract risk, and returns ALLOW, REDUCE (with the largest safe size) or BLOCK, with every reason sourced. Verdicts: ALLOW / REDUCE / BLOCK. Price: 5 tADA on testnet (premium).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Token: CoinGecko id (chainlink), symbol (LINK) or contract address"
                  },
                  "size_usd": {
                    "default": 10000,
                    "description": "Order size in USD",
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 10000000000
                  },
                  "side": {
                    "default": "buy",
                    "type": "string",
                    "enum": [
                      "buy",
                      "sell"
                    ]
                  },
                  "max_impact_pct": {
                    "description": "Largest acceptable price impact; default 1% for top-20 tokens, 2% otherwise",
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 50
                  },
                  "policy": {
                    "type": "object",
                    "properties": {
                      "min_depth_usd": {
                        "type": "number"
                      },
                      "max_top10_holder_pct": {
                        "type": "number"
                      },
                      "max_funding_pct": {
                        "type": "number"
                      },
                      "max_exchange_inflow_usd": {
                        "type": "number"
                      },
                      "allow_mint_authority": {
                        "type": "boolean"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": [
                  "token",
                  "size_usd",
                  "side"
                ],
                "additionalProperties": false
              },
              "example": {
                "token": "solana",
                "size_usd": 5000,
                "side": "buy"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Agent run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "agent_run"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AgentRun"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/wallet-guard": {
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "run_wallet_guard",
        "summary": "Wallet Guard: Checks a swap or a send before you sign it.",
        "description": "Before a swap, it checks the token: contract risks (honeypot, taxes, mint/freeze/blacklist powers), the real price impact of the amount, holder concentration and market conditions. Before a send, it checks the recipient live on the chain: OFAC sanctions, scam and phishing flags, burn addresses, brand-new wallets and lookalikes of known addresses (address poisoning). Returns SAFE, WARN or STOP with one plain sentence for the user. Verdicts: SAFE / WARN / STOP. Price: 5 tADA on testnet (premium).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "token": {
                    "description": "The token being swapped into or sent",
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100
                  },
                  "amount_usd": {
                    "description": "Amount in USD",
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 10000000000
                  },
                  "to_address": {
                    "description": "Recipient address (for a send)",
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 130
                  },
                  "chain": {
                    "description": "Chain of the recipient address",
                    "type": "string",
                    "enum": [
                      "eth",
                      "bsc",
                      "btc",
                      "sol",
                      "ada"
                    ]
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "token": "chainlink",
                "amount_usd": 5000,
                "to_address": "0x28c6c06298d514db089934071355e5743bf21d60",
                "chain": "eth"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Agent run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "agent_run"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AgentRun"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/due-diligence-analyst": {
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "run_due_diligence_analyst",
        "summary": "Due Diligence Analyst: A full due-diligence memo on any token in one run.",
        "description": "Structured like exchange listing reviews (Coinbase, Kraken) and lending-risk onboarding (Aave, Gauntlet, LlamaRisk): liquidity and markets, supply and holder concentration, contract and admin powers, onchain activity, derivatives, development and community, and CoinGraph's own track record on the token. Each section gets a grade with its evidence, plus red flags, strengths and an overall grade. Verdicts: A / B / C / D / F. Price: 10 tADA on testnet (pro).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Token: CoinGecko id (chainlink), symbol (LINK) or contract address"
                  }
                },
                "required": [
                  "token"
                ],
                "additionalProperties": false
              },
              "example": {
                "token": "cardano"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Agent run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "agent_run"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AgentRun"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/opportunity-scout": {
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "run_opportunity_scout",
        "summary": "Opportunity Scout: Finds what's moving, keeps only what's safe to act on.",
        "description": "Scans the 100 tracked tokens for momentum, volume spikes, coins leaving exchanges and fresh signals, runs the full CoinGraph check on each candidate and drops anything rated avoid. Returns a ranked shortlist; each setup has why it is interesting, what could go wrong, an invalidation price and a time horizon. Every setup is recorded and graded later. Verdicts: SETUPS_FOUND / NOTHING_CLEAN. Price: 10 tADA on testnet (pro).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "limit": {
                    "default": 5,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 10
                  }
                },
                "required": [
                  "limit"
                ],
                "additionalProperties": false
              },
              "example": {
                "limit": 5
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Agent run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "agent_run"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AgentRun"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/leverage-radar": {
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "run_leverage_radar",
        "summary": "Leverage Radar: Spots crowded futures trades before they unwind.",
        "description": "Scores every token with a futures market from 0 to 100 for crowding, combining funding against its own 14-day history, open-interest growth (especially while price is flat), top traders' long/short versus their 7-day average, open interest as a share of market cap, and recent liquidations. Returns which side is crowded and how fragile the market is. Verdicts: CROWDED / ELEVATED / BALANCED. Price: 5 tADA on testnet (premium).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "tokens": {
                    "description": "Tokens to score; default every token with a futures market",
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  },
                  "top": {
                    "default": 10,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 50
                  }
                },
                "required": [
                  "top"
                ],
                "additionalProperties": false
              },
              "example": {
                "top": 5
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Agent run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "agent_run"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AgentRun"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/whale-watch": {
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "run_whale_watch",
        "summary": "Whale Watch: Shows what the big wallets are doing with a token.",
        "description": "Reads onchain flows through NOWNodes: large transfers tagged with exchange names, net flows onto or off exchanges compared with the token's own 7-day pattern, exchange reserve trends and, live from the chain, who the biggest unlabelled wallets are. Returns ACCUMULATING, DISTRIBUTING or NEUTRAL with the moves behind it. Verdicts: ACCUMULATING / DISTRIBUTING / NEUTRAL / NO_DATA. Price: 5 tADA on testnet (premium).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "token": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 100,
                    "description": "Token: CoinGecko id (chainlink), symbol (LINK) or contract address"
                  }
                },
                "required": [
                  "token"
                ],
                "additionalProperties": false
              },
              "example": {
                "token": "chainlink"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Agent run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "agent_run"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AgentRun"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/portfolio-checkup": {
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "run_portfolio_checkup",
        "summary": "Portfolio Checkup: A health check for everything in a wallet.",
        "description": "Reads a wallet's holdings live from the chain, runs the CoinGraph check on each tracked token, and measures concentration, how many days each position would take to exit at normal volume, and contract risks. Returns a health grade from A to F with fixes ranked by impact. Verdicts: A / B / C / D / F. Price: 10 tADA on testnet (pro).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "chain": {
                    "type": "string",
                    "enum": [
                      "eth",
                      "bsc",
                      "btc",
                      "sol",
                      "ada"
                    ],
                    "description": "Chain: eth (Ethereum), bsc (BNB Chain), btc (Bitcoin), sol (Solana), ada (Cardano)"
                  },
                  "address": {
                    "type": "string",
                    "minLength": 20,
                    "maxLength": 130
                  }
                },
                "required": [
                  "chain",
                  "address"
                ],
                "additionalProperties": false
              },
              "example": {
                "chain": "eth",
                "address": "0x9fc3da866e7df3a1c57ade1a97c9f00a70f010c8"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Agent run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "agent_run"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AgentRun"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/treasury-steward": {
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "run_treasury_steward",
        "summary": "Treasury Steward: Enforces the treasury's rules, with proof.",
        "description": "Give it the treasury's assets and its investment policy (minimum liquidity, maximum holder concentration, maximum funding, maximum exchange inflow, mint authority, maximum exit slippage, maximum share of market cap). It tests every asset against every rule — exit slippage with a live DEX quote for the actual position size — and returns pass/fail per rule per asset, each backed by a proof id, ready to attach to a governance vote. Verdicts: COMPLIANT / BREACH / INCOMPLETE. Price: 10 tADA on testnet (pro).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "assets": {
                    "minItems": 1,
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "token": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 100,
                          "description": "Token: CoinGecko id (chainlink), symbol (LINK) or contract address"
                        },
                        "value_usd": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 100000000000
                        }
                      },
                      "required": [
                        "token",
                        "value_usd"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "policy": {
                    "type": "object",
                    "properties": {
                      "min_depth_usd": {
                        "description": "Minimum liquidity within 2% of price",
                        "type": "number"
                      },
                      "max_top10_holder_pct": {
                        "type": "number"
                      },
                      "max_funding_pct": {
                        "type": "number"
                      },
                      "max_exchange_inflow_usd": {
                        "type": "number"
                      },
                      "allow_mint_authority": {
                        "type": "boolean"
                      },
                      "max_exit_slippage_pct": {
                        "description": "Largest acceptable price impact to sell the whole position",
                        "type": "number"
                      },
                      "max_position_pct_of_market_cap": {
                        "type": "number"
                      }
                    },
                    "additionalProperties": false
                  }
                },
                "required": [
                  "assets",
                  "policy"
                ],
                "additionalProperties": false
              },
              "example": {
                "assets": [
                  {
                    "token": "cardano",
                    "value_usd": 9000
                  },
                  {
                    "token": "chainlink",
                    "value_usd": 6000
                  },
                  {
                    "token": "solana",
                    "value_usd": 5000
                  }
                ],
                "policy": {
                  "min_depth_usd": 500000,
                  "max_exit_slippage_pct": 1,
                  "allow_mint_authority": false,
                  "max_position_pct_of_market_cap": 0.5
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Agent run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "agent_run"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AgentRun"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/alert-watchtower": {
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "run_alert_watchtower",
        "summary": "Alert Watchtower: Watches your tokens and explains every alert.",
        "description": "Give it a list of tokens and optionally a webhook URL. It returns what is happening right now on each token (recent signals with the brief that explains them) and, with a webhook, keeps watching: every new signal or brief is pushed to you as a signed message. Verdicts: ACTIVE / QUIET. Price: 5 tADA on testnet (premium).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "tokens": {
                    "minItems": 1,
                    "maxItems": 50,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100,
                      "description": "Token: CoinGecko id (chainlink), symbol (LINK) or contract address"
                    }
                  },
                  "webhook_url": {
                    "description": "Optional public https URL for continuous alerts",
                    "type": "string",
                    "format": "uri"
                  },
                  "min_severity": {
                    "default": 2,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 3
                  },
                  "hours": {
                    "default": 24,
                    "type": "integer",
                    "minimum": 1,
                    "maximum": 48
                  }
                },
                "required": [
                  "tokens",
                  "min_severity",
                  "hours"
                ],
                "additionalProperties": false
              },
              "example": {
                "tokens": [
                  "cardano",
                  "chainlink",
                  "solana"
                ],
                "min_severity": 2
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Agent run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "agent_run"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AgentRun"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/agents/daily-market-brief": {
      "post": {
        "tags": [
          "Agents"
        ],
        "operationId": "run_daily_market_brief",
        "summary": "Daily Market Brief: The whole market in one readable page.",
        "description": "Opens with CoinGraph's own graded calls from the last 24 hours, then the market regime (risk-on or risk-off, breadth, leverage, Fear & Greed), what changed ranked by importance, stablecoin and exchange flows, the most crowded futures markets, top movers and headlines — and, if you pass your holdings, a line on each. Returned as Markdown and JSON. Verdicts: RISK_ON / RISK_OFF / NEUTRAL. Price: 5 tADA on testnet (premium).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$schema": "https://json-schema.org/draft/2020-12/schema",
                "type": "object",
                "properties": {
                  "holdings": {
                    "description": "Optional tokens you hold, for a personal section",
                    "maxItems": 20,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 100,
                      "description": "Token: CoinGecko id (chainlink), symbol (LINK) or contract address"
                    }
                  }
                },
                "additionalProperties": false
              },
              "example": {
                "holdings": [
                  "cardano",
                  "chainlink",
                  "solana"
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Agent run",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "agent_run"
                    },
                    "id": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "as_of": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "data": {
                      "$ref": "#/components/schemas/AgentRun"
                    },
                    "sources": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Source"
                      }
                    }
                  },
                  "required": [
                    "object",
                    "as_of",
                    "data",
                    "sources"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "402": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Source": {
        "type": "object",
        "properties": {
          "provider": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "as_of": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          }
        }
      },
      "TokenList": {
        "type": "object",
        "additionalProperties": true
      },
      "ServiceStatus": {
        "type": "object",
        "additionalProperties": true
      },
      "State": {
        "type": "object",
        "description": "token + one key per section; each section has as_of and sources; unmeasured values are the string \"unassessed\".",
        "additionalProperties": true
      },
      "History": {
        "type": "object",
        "properties": {
          "token": {
            "type": "object"
          },
          "window": {
            "type": "object"
          },
          "resolution": {
            "type": "string",
            "enum": [
              "15m",
              "1h",
              "6h",
              "raw"
            ]
          },
          "series": {
            "type": "object"
          },
          "events": {
            "type": "object"
          }
        }
      },
      "MarketState": {
        "type": "object",
        "additionalProperties": true
      },
      "AddressProfile": {
        "type": "object",
        "additionalProperties": true
      },
      "EvaluateRequest": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string"
          },
          "size_usd": {
            "type": "number",
            "description": "Your intended order size in USD"
          },
          "policy": {
            "type": "object",
            "properties": {
              "max_unlock_pct": {
                "type": "number"
              },
              "min_depth_usd": {
                "type": "number"
              },
              "allow_mint_authority": {
                "type": "boolean"
              },
              "max_top10_holder_pct": {
                "type": "number"
              },
              "max_funding_pct": {
                "type": "number"
              },
              "max_exchange_inflow_usd": {
                "type": "number"
              }
            }
          }
        },
        "required": [
          "token"
        ]
      },
      "Evaluation": {
        "type": "object",
        "properties": {
          "verdict": {
            "type": "string",
            "enum": [
              "proceed",
              "caution",
              "avoid"
            ]
          },
          "confidence": {
            "type": "number"
          },
          "dimensions": {
            "type": "object"
          },
          "reasons": {
            "type": "array"
          },
          "size_check": {
            "type": [
              "object",
              "null"
            ]
          },
          "policy_check": {
            "type": [
              "object",
              "null"
            ]
          },
          "watch_next": {
            "type": "array"
          },
          "hash": {
            "type": "string"
          },
          "verify_url": {
            "type": "string"
          }
        }
      },
      "Brief": {
        "type": "object",
        "properties": {
          "headline": {
            "type": "string"
          },
          "direction": {
            "type": "string"
          },
          "severity": {
            "type": "integer"
          },
          "confidence": {
            "type": "number"
          },
          "summary": {
            "type": "string"
          },
          "what_happened": {
            "type": "array"
          },
          "likely_causes": {
            "type": "array"
          },
          "onchain": {
            "type": "array"
          },
          "market_context": {
            "type": "array"
          },
          "watch_next": {
            "type": "array"
          },
          "caveats": {
            "type": "array"
          },
          "evidence": {
            "type": "array"
          },
          "verify_url": {
            "type": "string"
          }
        }
      },
      "Answer": {
        "type": "object",
        "additionalProperties": true
      },
      "MonitorRequest": {
        "type": "object",
        "properties": {
          "tokens": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "webhook_url": {
            "type": "string",
            "format": "uri"
          },
          "conditions": {
            "type": "object",
            "properties": {
              "kinds": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "min_severity": {
                "type": "integer",
                "minimum": 1,
                "maximum": 3
              },
              "verdict_changes": {
                "type": "boolean"
              },
              "new_briefs": {
                "type": "boolean"
              }
            }
          }
        },
        "required": [
          "tokens",
          "webhook_url"
        ]
      },
      "AgentList": {
        "type": "object",
        "additionalProperties": true
      },
      "AgentCard": {
        "type": "object",
        "additionalProperties": true
      },
      "AgentRun": {
        "type": "object",
        "properties": {
          "run_id": {
            "type": "string"
          },
          "agent": {
            "type": "string"
          },
          "verdict": {
            "type": "string"
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object"
          },
          "reasons": {
            "type": "array"
          },
          "warnings": {
            "type": "array"
          },
          "hash": {
            "type": "string"
          },
          "verify_url": {
            "type": "string"
          }
        }
      },
      "Monitor": {
        "type": "object",
        "additionalProperties": true
      },
      "MonitorList": {
        "type": "object",
        "additionalProperties": true
      },
      "Record": {
        "type": "object",
        "additionalProperties": true
      },
      "Proof": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "securitySchemes": {
      "x402": {
        "type": "apiKey",
        "in": "header",
        "name": "PAYMENT-SIGNATURE",
        "description": "x402 v2 payment (signed Cardano transaction, base64). Paid endpoints answer 402 with a PAYMENT-REQUIRED header describing the payment."
      },
      "partner": {
        "type": "http",
        "scheme": "bearer",
        "description": "Design-partner API key (cg_…): used instead of paying per call."
      }
    }
  }
}