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

# Get sales chart by contract

Return collection sales chart over a time range given a contract address.

# OpenAPI definition

````json
{
  "openapi": "3.0.2",
  "info": {
    "title": "API Documentation | NFTGo",
    "description": "\nNote: You can find our listing criteria here: https://docs.nftgo.io/docs/listing-criteria\n\n# Introduction\n[NFTGo.io](https://nftgo.io/) is a data analytics platform for NFTs. We provide support for NFTs on the Ethereum blockchain. This API includes:\n* Support for metrics like Market Cap and Volume (globally and per-collection)\n* NFT metadata and price information\n* Access to the custom rarity model\n* Address and portfolio tracking\n* Collection transaction history\n* NFT and profit rankings\n* .. And much more!\n\n# Authentication\nTo start exploring the NFTGo API, you need to sign up for an API key [here](https://nftgo.io/data-api/).\nUsing your API key, you can make requests to the NFTGo API by sending the API key as a **header** in your request. Below is an example:\n```Bash\ncurl http://127.0.0.1:5001/<your-request-url> -H X-API-KEY:<YOUR-API-KEY>\n```\n\nAll requests should be prefixed with [http://127.0.0.1:5001/.](http://127.0.0.1:5001/)\n\n# Rate limits\nCurrently, we have a rate limit of 5 request per second (5RPS). If your project needs a specialized plan, you can contact us [here](https://docs.google.com/forms/d/e/1FAIpQLSdToHwUCisiDhNiW_UcVdRgjjLxLNt3fW1cruvZoPpxKxJuGQ/viewform).\n\n\n",
    "version": "1.1.0",
    "x-logo": {
      "url": "https://static.nftgo.io/nftgo-logo-with-text-light.svg"
    }
  },
  "servers": [
    {
      "url": "https://data-api.nftgo.io"
    }
  ],
  "paths": {
    "/eth/v1/chart/sales-chart/{contract_address}": {
      "get": {
        "tags": [
          "Chart"
        ],
        "summary": "Get sales chart by contract",
        "description": "Return collection sales chart over a time range given a contract address.",
        "operationId": "get_sales_chart_eth_v1_chart_sales_chart__contract_address__get",
        "parameters": [
          {
            "description": "Address of the contract for this NFT collection",
            "required": true,
            "schema": {
              "title": "Contract Address",
              "maxLength": 42,
              "minLength": 42,
              "pattern": "^0x[a-fA-F0-9]{40}$",
              "type": "string",
              "description": "Address of the contract for this NFT collection"
            },
            "example": "0xbc4ca0eda7647a8ab7c2061c2e118a18a936f13d",
            "name": "contract_address",
            "in": "path"
          },
          {
            "description": "Queries can be bounded by time range or start time/end time. If start time is chosen, time range parameter will be invalid. Start Time is the earliest timestamp to include, formatted as an UTC timestamp in seconds or ISO 8601 format date time string, such as 2022-08-20T00:00:00+00:00.",
            "required": false,
            "schema": {
              "title": "Start Time",
              "type": "string",
              "description": "Queries can be bounded by time range or start time/end time. If start time is chosen, time range parameter will be invalid. Start Time is the earliest timestamp to include, formatted as an UTC timestamp in seconds or ISO 8601 format date time string, such as 2022-08-20T00:00:00+00:00.",
              "format": "date-time"
            },
            "example": 1661007946,
            "name": "start_time",
            "in": "query"
          },
          {
            "description": "Where an End Time is specified, transaction queries will fetch all transactions up to but excluding the End Time, which is formatted as an UTC timestamp in seconds or ISO 8601 format date time string. The query window varies according to the plan.",
            "required": false,
            "schema": {
              "title": "End Time",
              "type": "string",
              "description": "Where an End Time is specified, transaction queries will fetch all transactions up to but excluding the End Time, which is formatted as an UTC timestamp in seconds or ISO 8601 format date time string. The query window varies according to the plan.",
              "format": "date-time"
            },
            "example": 1662007946,
            "name": "end_time",
            "in": "query"
          },
          {
            "description": "Time range from now",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/TimeSpanEnum"
                }
              ],
              "description": "Time range from now",
              "default": "24h"
            },
            "example": "24h",
            "name": "time_range",
            "in": "query"
          },
          {
            "description": "Unit, eg. ETH, USD",
            "required": false,
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/EthUsdEnum"
                }
              ],
              "description": "Unit, eg. ETH, USD",
              "default": "ETH"
            },
            "example": "ETH",
            "name": "unit",
            "in": "query"
          },
          {
            "description": "Whether excluding wash trading transactions",
            "required": false,
            "schema": {
              "title": "Exclude Wash Trading",
              "type": "boolean",
              "description": "Whether excluding wash trading transactions",
              "default": false
            },
            "example": false,
            "name": "exclude_wash_trading",
            "in": "query"
          },
          {
            "description": "Whether excluding outlier sales",
            "required": false,
            "schema": {
              "title": "Exclude Outliers",
              "type": "boolean",
              "description": "Whether excluding outlier sales",
              "default": false
            },
            "example": false,
            "name": "exclude_outliers",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SalesChart"
                }
              }
            }
          },
          "400": {
            "description": "Bad request"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EthUsdEnum": {
        "title": "EthUsdEnum",
        "enum": [
          "ETH",
          "USD"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "HTTPValidationError": {
        "title": "HTTPValidationError",
        "type": "object",
        "properties": {
          "detail": {
            "title": "Detail",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            }
          }
        }
      },
      "SalesChart": {
        "title": "SalesChart",
        "required": [
          "last_updated",
          "x",
          "y",
          "total",
          "details"
        ],
        "type": "object",
        "properties": {
          "last_updated": {
            "title": "Last Updated",
            "type": "integer",
            "description": "Last updated timestamp in seconds",
            "example": 1652598929
          },
          "x": {
            "title": "X",
            "type": "array",
            "items": {
              "type": "integer"
            },
            "description": "List of timestamps in seconds",
            "example": [
              1631836800,
              1632096000,
              1632355200,
              1632614400,
              1632873600,
              1633132800,
              1633392000
            ]
          },
          "y": {
            "title": "Y",
            "type": "array",
            "items": {
              "type": "number"
            },
            "description": "Collection sales chart at each timestamp"
          },
          "total": {
            "title": "Total",
            "type": "integer",
            "description": "Total number of sales scatter point"
          },
          "details": {
            "title": "Details",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SalesDetail"
            }
          }
        },
        "description": "如果 Model 的数据存在有效期， 则它应该继承 LastUpdatedModel"
      },
      "SalesDetail": {
        "title": "SalesDetail",
        "required": [
          "token_id",
          "seller_address",
          "buyer_address"
        ],
        "type": "object",
        "properties": {
          "token_id": {
            "title": "Token Id",
            "type": "string",
            "description": "The token id of the transfer NFT"
          },
          "seller_address": {
            "title": "Seller Address",
            "type": "string",
            "description": "The seller address of the NFT"
          },
          "buyer_address": {
            "title": "Buyer Address",
            "type": "string",
            "description": "The buyer address of the NFT"
          }
        }
      },
      "TimeSpanEnum": {
        "title": "TimeSpanEnum",
        "enum": [
          "15m",
          "1h",
          "4h",
          "12h",
          "24h",
          "3d",
          "7d",
          "14d",
          "30d",
          "2M",
          "3M",
          "6M",
          "1y",
          "all"
        ],
        "type": "string",
        "description": "An enumeration."
      },
      "ValidationError": {
        "title": "ValidationError",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "type": "object",
        "properties": {
          "loc": {
            "title": "Location",
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            }
          },
          "msg": {
            "title": "Message",
            "type": "string"
          },
          "type": {
            "title": "Error Type",
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ]
}
````