{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cabalspy-xyz/json-schema/cabalspy-xyz-feed-transaction-schema.json",
  "title": "FeedTransaction",
  "description": "A single buy or sell of a tracked wallet.",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cabalspy-xyz-openapi.json#/components/schemas/FeedTransaction",
  "type": "object",
  "properties": {
    "tx_signature": {
      "type": "string",
      "description": "Transaction signature."
    },
    "mint": {
      "type": "string",
      "description": "Token mint."
    },
    "token_name": {
      "type": "string",
      "description": "Token name or symbol."
    },
    "token_supply": {
      "type": "number",
      "description": "Total supply."
    },
    "token_decimals": {
      "type": "integer",
      "description": "Token decimals."
    },
    "transaction_type": {
      "type": "string",
      "description": "buy or sell."
    },
    "value": {
      "type": "number",
      "description": "Trade value (native)."
    },
    "value_usd": {
      "type": [
        "number",
        "null"
      ],
      "description": "Trade value in USD."
    },
    "currency": {
      "type": "string",
      "description": "Native currency."
    },
    "token_amount": {
      "type": "number",
      "description": "Number of tokens in the trade."
    },
    "price_per_token": {
      "type": "number",
      "description": "Price per token (native)."
    },
    "price_per_token_usd": {
      "type": [
        "number",
        "null"
      ],
      "description": "Price per token in USD."
    },
    "created_at": {
      "type": "string",
      "description": "Timestamp of the trade."
    },
    "profile": {
      "$ref": "#/$defs/Profile"
    },
    "holdings_after": {
      "$ref": "#/$defs/HoldingsAfter"
    }
  },
  "additionalProperties": true,
  "$defs": {
    "HoldingsAfter": {
      "type": "object",
      "description": "Holder position right after a trade.",
      "properties": {
        "token_amount": {
          "type": "number"
        },
        "token_amount_peak": {
          "type": "number"
        },
        "supply_pct": {
          "type": "number"
        },
        "supply_pct_peak": {
          "type": "number"
        },
        "bag_pct": {
          "type": "number"
        },
        "still_holding": {
          "type": "boolean"
        }
      },
      "additionalProperties": true
    },
    "Profile": {
      "type": "object",
      "description": "Wallet profile.",
      "properties": {
        "name": {
          "type": "string",
          "description": "Display name (may be empty)."
        },
        "image_url": {
          "type": "string",
          "description": "Avatar URL."
        },
        "twitter": {
          "type": "string",
          "description": "Twitter or X link."
        },
        "telegram": {
          "type": "string",
          "description": "Telegram link."
        },
        "blockchain": {
          "type": "string",
          "description": "Chain."
        },
        "currency": {
          "type": "string",
          "description": "Native currency."
        },
        "type": {
          "type": [
            "string",
            "null"
          ],
          "description": "Wallet type kol, smart or whale."
        }
      },
      "additionalProperties": true
    }
  }
}