Skip to main content
Glama

Calculating token performance

wallet_pnl_for_token
Read-only

Get PnL stats for a specific token traded by the input address during a specific date range. Use this tool for analysing the performance of the wallet for the specific token over a time period.

Chain: pass 'hyperliquid' for a perp coin — there tokenAddress is the perp SYMBOL (e.g. 'BTC', 'HYPE', 'xyz:CL'), not a contract address. Every other chain expects a token contract address.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / request / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "description": "Complete request for wallet PnL for token (flattened).",
      -    "properties": {
      -      "chain": {
      -        "default": "evm",
      -        "description": "Blockchain to query. Use 'hyperliquid' for a Hyperliquid perp coin — then tokenAddress is the perp SYMBOL (e.g. 'BTC', 'HYPE', 'xyz:CL'), not a contract address, and the wallet must be an EVM address. Every other chain expects a token contract address.",
      -        "type": "string"
      -      },
      -      "dateRange": {
      -        "description": "Date range for PnL analysis",
      -        "properties": {
      -          "from": {
      -            "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -            "type": "string"
      -          },
      -          "to": {
      -            "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "from",
      -          "to"
      -        ],
      -        "type": "object"
      -      },
      -      "showRealized": {
      -        "description": "Set to true for realized PnL (completed/closed trades), false for current position analysis (unrealized PnL + active holdings). Ignored on chain='hyperliquid', which always reports both.",
      -        "type": "boolean"
      -      },
      -      "tokenAddress": {
      -        "description": "Token address to generate PnL stats for",
      -        "type": "string"
      -      },
      -      "walletAddress": {
      -        "description": "The wallet address to analyze",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "walletAddress",
      -      "tokenAddress",
      -      "dateRange",
      -      "showRealized"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "description": "Complete request for wallet PnL for token (flattened).",
      +    "properties": {
      +      "chain": {
      +        "default": "evm",
      +        "description": "Blockchain to query. Use 'hyperliquid' for a Hyperliquid perp coin — then tokenAddress is the perp SYMBOL (e.g. 'BTC', 'HYPE', 'xyz:CL'), not a contract address, and the wallet must be an EVM address. Every other chain expects a token contract address.",
      +        "type": "string"
      +      },
      +      "dateRange": {
      +        "description": "Date range for PnL analysis",
      +        "properties": {
      +          "from": {
      +            "description": "Start token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps; dates and calendar tokens start at midnight.",
      +            "type": "string"
      +          },
      +          "to": {
      +            "description": "End token or date (YYYY-MM-DD or ___-MM-DD). Durations use exact rolling UTC timestamps without an extra day. Dates and calendar tokens include the final date; TODAY_START stays at midnight.",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to"
      +        ],
      +        "type": "object"
      +      },
      +      "showRealized": {
      +        "description": "Set to true for realized PnL (completed/closed trades), false for current position analysis (unrealized PnL + active holdings). Ignored on chain='hyperliquid', which always reports both.",
      +        "type": "boolean"
      +      },
      +      "tokenAddress": {
      +        "description": "Token address to generate PnL stats for",
      +        "type": "string"
      +      },
      +      "walletAddress": {
      +        "description": "The wallet address to analyze",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "walletAddress",
      +      "tokenAddress",
      +      "dateRange",
      +      "showRealized"
      +    ],
      +    "type": "object"
      +  }
      +]
  2. Changed1 schema field changed
    • changedInput schema / properties / request / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "description": "Complete request for wallet PnL for token (flattened).",
      -    "properties": {
      -      "chain": {
      -        "default": "evm",
      -        "type": "string"
      -      },
      -      "dateRange": {
      -        "description": "Date range for PnL analysis",
      -        "properties": {
      -          "from": {
      -            "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -            "type": "string"
      -          },
      -          "to": {
      -            "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -            "type": "string"
      -          }
      -        },
      -        "required": [
      -          "from",
      -          "to"
      -        ],
      -        "type": "object"
      -      },
      -      "showRealized": {
      -        "description": "Set to true for realized PnL (completed/closed trades), false for current position analysis (unrealized PnL + active holdings)",
      -        "type": "boolean"
      -      },
      -      "tokenAddress": {
      -        "description": "Token address to generate PnL stats for",
      -        "type": "string"
      -      },
      -      "walletAddress": {
      -        "description": "The wallet address to analyze",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "walletAddress",
      -      "tokenAddress",
      -      "dateRange",
      -      "showRealized"
      -    ],
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "description": "Complete request for wallet PnL for token (flattened).",
      +    "properties": {
      +      "chain": {
      +        "default": "evm",
      +        "description": "Blockchain to query. Use 'hyperliquid' for a Hyperliquid perp coin — then tokenAddress is the perp SYMBOL (e.g. 'BTC', 'HYPE', 'xyz:CL'), not a contract address, and the wallet must be an EVM address. Every other chain expects a token contract address.",
      +        "type": "string"
      +      },
      +      "dateRange": {
      +        "description": "Date range for PnL analysis",
      +        "properties": {
      +          "from": {
      +            "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      +            "type": "string"
      +          },
      +          "to": {
      +            "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to"
      +        ],
      +        "type": "object"
      +      },
      +      "showRealized": {
      +        "description": "Set to true for realized PnL (completed/closed trades), false for current position analysis (unrealized PnL + active holdings). Ignored on chain='hyperliquid', which always reports both.",
      +        "type": "boolean"
      +      },
      +      "tokenAddress": {
      +        "description": "Token address to generate PnL stats for",
      +        "type": "string"
      +      },
      +      "walletAddress": {
      +        "description": "The wallet address to analyze",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "walletAddress",
      +      "tokenAddress",
      +      "dateRange",
      +      "showRealized"
      +    ],
      +    "type": "object"
      +  }
      +]
  3. Changed3 schema fields changed
    • removedInput schema / $defs
      Removed value: -{
      -  "DateRange": {
      -    "description": "Date range via tokens or dates.\nTokens: NOW, XMIN_AGO, XD_AGO, XH_AGO; THIS_YEAR_START, THIS_QUARTER_START, THIS_MONTH_START, THIS_WEEK_START, TODAY_START; LAST_WEEK_START/END, LAST_MONTH_START/END, LAST_QUARTER_START/END, LAST_YEAR_START/END.\nWeek starts Monday. Quarters are calendar. Dates: YYYY-MM-DD or ___-MM-DD (year omitted).\nPlease check detailed system instructions for more information.",
      -    "properties": {
      -      "from": {
      -        "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -        "type": "string"
      -      },
      -      "to": {
      -        "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "from",
      -      "to"
      -    ],
      -    "type": "object"
      -  },
      -  "WalletPnlForTokenRequest": {
      -    "description": "Complete request for wallet PnL for token (flattened).",
      -    "properties": {
      -      "chain": {
      -        "default": "evm",
      -        "type": "string"
      -      },
      -      "dateRange": {
      -        "$ref": "#/$defs/DateRange",
      -        "description": "Date range for PnL analysis"
      -      },
      -      "showRealized": {
      -        "description": "Set to true for realized PnL (completed/closed trades), false for current position analysis (unrealized PnL + active holdings)",
      -        "type": "boolean"
      -      },
      -      "tokenAddress": {
      -        "description": "Token address to generate PnL stats for",
      -        "type": "string"
      -      },
      -      "walletAddress": {
      -        "description": "The wallet address to analyze",
      -        "type": "string"
      -      }
      -    },
      -    "required": [
      -      "walletAddress",
      -      "tokenAddress",
      -      "dateRange",
      -      "showRealized"
      -    ],
      -    "type": "object"
      -  }
      -}
    • addedInput schema / additionalProperties
      Added value: +false
    • changedInput schema / properties / request / anyOf
      Previous value: -[
      -  {
      -    "additionalProperties": true,
      -    "type": "object"
      -  },
      -  {
      -    "$ref": "#/$defs/WalletPnlForTokenRequest"
      -  }
      -]New value: +[
      +  {
      +    "additionalProperties": true,
      +    "type": "object"
      +  },
      +  {
      +    "description": "Complete request for wallet PnL for token (flattened).",
      +    "properties": {
      +      "chain": {
      +        "default": "evm",
      +        "type": "string"
      +      },
      +      "dateRange": {
      +        "description": "Date range for PnL analysis",
      +        "properties": {
      +          "from": {
      +            "description": "Start value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      +            "type": "string"
      +          },
      +          "to": {
      +            "description": "End value: token (see above) or date (YYYY-MM-DD or ___-MM-DD).",
      +            "type": "string"
      +          }
      +        },
      +        "required": [
      +          "from",
      +          "to"
      +        ],
      +        "type": "object"
      +      },
      +      "showRealized": {
      +        "description": "Set to true for realized PnL (completed/closed trades), false for current position analysis (unrealized PnL + active holdings)",
      +        "type": "boolean"
      +      },
      +      "tokenAddress": {
      +        "description": "Token address to generate PnL stats for",
      +        "type": "string"
      +      },
      +      "walletAddress": {
      +        "description": "The wallet address to analyze",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "walletAddress",
      +      "tokenAddress",
      +      "dateRange",
      +      "showRealized"
      +    ],
      +    "type": "object"
      +  }
      +]
  4. First observed

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources