# Get CS2 Index history (/api-reference/cs2/market/get-market-index-history)

`GET /v1/cs2/market/index/history`

The CS2 Index's close each UTC day, for the whole market or one segment, oldest first. Costs 1 credit. Needs the Starter plan or above.

```json
{
  "servers": [
    {
      "url": "https://api.steambuff.app"
    }
  ],
  "paths": {
    "/v1/cs2/market/index/history": {
      "get": {
        "tags": [
          "CS2 market"
        ],
        "operationId": "get-market-index-history",
        "summary": "Get CS2 Index history",
        "description": "The CS2 Index's close each UTC day, for the whole market or one segment, oldest first.",
        "x-usage": {
          "credits": 1,
          "per": "call",
          "plan": "starter",
          "planName": "Starter"
        },
        "parameters": [
          {
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 730,
              "description": "The last this many UTC days, today included; without it, the whole history",
              "example": 30
            },
            "required": false,
            "description": "The last this many UTC days, today included; without it, the whole history",
            "name": "days",
            "in": "query"
          },
          {
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "knife",
                "gloves",
                "rifle",
                "sniper-rifle",
                "pistol",
                "sticker",
                "container"
              ],
              "default": "all",
              "description": "`all` for the whole market, or a segment, named as the `category` filter of `/v1/cs2/items` that holds the same items",
              "example": "knife"
            },
            "required": false,
            "description": "`all` for the whole market, or a segment, named as the `category` filter of `/v1/cs2/items` that holds the same items",
            "name": "segment",
            "in": "query"
          }
        ],
        "responses": {
          "200": {
            "description": "The index's daily closes",
            "headers": {
              "RateLimit-Policy": {
                "schema": {
                  "type": "string",
                  "description": "The plan's requests per minute (IETF RateLimit-Policy: `q` requests in `w` seconds)",
                  "example": "\"minute\";q=60;w=60"
                },
                "required": true,
                "description": "The plan's requests per minute (IETF RateLimit-Policy: `q` requests in `w` seconds)"
              },
              "RateLimit": {
                "schema": {
                  "type": "string",
                  "description": "Requests left this minute (`r`) and seconds until it resets (`t`)",
                  "example": "\"minute\";r=59;t=42"
                },
                "required": true,
                "description": "Requests left this minute (`r`) and seconds until it resets (`t`)"
              },
              "X-Credits-Limit": {
                "schema": {
                  "type": "integer",
                  "description": "The plan's monthly credits"
                },
                "required": true,
                "description": "The plan's monthly credits"
              },
              "X-Credits-Remaining": {
                "schema": {
                  "type": "integer",
                  "description": "Credits left in the current monthly window"
                },
                "required": true,
                "description": "Credits left in the current monthly window"
              },
              "X-Credits-Reset": {
                "schema": {
                  "type": "integer",
                  "description": "Seconds until the credits reset"
                },
                "required": true,
                "description": "Seconds until the credits reset"
              },
              "X-Credits-Cost": {
                "schema": {
                  "type": "integer",
                  "description": "Credits this request cost; 0 when it didn't succeed"
                },
                "required": true,
                "description": "Credits this request cost; 0 when it didn't succeed"
              }
            },
            "content": {
              "application/json": {
                "example": {
                  "data": [
                    {
                      "day": "2026-11-24",
                      "value": 10082,
                      "change": 0.31,
                      "items": 32951,
                      "compared": 28120,
                      "advancers": 12204,
                      "decliners": 10366
                    },
                    {
                      "day": "2026-11-25",
                      "value": 10098,
                      "change": 0.16,
                      "items": 32957,
                      "compared": 28403,
                      "advancers": 11980,
                      "decliners": 10914
                    },
                    {
                      "day": "2026-11-26",
                      "value": 10110,
                      "change": 0.12,
                      "items": 32960,
                      "compared": 28377,
                      "advancers": 11842,
                      "decliners": 10875
                    }
                  ]
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/MarketIndexDay"
                      }
                    }
                  },
                  "required": [
                    "data"
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The API key is missing, invalid or revoked",
            "content": {
              "application/json": {
                "examples": {
                  "API_KEY_MISSING": {
                    "summary": "No API key",
                    "value": {
                      "error": true,
                      "code": "API_KEY_MISSING",
                      "message": "Send your API key in the x-api-key header or as Authorization: Bearer <key>.",
                      "requestId": "3f2b8c1e-7a4d-4e9b-9c6f-1d2e3a4b5c6d"
                    }
                  },
                  "API_KEY_INVALID": {
                    "summary": "An invalid or revoked API key",
                    "value": {
                      "error": true,
                      "code": "API_KEY_INVALID",
                      "message": "The API key is invalid or has been revoked.",
                      "requestId": "3f2b8c1e-7a4d-4e9b-9c6f-1d2e3a4b5c6d"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "The plan does not include this endpoint",
            "content": {
              "application/json": {
                "example": {
                  "error": true,
                  "code": "PLAN_UPGRADE_REQUIRED",
                  "message": "The Free plan does not include the Price History API, which starts at the Starter plan.",
                  "requestId": "3f2b8c1e-7a4d-4e9b-9c6f-1d2e3a4b5c6d"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "422": {
            "description": "A parameter is invalid; `details` lists each failure",
            "content": {
              "application/json": {
                "example": {
                  "error": true,
                  "code": "VALIDATION_ERROR",
                  "message": "Request validation failed",
                  "details": [
                    {
                      "path": "segment",
                      "message": "Invalid option: expected one of \"all\"|\"knife\"|\"gloves\"|\"rifle\"|\"sniper-rifle\"|\"pistol\"|\"sticker\"|\"container\""
                    }
                  ],
                  "requestId": "3f2b8c1e-7a4d-4e9b-9c6f-1d2e3a4b5c6d"
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests this minute, or this month's credits are used up",
            "headers": {
              "RateLimit-Policy": {
                "schema": {
                  "type": "string",
                  "description": "The plan's requests per minute (IETF RateLimit-Policy: `q` requests in `w` seconds)",
                  "example": "\"minute\";q=60;w=60"
                },
                "required": true,
                "description": "The plan's requests per minute (IETF RateLimit-Policy: `q` requests in `w` seconds)"
              },
              "RateLimit": {
                "schema": {
                  "type": "string",
                  "description": "Requests left this minute (`r`) and seconds until it resets (`t`)",
                  "example": "\"minute\";r=59;t=42"
                },
                "required": true,
                "description": "Requests left this minute (`r`) and seconds until it resets (`t`)"
              },
              "Retry-After": {
                "schema": {
                  "type": "integer",
                  "description": "Seconds to wait before retrying"
                },
                "required": true,
                "description": "Seconds to wait before retrying"
              }
            },
            "content": {
              "application/json": {
                "examples": {
                  "RATE_LIMITED": {
                    "summary": "Too many requests this minute",
                    "value": {
                      "error": true,
                      "code": "RATE_LIMITED",
                      "message": "The Free plan allows 10 requests per minute.",
                      "requestId": "3f2b8c1e-7a4d-4e9b-9c6f-1d2e3a4b5c6d"
                    }
                  },
                  "MONTHLY_QUOTA_EXCEEDED": {
                    "summary": "This month's credits are used up",
                    "value": {
                      "error": true,
                      "code": "MONTHLY_QUOTA_EXCEEDED",
                      "message": "The Free plan's 1,000 monthly credits are used up. They reset at 2026-12-01T00:00:00.000Z. A bigger plan has more: https://steambuff.app/api.",
                      "requestId": "3f2b8c1e-7a4d-4e9b-9c6f-1d2e3a4b5c6d"
                    }
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "MarketIndexDay": {
        "type": "object",
        "properties": {
          "day": {
            "type": "string",
            "format": "date",
            "description": "UTC calendar day, YYYY-MM-DD"
          },
          "value": {
            "type": "integer",
            "description": "The index at that day's snapshot: its close, integer USD cents"
          },
          "change": {
            "type": [
              "number",
              "null"
            ],
            "description": "Percent move since the snapshot day before, over the items priced on both by as many marketplaces; null on the first day, and when a feed outage left under half of them to compare, when `value` holds"
          },
          "items": {
            "type": "integer",
            "description": "Items in the index that day"
          },
          "compared": {
            "type": "integer",
            "description": "Items `change` was taken over"
          },
          "advancers": {
            "type": "integer",
            "description": "Of those, how many rose"
          },
          "decliners": {
            "type": "integer",
            "description": "Of those, how many fell"
          }
        },
        "required": [
          "day",
          "value",
          "change",
          "items",
          "compared",
          "advancers",
          "decliners"
        ]
      },
      "ErrorResponse": {
        "type": "object",
        "properties": {
          "error": {
            "type": "boolean",
            "enum": [
              true
            ]
          },
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "details": {},
          "requestId": {
            "type": "string"
          }
        },
        "required": [
          "error",
          "code",
          "message"
        ]
      }
    }
  }
}
```