{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/metastreams/json-schema/metastreams-trade-search-schema.json",
  "title": "TradeSearch",
  "description": "The body of `POST /v1/trades`: trade history under any `spot.trades` filter.\n\n`filter` takes every key a `spot.trades` subscription takes. A `timestamp` order reads newest\nfirst and pages back through history. Any other order ranks one window of trades by that\nvalue, and needs `fromAt`.",
  "x-generated": "2026-11-25",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/metastreams-openapi.json#/components/schemas/TradeSearch",
  "type": "object",
  "properties": {
    "cursor": {
      "type": [
        "string",
        "null"
      ],
      "description": "Opaque cursor from the previous page."
    },
    "filter": {
      "$ref": "#/$defs/TradeFilter",
      "description": "The trades to keep, as a `spot.trades` subscription names them."
    },
    "fromAt": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/UnixMilliseconds",
          "description": "Window start, inclusive. A ranking needs it."
        }
      ],
      "description": "Window start, inclusive. A ranking needs it."
    },
    "limit": {
      "type": [
        "integer",
        "null"
      ],
      "format": "int32",
      "description": "Trades per page, 20 when absent. A value outside 1–100 is clamped into it.",
      "minimum": 0
    },
    "order": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/SortOrder",
          "description": "`desc` when absent. A `timestamp` order is always `desc`."
        }
      ],
      "description": "`desc` when absent. A `timestamp` order is always `desc`."
    },
    "sortBy": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/TradeSortField",
          "description": "The value that orders the trades; `timestamp` when absent."
        }
      ],
      "description": "The value that orders the trades; `timestamp` when absent."
    },
    "toAt": {
      "oneOf": [
        {
          "type": "null"
        },
        {
          "$ref": "#/$defs/UnixMilliseconds",
          "description": "Window end, exclusive. When absent, a feed ends at now. A ranking ends at its widest\nwindow past `fromAt`, or at now when that is earlier."
        }
      ],
      "description": "Window end, exclusive. When absent, a feed ends at now. A ranking ends at its widest\nwindow past `fromAt`, or at now when that is earlier."
    }
  },
  "additionalProperties": false,
  "$defs": {
    "AnchorToken": {
      "type": "string",
      "description": "The quote asset a token's deepest pool prices against.",
      "enum": [
        "native",
        "usdc",
        "usdt",
        "usd1",
        "busd",
        "uusd",
        "usdg",
        "unknown"
      ]
    },
    "FundingSourceKind": {
      "type": "string",
      "description": "Whether a known exchange or another wallet funded the creator.",
      "enum": [
        "cex",
        "wallet"
      ]
    },
    "GraduationStage": {
      "type": "string",
      "description": "A launchpad token's stage, from launch to its DEX listing.",
      "enum": [
        "newly_created",
        "about_to_graduate",
        "graduated"
      ]
    },
    "MultiChainAddress": {
      "type": "string",
      "description": "An address: base58 on Solana, `0x`-hex on an EVM chain."
    },
    "Range_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."
        }
      },
      "additionalProperties": false
    },
    "Range_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
        }
      },
      "additionalProperties": false
    },
    "Social": {
      "type": "string",
      "description": "A social link a token can carry.",
      "enum": [
        "twitter",
        "telegram",
        "website",
        "discord"
      ]
    },
    "SortOrder": {
      "type": "string",
      "description": "Rank direction; descending when absent.",
      "enum": [
        "asc",
        "desc"
      ]
    },
    "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"
      ]
    },
    "StatsFilter": {
      "type": "object",
      "description": "Activity filters for one rolling window.",
      "properties": {
        "buyVolumeNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Buy volume in the chain's gas asset."
            }
          ],
          "description": "Buy volume in the chain's gas asset."
        },
        "buyVolumeUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Buy volume in USD."
            }
          ],
          "description": "Buy volume in USD."
        },
        "buys": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Number of buys."
            }
          ],
          "description": "Number of buys."
        },
        "netBuyVolumeNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Buy volume less sell volume, in the chain's gas asset."
            }
          ],
          "description": "Buy volume less sell volume, in the chain's gas asset."
        },
        "netBuyVolumeUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Buy volume less sell volume, in USD."
            }
          ],
          "description": "Buy volume less sell volume, in USD."
        },
        "priceChangePct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Signed percent change of the price."
            }
          ],
          "description": "Signed percent change of the price."
        },
        "sellVolumeNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Sell volume in the chain's gas asset."
            }
          ],
          "description": "Sell volume in the chain's gas asset."
        },
        "sellVolumeUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Sell volume in USD."
            }
          ],
          "description": "Sell volume in USD."
        },
        "sells": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Number of sells."
            }
          ],
          "description": "Number of sells."
        },
        "txns": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Number of buys and sells."
            }
          ],
          "description": "Number of buys and sells."
        },
        "volumeNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Volume in the chain's gas asset."
            }
          ],
          "description": "Volume in the chain's gas asset."
        },
        "volumeUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Volume in USD."
            }
          ],
          "description": "Volume in USD."
        }
      },
      "additionalProperties": false
    },
    "TokenExclude": {
      "type": "object",
      "description": "Values that drop a token. Each list drops a token that matches any of its values.",
      "properties": {
        "anchors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AnchorToken"
          },
          "description": "Quote assets to drop."
        },
        "annotations": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Annotation kinds to drop, each written as its bare `kind`."
        },
        "chains": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SpotChain"
          },
          "description": "Chains to drop."
        },
        "devAddresses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MultiChainAddress"
          },
          "description": "Creator wallets to drop."
        },
        "dexes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Pool venues to drop."
        },
        "fundingAddresses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MultiChainAddress"
          },
          "description": "Creator funders to drop."
        },
        "fundingKinds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FundingSourceKind"
          },
          "description": "Kinds of creator funding source to drop."
        },
        "graduatedToDexes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Graduation venues to drop."
        },
        "protocols": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Launchpads to drop."
        },
        "socials": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Social"
          },
          "description": "Social links whose presence drops a token."
        },
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GraduationStage"
          },
          "description": "Launchpad stages to drop."
        },
        "symbolOrName": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Symbol or name substrings to drop."
        },
        "tokens": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MultiChainAddress"
          },
          "description": "Token addresses to drop."
        },
        "twitter": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "X handles to drop."
        },
        "websites": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Website hosts to drop."
        }
      },
      "additionalProperties": false
    },
    "TokenFilter": {
      "type": "object",
      "description": "A predicate on one token's current state.",
      "properties": {
        "ageMs": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Time since creation."
            }
          ],
          "description": "Time since creation."
        },
        "anchors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AnchorToken"
          },
          "description": "Quote assets the token trades against."
        },
        "annotations": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Annotation kinds the token carries, each written as its bare `kind`."
        },
        "athMarketCapNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "All-time-high market cap in the chain's gas asset."
            }
          ],
          "description": "All-time-high market cap in the chain's gas asset."
        },
        "athMarketCapUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "All-time-high market cap in USD."
            }
          ],
          "description": "All-time-high market cap in USD."
        },
        "bondingCurvePct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Percent of the bonding curve filled."
            }
          ],
          "description": "Percent of the bonding curve filled."
        },
        "bundlerCount": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Number of bundler wallets."
            }
          ],
          "description": "Number of bundler wallets."
        },
        "bundlerSupplyPct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Percent of supply bundlers hold."
            }
          ],
          "description": "Percent of supply bundlers hold."
        },
        "buyTaxBps": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Buy tax in basis points."
            }
          ],
          "description": "Buy tax in basis points."
        },
        "chains": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SpotChain"
          },
          "description": "Chains to keep; empty keeps every chain."
        },
        "devAddresses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MultiChainAddress"
          },
          "description": "Creator wallets to keep."
        },
        "devHoldingPct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Percent of supply the creator holds."
            }
          ],
          "description": "Percent of supply the creator holds."
        },
        "dexPaid": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether the token paid for a DEX Screener profile."
        },
        "dexes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Venues of any of the token's pools."
        },
        "drawdownFromAthPct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Percent the USD market cap sits below its all-time high."
            }
          ],
          "description": "Percent the USD market cap sits below its all-time high."
        },
        "exclude": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/TokenExclude",
              "description": "Values that drop a token that matches any of them."
            }
          ],
          "description": "Values that drop a token that matches any of them."
        },
        "feesDexNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "All-time DEX fees in the chain's gas asset."
            }
          ],
          "description": "All-time DEX fees in the chain's gas asset."
        },
        "feesDexUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "All-time DEX fees in USD."
            }
          ],
          "description": "All-time DEX fees in USD."
        },
        "feesPlatformNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "All-time platform fees in the chain's gas asset."
            }
          ],
          "description": "All-time platform fees in the chain's gas asset."
        },
        "feesPlatformUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "All-time platform fees in USD."
            }
          ],
          "description": "All-time platform fees in USD."
        },
        "feesValidatorNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "All-time validator fees in the chain's gas asset."
            }
          ],
          "description": "All-time validator fees in the chain's gas asset."
        },
        "feesValidatorUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "All-time validator fees in USD."
            }
          ],
          "description": "All-time validator fees in USD."
        },
        "fomoCount": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Number of fomo traders."
            }
          ],
          "description": "Number of fomo traders."
        },
        "fomoSupplyPct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Percent of supply fomo traders hold."
            }
          ],
          "description": "Percent of supply fomo traders hold."
        },
        "freshWalletCount": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Number of fresh wallets."
            }
          ],
          "description": "Number of fresh wallets."
        },
        "freshWalletSupplyPct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Percent of supply fresh wallets hold."
            }
          ],
          "description": "Percent of supply fresh wallets hold."
        },
        "fundedByCexPct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Percent of holders an exchange funded."
            }
          ],
          "description": "Percent of holders an exchange funded."
        },
        "fundingAddresses": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MultiChainAddress"
          },
          "description": "Wallets that funded the creator."
        },
        "fundingKinds": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FundingSourceKind"
          },
          "description": "Kinds of source that funded the creator."
        },
        "graduatedToDexes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Venues the token graduated to."
        },
        "holderCount": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Number of holders."
            }
          ],
          "description": "Number of holders."
        },
        "insiderCount": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Number of insider wallets."
            }
          ],
          "description": "Number of insider wallets."
        },
        "insiderSupplyPct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Percent of supply insiders hold."
            }
          ],
          "description": "Percent of supply insiders hold."
        },
        "lastActivityMs": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Time since the token's state last changed."
            }
          ],
          "description": "Time since the token's state last changed."
        },
        "liquidityNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Liquidity in the chain's gas asset."
            }
          ],
          "description": "Liquidity in the chain's gas asset."
        },
        "liquidityUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Liquidity in USD."
            }
          ],
          "description": "Liquidity in USD."
        },
        "lpBurntPct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Percent of LP tokens burnt."
            }
          ],
          "description": "Percent of LP tokens burnt."
        },
        "marketCapNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Market cap in the chain's gas asset."
            }
          ],
          "description": "Market cap in the chain's gas asset."
        },
        "marketCapUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Market cap in USD."
            }
          ],
          "description": "Market cap in USD."
        },
        "mintDisabled": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether minting is disabled."
        },
        "phishingCount": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Number of phishing wallets."
            }
          ],
          "description": "Number of phishing wallets."
        },
        "phishingSupplyPct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Percent of supply phishing wallets hold."
            }
          ],
          "description": "Percent of supply phishing wallets hold."
        },
        "priceNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Price in the chain's gas asset."
            }
          ],
          "description": "Price in the chain's gas asset."
        },
        "priceUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Price in USD."
            }
          ],
          "description": "Price in USD."
        },
        "proTraderCount": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Number of pro traders."
            }
          ],
          "description": "Number of pro traders."
        },
        "proTraderSupplyPct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Percent of supply pro traders hold."
            }
          ],
          "description": "Percent of supply pro traders hold."
        },
        "protocols": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Launchpads the token launched on."
        },
        "sellTaxBps": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Sell tax in basis points."
            }
          ],
          "description": "Sell tax in basis points."
        },
        "sinceGraduationMs": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Time since graduation."
            }
          ],
          "description": "Time since graduation."
        },
        "sniperCount": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Number of sniper wallets."
            }
          ],
          "description": "Number of sniper wallets."
        },
        "snipersSupplyPct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Percent of supply snipers hold."
            }
          ],
          "description": "Percent of supply snipers hold."
        },
        "socials": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Social"
          },
          "description": "Social links the token must carry at least one of."
        },
        "stages": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/GraduationStage"
          },
          "description": "Launchpad stages; a token with no launchpad has no stage."
        },
        "stats": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/WindowStatsFilter",
              "description": "Rolling-window activity."
            }
          ],
          "description": "Rolling-window activity."
        },
        "supply": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Supply in whole tokens."
            }
          ],
          "description": "Supply in whole tokens."
        },
        "symbolOrName": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Substrings of the symbol or name; an address-shaped value matches the token address exactly."
        },
        "tokens": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/MultiChainAddress"
          },
          "description": "Token addresses to keep, 1 to 100 of them."
        },
        "top10HoldersPct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Percent of supply the ten largest holders hold."
            }
          ],
          "description": "Percent of supply the ten largest holders hold."
        },
        "totalVolumeNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "All-time volume in the chain's gas asset."
            }
          ],
          "description": "All-time volume in the chain's gas asset."
        },
        "totalVolumeUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "All-time volume in USD."
            }
          ],
          "description": "All-time volume in USD."
        },
        "transferBlockable": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether an authority can block transfers."
        },
        "transferFeeBps": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_u64",
              "description": "Transfer fee in basis points."
            }
          ],
          "description": "Transfer fee in basis points."
        }
      },
      "additionalProperties": false
    },
    "TradeDirection": {
      "type": "string",
      "description": "Which way the traded token moved: `buy` or `sell`.",
      "enum": [
        "buy",
        "sell"
      ]
    },
    "TradeExclude": {
      "type": "object",
      "description": "Values that drop a trade. Each list drops a trade that matches any of its values.",
      "properties": {
        "flags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WalletFilter"
          },
          "description": "Trader classifications to drop."
        },
        "platforms": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Trading terminals to drop."
        },
        "wallets": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MultiChainAddress"
          },
          "description": "Trader wallets to drop."
        }
      },
      "additionalProperties": false
    },
    "TradeFilter": {
      "type": "object",
      "description": "A predicate on one trade. Different keys are ANDed; values in one list are ORed.",
      "properties": {
        "amount": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Token units traded."
            }
          ],
          "description": "Token units traded."
        },
        "anchors": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/AnchorToken"
          },
          "description": "Quote assets the trade priced against."
        },
        "chains": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SpotChain"
          },
          "description": "Chains to keep; empty keeps every chain."
        },
        "dexes": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Venues the trade executed on."
        },
        "exclude": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/TradeExclude",
              "description": "Values that drop a trade that matches any of them."
            }
          ],
          "description": "Values that drop a trade that matches any of them."
        },
        "feesPlatformNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "The trading terminal's cut, in the chain's gas asset."
            }
          ],
          "description": "The trading terminal's cut, in the chain's gas asset."
        },
        "feesPlatformUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "The trading terminal's cut, in USD."
            }
          ],
          "description": "The trading terminal's cut, in USD."
        },
        "feesValidatorNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Validator tips and MEV bribes, in the chain's gas asset."
            }
          ],
          "description": "Validator tips and MEV bribes, in the chain's gas asset."
        },
        "feesValidatorUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Validator tips and MEV bribes, in USD."
            }
          ],
          "description": "Validator tips and MEV bribes, in USD."
        },
        "flags": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/WalletFilter"
          },
          "description": "Trader classifications to keep."
        },
        "fullExit": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "Whether the trade is a sell that leaves the trader none of the token."
        },
        "launchpads": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Launchpads the traded token launched on."
        },
        "liquidityNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Pool liquidity at the trade, in the chain's gas asset."
            }
          ],
          "description": "Pool liquidity at the trade, in the chain's gas asset."
        },
        "liquidityUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Pool liquidity at the trade, in USD."
            }
          ],
          "description": "Pool liquidity at the trade, in USD."
        },
        "marketCapNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Market cap at the fill price, in the chain's gas asset."
            }
          ],
          "description": "Market cap at the fill price, in the chain's gas asset."
        },
        "marketCapUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Market cap at the fill price, in USD."
            }
          ],
          "description": "Market cap at the fill price, in USD."
        },
        "platforms": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Trading terminals the trade routed through."
        },
        "pools": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/MultiChainAddress"
          },
          "description": "Pools or markets to keep; absent keeps every pool."
        },
        "priceImpactPct": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Percent the fill price moved from the price before the trade."
            }
          ],
          "description": "Percent the fill price moved from the price before the trade."
        },
        "priceNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Fill price in the chain's gas asset."
            }
          ],
          "description": "Fill price in the chain's gas asset."
        },
        "priceUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Fill price in USD."
            }
          ],
          "description": "Fill price in USD."
        },
        "side": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/TradeDirection",
              "description": "Buy or sell."
            }
          ],
          "description": "Buy or sell."
        },
        "token": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/TokenFilter",
              "description": "The traded token's current state, as a `spot.tokens` filter tests it."
            }
          ],
          "description": "The traded token's current state, as a `spot.tokens` filter tests it."
        },
        "tokens": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/MultiChainAddress"
          },
          "description": "Traded tokens to keep; absent keeps every token."
        },
        "traderSources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/TraderSource"
          },
          "description": "What named the trader of an EVM trade. A Solana trade has none."
        },
        "volumeNative": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Trade value in the chain's gas asset."
            }
          ],
          "description": "Trade value in the chain's gas asset."
        },
        "volumeUsd": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/Range_Decimal",
              "description": "Trade value in USD."
            }
          ],
          "description": "Trade value in USD."
        },
        "wallets": {
          "type": [
            "array",
            "null"
          ],
          "items": {
            "$ref": "#/$defs/MultiChainAddress"
          },
          "description": "Trader wallets to keep; absent keeps every wallet."
        }
      },
      "additionalProperties": false
    },
    "TradeSortField": {
      "type": "string",
      "description": "The value a trade search orders by. Each value but `timestamp` is a range key of the filter.",
      "enum": [
        "timestamp",
        "volumeUsd",
        "volumeNative",
        "amount",
        "priceUsd",
        "priceNative",
        "marketCapUsd",
        "marketCapNative",
        "liquidityUsd",
        "liquidityNative",
        "feesValidatorUsd",
        "feesValidatorNative",
        "feesPlatformUsd",
        "feesPlatformNative"
      ]
    },
    "TraderSource": {
      "type": "string",
      "description": "What named the trader of an EVM trade.",
      "enum": [
        "swap_recipient",
        "tx_origin",
        "launchpad_buyer",
        "settlement_endpoint",
        "authority7702",
        "user_op_sender",
        "relay_caller",
        "pool_caller",
        "net_principal",
        "net_sender",
        "net_payer",
        "unresolved",
        "cycle_sender",
        "native_out_sender",
        "contract_caller",
        "net_holder",
        "net_receiver",
        "token_funded"
      ]
    },
    "UnixMilliseconds": {
      "type": "integer",
      "format": "int64",
      "description": "An instant, as milliseconds since the Unix epoch."
    },
    "WalletFilter": {
      "type": "string",
      "description": "A wallet classification a trade or holder filter selects on.",
      "enum": [
        "dev",
        "sniper",
        "insider",
        "bundler",
        "fresh",
        "whale",
        "kol",
        "pro_trader",
        "fomo",
        "phishing"
      ]
    },
    "WindowStatsFilter": {
      "type": "object",
      "description": "Activity filters per rolling window.",
      "properties": {
        "1h": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/StatsFilter",
              "description": "The last hour."
            }
          ],
          "description": "The last hour."
        },
        "24h": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/StatsFilter",
              "description": "The last 24 hours."
            }
          ],
          "description": "The last 24 hours."
        },
        "30m": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/StatsFilter",
              "description": "The last 30 minutes."
            }
          ],
          "description": "The last 30 minutes."
        },
        "5m": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/StatsFilter",
              "description": "The last 5 minutes."
            }
          ],
          "description": "The last 5 minutes."
        },
        "6h": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/StatsFilter",
              "description": "The last 6 hours."
            }
          ],
          "description": "The last 6 hours."
        }
      },
      "additionalProperties": false
    }
  }
}