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

# Get item sales graph

> Returns historical sales data for charting, aggregated from `items_stats`. For periods `5Y` and `ALL`, data is grouped by week instead of by day.

**Permission:** Connected + API.



## OpenAPI

````yaml /openapi.json get /item/salesGraph/{item}
openapi: 3.1.0
info:
  title: Mannco.store API
  description: >-
    Complete API documentation for Mannco.store - Buy and sell TF2, CS:GO, Dota
    2, Rust and Steam community items. All routes use the `api` filter. Every
    endpoint requires an `Authorization: Bearer <jwt>` token obtained from POST
    /user/login. The only exception is the login endpoint itself, which is used
    to obtain the token.
  version: 1.0.0
servers:
  - url: https://api.mannco.store
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Auth
    description: Authentication and login
  - name: Items
    description: Item details, listings, pricing, and sales graphs
  - name: Offers
    description: Create, manage, and respond to trade offers
  - name: Buy Orders
    description: Create, update, and manage buy orders
  - name: Payment
    description: Checkout sessions for balance and cart payments
  - name: Inventory
    description: 'Manage user inventory: list, price, and withdraw'
  - name: Cart
    description: Manage the shopping cart
  - name: Listing
    description: Deposit Steam items and instant sell
  - name: Trading
    description: Active and historical trades
  - name: User Account
    description: Account, balance, sessions, and history
paths:
  /item/salesGraph/{item}:
    get:
      tags:
        - Items
      summary: Get item sales graph
      description: >-
        Returns historical sales data for charting, aggregated from
        `items_stats`. For periods `5Y` and `ALL`, data is grouped by week
        instead of by day.


        **Permission:** Connected + API.
      operationId: getItemSalesGraph
      parameters:
        - $ref: '#/components/parameters/ItemPathParam'
        - name: period
          in: query
          required: true
          description: 'Time period: 1M, 3M, 6M, 1Y, 5Y, or ALL'
          schema:
            type: string
            enum:
              - 1M
              - 3M
              - 6M
              - 1Y
              - 5Y
              - ALL
      responses:
        '200':
          description: Sales data
          content:
            application/json:
              examples:
                daily:
                  summary: Daily data (1M, 3M, 6M, 1Y)
                  value:
                    err: false
                    success: true
                    content:
                      values:
                        - date: '2025-01-15 00:00:00'
                          price: 50000
                          nb: 3
                weekly:
                  summary: Weekly data (5Y, ALL)
                  value:
                    err: false
                    success: true
                    content:
                      values:
                        - first_date: '2025-01-13'
                          week: '202502'
                          total_price: 150000
                          total_nb: 8
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
components:
  parameters:
    ItemPathParam:
      name: item
      in: path
      required: true
      description: Item identifier (numeric ID or URL slug).
      schema:
        type: string
  schemas:
    ApiError:
      type: object
      description: >-
        Standard Mannco.store response envelope. `err` and `success` flag the
        outcome; the payload (or error message) is always under `content`.
      required:
        - err
        - success
      properties:
        err:
          type: boolean
          description: True when the request failed.
        success:
          type: boolean
          description: True when the request succeeded.
        content:
          description: Payload on success, or an error message/object on failure.
  responses:
    Forbidden:
      description: >-
        Forbidden. Missing/invalid JWT, blocked country, or insufficient
        permissions.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            err: true
            success: false
            content: forbidden
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            err: true
            success: false
            content: Not found
    ServerError:
      description: Internal server error.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiError'
          example:
            err: true
            success: false
            content: Internal server error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT obtained from POST /user/login

````