> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kicks.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Get sales history from StockX

> How to get the sales history of a product from StockX using KicksDB

In order to get the sales history of a product, you need to know the ID or slug of the product. Follow the [Get a product from StockX recipe](/recipes/stockx-get-product) to get the ID or slug of the product.

<Columns cols={2}>
  <Card href="#get-product-sales-history" title="Get product sales history" icon="chart-line">
    Get the sales history of the product
  </Card>

  <Card href="#getting-daily-sales-history" title="Getting daily sales history" icon="calendar">
    Get the daily aggregated sales history of the product
  </Card>
</Columns>

<div className="flex flex-wrap items-baseline gap-x-2">
  <h2>
    Get product sales history
  </h2>

  <a href="https://api.kicks.dev/docs#tag/stockx/get/v3stockxproductsidsales" target="_blank" class="border-0">
    <Badge icon="info" color="green">
      API Reference
    </Badge>
  </a>

  <Badge icon="lock" color="orange">
    Premium Feature
  </Badge>
</div>

The following endpoint returns the sales history of the product, including the sale price, date and variant sold.

```http theme={null}
GET https://api.kicks.dev/v3/stockx/products/[ID_or_SLUG]/sales
```

Response example:

```json theme={null}
{
  "$schema": "https://api.kicks.dev/schemas/RespListVariantSaleBody.json",
  "data": [
    {
      "product_id": "fb1a8a7d-5be4-4f0e-a4b5-bf0a735ab7fe",
      "variant_id": "3763432c-8ea7-43e7-a4fe-744c0ad89797",
      "amount": 247,
      "created_at": "2025-12-07T09:10:19Z"
    },
    {
      "product_id": "fb1a8a7d-5be4-4f0e-a4b5-bf0a735ab7fe",
      "variant_id": "7f3c7ac8-82d8-4da6-ac04-abf099f1ee0b",
      "amount": 350,
      "created_at": "2025-12-07T08:59:44Z"
    }
    // ... more sales ...
  ]
}
```

## Additional parameters

### Getting sales history by variant

You can add the `variant_id` parameter to get the sales history of a specific variant, like this:

```http theme={null}
GET https://api.kicks.dev/v3/stockx/products/[ID_or_SLUG]/sales?variant_id=[VARIANT_ID]
```

Response example:

```json theme={null}
{
  "$schema": "https://api.kicks.dev/schemas/RespListVariantSaleBody.json",
  "data": [
    {
      "product_id": "fb1a8a7d-5be4-4f0e-a4b5-bf0a735ab7fe",
      "variant_id": "3763432c-8ea7-43e7-a4fe-744c0ad89797",
      "amount": 247,
      "created_at": "2025-12-07T09:10:19Z"
    },
    {
      "product_id": "fb1a8a7d-5be4-4f0e-a4b5-bf0a735ab7fe",
      "variant_id": "3763432c-8ea7-43e7-a4fe-744c0ad89797",
      "amount": 353,
      "created_at": "2025-12-07T02:59:45Z"
    }
    // ... more sales ...
  ]
}
```

<div className="flex flex-wrap items-baseline gap-x-2">
  <h2>Getting daily sales history</h2>

  <a href="https://api.kicks.dev/docs#tag/stockx/get/v3stockxproductsidsalesdaily" target="_blank" class="border-0">
    <Badge icon="info" color="green">
      API Reference
    </Badge>
  </a>

  <Badge icon="lock" color="orange">
    Premium Feature
  </Badge>
</div>

You can use the `/daily` endpoint to get the daily aggregated sales history of the product, like this:

```http theme={null}
GET https://api.kicks.dev/v3/stockx/products/[ID_or_SLUG]/sales/daily
```

Response example:

```json theme={null}
{
  "$schema": "https://api.kicks.dev/schemas/RespListProductSaleBody.json",
  "data": [
    {
      "product_id": "fb1a8a7d-5be4-4f0e-a4b5-bf0a735ab7fe",
      "avg_amount": 261.9866666666667,
      "orders": 75,
      "date": "2025-12-07T00:00:00Z"
    },
    {
      "product_id": "fb1a8a7d-5be4-4f0e-a4b5-bf0a735ab7fe",
      "avg_amount": 257.63013698630135,
      "orders": 292,
      "date": "2025-12-06T00:00:00Z"
    },
    {
      "product_id": "fb1a8a7d-5be4-4f0e-a4b5-bf0a735ab7fe",
      "avg_amount": 249.17842323651453,
      "orders": 241,
      "date": "2025-12-05T00:00:00Z"
    }
    // ... more daily sales ...
  ]
}
```
