{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vybenetwork-com/json-schema/vybenetwork-com-account-top-trader-metrics-schema.json",
  "title": "AccountTopTraderMetrics",
  "description": "Trading metrics and performance statistics for an account.",
  "x-generated": "2026-11-28",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vybenetwork-com-solana-api-websocket-api-openapi.yml#/components/schemas/AccountTopTraderMetrics",
  "properties": {
    "bestPerformingToken": {
      "allOf": [
        {
          "$ref": "#/$defs/TokenPerformance"
        }
      ],
      "description": "The token with the highest performance for the selected time range and filters.",
      "nullable": true
    },
    "realizedPnlUsd": {
      "description": "The total realized profit in USD.",
      "format": "double",
      "type": "number"
    },
    "sevenDayPnl": {
      "description": "The profit and loss trend over the last seven days.",
      "items": {
        "items": {
          "format": "double",
          "type": "number"
        },
        "type": "array"
      },
      "type": "array"
    },
    "tradesCount": {
      "description": "The total number of trades executed.",
      "format": "int64",
      "minimum": 0,
      "type": "integer"
    },
    "tradesVolumeUsd": {
      "description": "The total trading volume in USD.",
      "format": "double",
      "type": "number"
    },
    "uniqueTokensTraded": {
      "description": "The count of unique tokens traded by the account.",
      "format": "int64",
      "minimum": 0,
      "type": [
        "integer",
        "null"
      ]
    },
    "unrealizedPnlUsd": {
      "description": "The total unrealized profit in USD.",
      "format": "double",
      "type": "number"
    },
    "winRate": {
      "description": "The percentage of winning trades (0.0 to 100.0).",
      "format": "double",
      "type": "number"
    },
    "worstPerformingToken": {
      "allOf": [
        {
          "$ref": "#/$defs/TokenPerformance"
        }
      ],
      "description": "The token with the lowest performance for the selected time range and filters.",
      "nullable": true
    }
  },
  "required": [
    "realizedPnlUsd",
    "unrealizedPnlUsd",
    "winRate",
    "tradesVolumeUsd",
    "tradesCount",
    "sevenDayPnl"
  ],
  "type": "object",
  "$defs": {
    "TokenPerformance": {
      "description": "Summary of a token's performance.",
      "properties": {
        "mintAddress": {
          "description": "The address of mint.",
          "type": "string"
        },
        "pnlUsd": {
          "description": "The profit or loss for the token in USD.",
          "format": "double",
          "type": "number"
        },
        "tokenLogoUrl": {
          "description": "The logo URL of token (if any).",
          "type": [
            "string",
            "null"
          ]
        },
        "tokenName": {
          "description": "The name of token (if any).",
          "type": [
            "string",
            "null"
          ]
        },
        "tokenSymbol": {
          "description": "The symbol of token.",
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "mintAddress",
        "pnlUsd"
      ],
      "type": "object"
    }
  }
}