Pendle · Schema

PnLTransactionEntity

Web3DeFiYield TokenizationCryptoPrincipal TokensYield TokensAMMLiquidity Pools

Properties

Name Type Description
chainId number Chain ID where the transaction occurred
market string LP market contract address
user string User wallet address
timestamp string Block timestamp of the transaction
action string Type of Pendle operation performed (swap, liquidity, limit order, mint/redeem, transfer, or reward claim)
ptData object PT token balance change and cost basis for this transaction
ytData object YT token balance change and cost basis for this transaction
lpData object LP token balance change and cost basis for this transaction
priceInAsset object Prices of PT, YT, and LP in the market's accounting asset at the time of the transaction
profit object Profit or loss of the transaction
txValueAsset number Total value of the transaction in asset
assetUsd number Market asset price in USD
assetEth number Market asset price in ETH
ptExchangeRate number PT exchange rate at the time of the transaction
effectivePtExchangeRate number Effective PT exchange rate of this transaction
ptExchangeRateAfter number PT exchange rate of market after the transaction
txHash string Transaction hash
View JSON Schema on GitHub

JSON Schema

PnLTransactionEntity.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "PnLTransactionEntity",
  "type": "object",
  "properties": {
    "chainId": {
      "type": "number",
      "description": "Chain ID where the transaction occurred"
    },
    "market": {
      "type": "string",
      "description": "LP market contract address"
    },
    "user": {
      "type": "string",
      "description": "User wallet address"
    },
    "timestamp": {
      "format": "date-time",
      "type": "string",
      "description": "Block timestamp of the transaction"
    },
    "action": {
      "type": "string",
      "enum": [
        "addLiquidityDualTokenAndPt",
        "addLiquiditySinglePt",
        "addLiquiditySingleToken",
        "addLiquiditySingleTokenKeepYt",
        "removeLiquidityDualTokenAndPt",
        "removeLiquidityToPt",
        "removeLiquiditySingleToken",
        "mintPy",
        "redeemPy",
        "swapYtToPt",
        "swapPtToYt",
        "redeemYtRewards",
        "redeemYtYield",
        "redeemMarketRewards",
        "buyPt",
        "sellPt",
        "transferPtIn",
        "transferPtOut",
        "buyYt",
        "sellYt",
        "transferYtIn",
        "transferYtOut",
        "transferLpIn",
        "transferLpOut",
        "sellYtLimitOrder",
        "buyYtLimitOrder",
        "sellPtLimitOrder",
        "buyPtLimitOrder"
      ],
      "description": "Type of Pendle operation performed (swap, liquidity, limit order, mint/redeem, transfer, or reward claim)"
    },
    "ptData": {
      "description": "PT token balance change and cost basis for this transaction",
      "allOf": [
        {
          "$ref": "#/components/schemas/SpendUnitData"
        }
      ]
    },
    "ytData": {
      "description": "YT token balance change and cost basis for this transaction",
      "allOf": [
        {
          "$ref": "#/components/schemas/SpendUnitData"
        }
      ]
    },
    "lpData": {
      "description": "LP token balance change and cost basis for this transaction",
      "allOf": [
        {
          "$ref": "#/components/schemas/SpendUnitData"
        }
      ]
    },
    "priceInAsset": {
      "description": "Prices of PT, YT, and LP in the market's accounting asset at the time of the transaction",
      "allOf": [
        {
          "$ref": "#/components/schemas/PriceAssetData"
        }
      ]
    },
    "profit": {
      "description": "Profit or loss of the transaction",
      "allOf": [
        {
          "$ref": "#/components/schemas/ValuationEntity"
        }
      ]
    },
    "txValueAsset": {
      "type": "number",
      "description": "Total value of the transaction in asset"
    },
    "assetUsd": {
      "type": "number",
      "description": "Market asset price in USD"
    },
    "assetEth": {
      "type": "number",
      "description": "Market asset price in ETH"
    },
    "ptExchangeRate": {
      "type": "number",
      "description": "PT exchange rate at the time of the transaction"
    },
    "effectivePtExchangeRate": {
      "type": "number",
      "description": "Effective PT exchange rate of this transaction"
    },
    "ptExchangeRateAfter": {
      "type": "number",
      "description": "PT exchange rate of market after the transaction"
    },
    "txHash": {
      "type": "string",
      "description": "Transaction hash"
    }
  },
  "required": [
    "chainId",
    "market",
    "user",
    "timestamp",
    "action",
    "ptData",
    "ytData",
    "lpData",
    "priceInAsset",
    "profit",
    "txValueAsset",
    "assetUsd",
    "assetEth",
    "ptExchangeRate"
  ]
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/PnLTransactionEntity"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.