---
updatedAt: 2025-06-25T21:53:53.000Z
agentTools:
  projectIndex: https://docs.nftgo.io/llms.txt
---

# Get metrics by NFT

Return NFT metrics given the nft contract address and token id.

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "egg-swagger",
    "description": "swagger-ui for egg",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://data-api.nftgo.io"
    }
  ],
  "tags": [
    {
      "name": "NFT",
      "description": ""
    }
  ],
  "paths": {
    "/eth/v2/nft/{contract_address}/{token_id}/metrics": {
      "get": {
        "tags": [
          "NFT"
        ],
        "summary": "Get metrics by NFT ",
        "description": "Return NFT metrics given the nft contract address and token id. ",
        "operationId": "eth_v2_nft_{contract_address}_{token_id}_metrics",
        "parameters": [
          {
            "name": "contract_address",
            "in": "path",
            "description": "Address of the NFT contract ",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d"
          },
          {
            "name": "token_id",
            "in": "path",
            "description": "The token ID for this NFT. Each item in an NFT collection will be assigned a unique id. ",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "4096"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response ",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetMetricsByNftResponse"
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "price_metrics": {
        "required": [
          "7d",
          "all"
        ],
        "type": "object",
        "properties": {
          "7d": {
            "type": "number",
            "description": "Average sale price over 7 days",
            "example": 100
          },
          "all": {
            "type": "number",
            "description": "Average sale price over all time",
            "example": 100
          }
        }
      },
      "sale": {
        "required": [
          "price",
          "time",
          "tx_hash",
          "tx_url"
        ],
        "type": "object",
        "properties": {
          "tx_hash": {
            "type": "string",
            "description": "Transaction Hash",
            "example": "0x8443c7fd50cecbfac1e5a330fed8e53ee8e611c6029dcbd6097ca729c9360328"
          },
          "tx_url": {
            "type": "string",
            "description": "Transaction url",
            "example": "https://etherscan.io/tx/0x8443c7fd50cecbfac1e5a330fed8e53ee8e611c6029dcbd6097ca729c9360328"
          },
          "time": {
            "type": "number",
            "description": "Transaction timestamp in seconds",
            "example": 1652571359
          },
          "price": {
            "$ref": "#/components/schemas/price"
          }
        }
      },
      "past_owner": {
        "required": [
          "address",
          "holding_time"
        ],
        "type": "object",
        "properties": {
          "address": {
            "type": "string",
            "description": "Ethereum Address",
            "example": "0x6e185658442ab2a27f86402fc36b379c8ffc76f8"
          },
          "holding_time": {
            "type": "number",
            "description": "Holding time is calculated as the difference between the time an item is bought and sold in seconds. For example, if the NFT is sold at 2022-04-19 14:00 and bought at 2022-04-19 13:00 holding time is 3600",
            "example": 32588789
          }
        }
      },
      "GetMetricsByNftResponse": {
        "required": [
          "avg_price_usd",
          "create_time",
          "last_price",
          "longest_holding_time",
          "max_price",
          "min_price",
          "outstanding_royalty_income",
          "past_owners",
          "royalty_income",
          "sale_num_7d",
          "sale_num_all",
          "start_holding_time",
          "theoretical_maximum_royalty_income"
        ],
        "type": "object",
        "properties": {
          "sale_num_7d": {
            "type": "number",
            "description": "Total number of sales in the last 7 days",
            "example": 0
          },
          "sale_num_all": {
            "type": "number",
            "description": "Total number of all-time sales",
            "example": 4
          },
          "max_price": {
            "$ref": "#/components/schemas/sale"
          },
          "min_price": {
            "$ref": "#/components/schemas/sale"
          },
          "last_price": {
            "$ref": "#/components/schemas/sale"
          },
          "avg_price_usd": {
            "$ref": "#/components/schemas/price_metrics"
          },
          "royalty_income": {
            "$ref": "#/components/schemas/eth_usd_value"
          },
          "theoretical_maximum_royalty_income": {
            "$ref": "#/components/schemas/eth_usd_value"
          },
          "outstanding_royalty_income": {
            "$ref": "#/components/schemas/eth_usd_value"
          },
          "past_owners": {
            "type": "array",
            "description": "The list of past owners of this NFT, order by holding time in descending order, 10 items at most",
            "items": {
              "$ref": "#/components/schemas/past_owner"
            }
          },
          "create_time": {
            "type": "number",
            "description": "Date and time this NFT was first minted (UTC in seconds).",
            "example": 1619854595
          },
          "start_holding_time": {
            "type": "number",
            "description": "Date and time the current owner acquired the NFT (UTC in seconds).",
            "example": 1652571964
          },
          "longest_holding_time": {
            "type": "number",
            "description": "The longest time this NFT was held across all previous owners",
            "example": 47554902
          }
        }
      },
      "price": {
        "required": [
          "payment_token",
          "raw_value",
          "usd",
          "value"
        ],
        "type": "object",
        "properties": {
          "value": {
            "type": "number",
            "description": "Total value in the measure of {payment_token.symbol}",
            "example": 98.5
          },
          "raw_value": {
            "type": "string",
            "description": "Quantity of the payment_token.",
            "example": "98500000000000000000"
          },
          "usd": {
            "type": "number",
            "description": "The equivalent payment in dollars, calculated based on the exchange rate at the time of the transaction",
            "example": 202001.28197466402
          },
          "payment_token": {
            "$ref": "#/components/schemas/payment_token"
          }
        }
      },
      "payment_token": {
        "required": [
          "address",
          "decimals",
          "symbol"
        ],
        "type": "object",
        "properties": {
          "symbol": {
            "type": "string",
            "description": "The symbol of the token used for payment",
            "example": "ETH"
          },
          "address": {
            "type": "string",
            "description": "The address of the token used for payment",
            "example": "0x0000000000000000000000000000000000000000"
          },
          "decimals": {
            "type": "number",
            "description": "The decimals of the token used for payment",
            "example": 18
          }
        }
      },
      "eth_usd_value": {
        "required": [
          "eth",
          "usd"
        ],
        "type": "object",
        "properties": {
          "eth": {
            "type": "number",
            "description": "The value of ETH.",
            "example": 100
          },
          "usd": {
            "type": "number",
            "description": "The value of USD.",
            "example": 100
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    }
  },
  "x-original-swagger-version": "2.0",
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ]
}
```