{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/metastreams/json-schema/metastreams-spot-trending-filter-schema.json",
  "title": "SpotTrendingFilter",
  "description": "A trending request: one or more chains, one window, and the filters the board must satisfy.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/metastreams-openapi.json#/components/schemas/SpotTrendingFilter",
  "type": "object",
  "required": [
    "chains"
  ],
  "properties": {
    "chains": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SpotChain"
      },
      "description": "Chains the board ranks over, as one mixed set."
    },
    "filters": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/DiscoveryTokenFilters",
          "description": "Filters the ranked tokens must satisfy; absent ranks every candidate."
        }
      ],
      "description": "Filters the ranked tokens must satisfy; absent ranks every candidate."
    },
    "limit": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32",
      "description": "Ranked-set size, clamped to 1-100; 100 when absent.",
      "minimum": 0
    },
    "window": {
      "$ref": "#/$defs/TrendingWindow",
      "description": "Window the score reads; `24h` when absent."
    }
  },
  "additionalProperties": false,
  "$defs": {
    "DiscoveryTokenFilters": {
      "type": "object",
      "description": "Filters over a discovery column. Every range is inclusive on both ends, and an absent bound is unbounded.",
      "properties": {
        "ageMinutes": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_u64",
              "description": "Minutes since the token was created."
            }
          ],
          "description": "Minutes since the token was created."
        },
        "anchorSymbols": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Keep tokens whose deepest pool prices against any of these quote assets, such as `WSOL`, `USDC` or `WBNB`, ignoring case."
        },
        "bondingCurvePercent": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_f64",
              "description": "Bonding-curve completion, 0-100. A token with no bonding curve passes."
            }
          ],
          "description": "Bonding-curve completion, 0-100. A token with no bonding curve passes."
        },
        "bundlerSupplyPercent": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_Decimal",
              "description": "Share of supply bundler wallets hold, 0-100."
            }
          ],
          "description": "Share of supply bundler wallets hold, 0-100."
        },
        "buys": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_u64",
              "description": "Buys over the last 24 hours."
            }
          ],
          "description": "Buys over the last 24 hours."
        },
        "devHoldingPercent": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_f64",
              "description": "Share of supply the creator holds, 0-100."
            }
          ],
          "description": "Share of supply the creator holds, 0-100."
        },
        "devTokensCreated": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_u64",
              "description": "How many tokens the creator has deployed. A bound excludes a token with no count."
            }
          ],
          "description": "How many tokens the creator has deployed. A bound excludes a token with no count."
        },
        "devTokensMigrated": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_u64",
              "description": "How many of the creator's tokens graduated. A bound excludes a token with no count."
            }
          ],
          "description": "How many of the creator's tokens graduated. A bound excludes a token with no count."
        },
        "dexPaid": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "`true` keeps tokens with a paid DexScreener profile; `false` keeps tokens without one."
        },
        "excludeAnnotations": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/TokenAnnotation"
          },
          "description": "Drop tokens that carry any of these annotations, each written as `{\"kind\": \"mayhem_mode\"}`."
        },
        "excludeDevAddresses": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Drop tokens created by any of these wallets."
        },
        "excludeFundingAddresses": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Drop tokens whose creator was funded by any of these wallets."
        },
        "excludeSymbolOrName": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Drop tokens whose symbol or name contains any of these words, ignoring case. A word shaped like an address drops that token instead."
        },
        "excludeTwitter": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Drop tokens whose X handle matches any entry, as a handle or a URL."
        },
        "excludeWebsites": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Drop tokens whose website host matches any entry, as a URL or a bare domain."
        },
        "globalFeesPaidNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_Decimal",
              "description": "The fees `globalFeesPaidUsd` counts, in the chain's native asset."
            }
          ],
          "description": "The fees `globalFeesPaidUsd` counts, in the chain's native asset."
        },
        "globalFeesPaidUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_Decimal",
              "description": "All-time USD fees traders paid: transaction, validator and platform fees on Solana, and venue fees on other chains."
            }
          ],
          "description": "All-time USD fees traders paid: transaction, validator and platform fees on Solana, and venue fees on other chains."
        },
        "holderCount": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_u64",
              "description": "Current holders."
            }
          ],
          "description": "Current holders."
        },
        "insiderSupplyPercent": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_Decimal",
              "description": "Share of supply insider wallets hold, 0-100."
            }
          ],
          "description": "Share of supply insider wallets hold, 0-100."
        },
        "lastActivityMinutes": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int64",
          "description": "Keep tokens updated within this many minutes. Any change to the token counts as an update, such as a trade.",
          "minimum": 0
        },
        "liquidityUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_Decimal",
              "description": "USD liquidity."
            }
          ],
          "description": "USD liquidity."
        },
        "marketCapUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_Decimal",
              "description": "USD market cap."
            }
          ],
          "description": "USD market cap."
        },
        "maxGraduationStaleMinutes": {
          "type": [
            "integer",
            "null"
          ],
          "format": "int32",
          "description": "Drop tokens with no update within this many minutes, unless they are at 99.5% of their bonding curve or more.",
          "minimum": 0
        },
        "proTraderCount": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_u64",
              "description": "Wallets that traded the token through a known trading terminal."
            }
          ],
          "description": "Wallets that traded the token through a known trading terminal."
        },
        "protocols": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Keep tokens from any of these launchpads, such as `pumpfun`. The value `mayhem_mode` keeps Pump.fun Mayhem Mode tokens."
        },
        "sells": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_u64",
              "description": "Sells over the last 24 hours."
            }
          ],
          "description": "Sells over the last 24 hours."
        },
        "snipersSupplyPercent": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_f64",
              "description": "Share of supply sniper wallets hold, 0-100."
            }
          ],
          "description": "Share of supply sniper wallets hold, 0-100."
        },
        "symbolOrName": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "type": "string"
          },
          "description": "Keep tokens whose symbol or name contains any of these words, ignoring case. A word shaped like an address matches the token's address instead."
        },
        "top10HoldersPercent": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_f64",
              "description": "Share of supply the 10 largest holders hold, 0-100."
            }
          ],
          "description": "Share of supply the 10 largest holders hold, 0-100."
        },
        "twitterReuseCount": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_u64",
              "description": "How many other tokens claimed the same X account. Not yet counted, so every token passes."
            }
          ],
          "description": "How many other tokens claimed the same X account. Not yet counted, so every token passes."
        },
        "txns": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_u64",
              "description": "Buys plus sells over the last 24 hours."
            }
          ],
          "description": "Buys plus sells over the last 24 hours."
        },
        "volumeUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/FilterRange_Decimal",
              "description": "USD volume over the last 24 hours."
            }
          ],
          "description": "USD volume over the last 24 hours."
        },
        "withAtLeastOneSocial": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "`true` keeps tokens with at least one social link; `false` applies no condition."
        }
      },
      "additionalProperties": false
    },
    "FilterRange_Decimal": {
      "type": "object",
      "description": "An inclusive range of decimal strings; an absent bound is unbounded.",
      "properties": {
        "max": {
          "type": "string",
          "format": "decimal",
          "description": "Largest value kept, inclusive; absent means unbounded."
        },
        "min": {
          "type": "string",
          "format": "decimal",
          "description": "Smallest value kept, inclusive; absent means unbounded."
        }
      }
    },
    "FilterRange_f64": {
      "type": "object",
      "description": "An inclusive range of numbers; an absent bound is unbounded.",
      "properties": {
        "max": {
          "type": "number",
          "format": "double",
          "description": "Largest value kept, inclusive; absent means unbounded."
        },
        "min": {
          "type": "number",
          "format": "double",
          "description": "Smallest value kept, inclusive; absent means unbounded."
        }
      }
    },
    "FilterRange_u64": {
      "type": "object",
      "description": "An inclusive range of counts; an absent bound is unbounded.",
      "properties": {
        "max": {
          "type": "integer",
          "format": "int64",
          "description": "Largest value kept, inclusive; absent means unbounded.",
          "minimum": 0
        },
        "min": {
          "type": "integer",
          "format": "int64",
          "description": "Smallest value kept, inclusive; absent means unbounded.",
          "minimum": 0
        }
      }
    },
    "SpotChain": {
      "type": "string",
      "description": "Chain slug. One spelling per chain, in paths and bodies alike. Only a chain with spot data is published.",
      "enum": [
        "solana",
        "bsc",
        "robinhood",
        "elysium",
        "ethereum",
        "base"
      ]
    },
    "TokenAnnotation": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "description": "Which annotation this is.",
              "enum": [
                "mayhem_mode"
              ]
            }
          }
        },
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "description": "Which annotation this is.",
              "enum": [
                "cashback_coin"
              ]
            }
          }
        },
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "description": "Which annotation this is.",
              "enum": [
                "anchor"
              ]
            }
          }
        },
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "description": "Which annotation this is.",
              "enum": [
                "x_mode"
              ]
            }
          }
        },
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "description": "Which annotation this is.",
              "enum": [
                "tax_token"
              ]
            }
          }
        },
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "description": "Which annotation this is.",
              "enum": [
                "stock_quote"
              ]
            }
          }
        },
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "description": "Which annotation this is.",
              "enum": [
                "stock_dividend"
              ]
            }
          }
        },
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "description": "Which annotation this is.",
              "enum": [
                "ai_vault"
              ]
            }
          }
        },
        {
          "type": "object",
          "required": [
            "kind"
          ],
          "properties": {
            "kind": {
              "type": "string",
              "description": "Which annotation this is.",
              "enum": [
                "tax_vault"
              ]
            }
          }
        }
      ],
      "description": "A platform-scoped flag the launch carried, tagged by `kind`."
    },
    "TrendingWindow": {
      "type": "string",
      "description": "Window the trending score's volume and velocity terms read; `24h` when absent.",
      "enum": [
        "1m",
        "5m",
        "30m",
        "1h",
        "6h",
        "24h"
      ]
    }
  }
}