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

# Public Sales Trends (Aggregate)

> Aggregated time series of completed token sales (`ICO`, `IDO`, `IEO`). Each bucket includes total raised in USD and sales count by type.<br/><br/>Available from&#58; <Badge color="green">Advanced</Badge><br/>Cost&#58; <Badge color="surface">1 credit per request</Badge>



## OpenAPI

````yaml https://api.cryptorank.io/v3/documentation-json get /v3/public-sales/trends
openapi: 3.0.0
info:
  title: Cryptorank API V3
  description: >
    # Overview


    Cryptorank Public API v3 — comprehensive cryptocurrency data for B2B clients
    and partners.


    Useful Links:

    - [API Plans](https://cryptorank.io/public-api)

    - [Dashboard](https://cryptorank.io/public-api/dashboard)


    # Getting Started


    Primary Server URL:
    [https://api.cryptorank.io/v3/](https://api.cryptorank.io/v3/)


    **Authentication**


    Generate an API key in the
    [dashboard](https://cryptorank.io/public-api/dashboard) and pass it in the
    `X-Api-Key` header.


    Keep your keys secret — never commit them to public repositories or expose
    them in client-side code.
  version: 3.0.0
  contact:
    name: Cryptorank Team
    url: https://cryptorank.io
    email: info@cryptorank.io
servers:
  - url: https://api.cryptorank.io
security: []
tags: []
paths:
  /v3/public-sales/trends:
    get:
      tags:
        - Public Sales
      summary: Public Sales Trends (Aggregate)
      description: >-
        **Description**


        Aggregated time series of completed token sales (`ICO`, `IDO`, `IEO`).
        Each bucket includes total raised in USD and sales count by type.


        **Access**

        - Available from: **Advanced**

        - Cost: 1 credit per request
      operationId: PublicSalesController_getTrends
      parameters:
        - name: interval
          required: true
          in: query
          description: >-
            Bucket size for aggregation: `1d` — daily, `1w` — weekly (ISO week),
            `1m` — monthly.
          schema:
            example: 1m
            type: string
            enum:
              - 1d
              - 1w
              - 1m
        - name: from
          required: true
          in: query
          description: >-
            Sale-date window start (inclusive). Accepts ISO 8601 string or Unix
            timestamp (sec/ms).
          schema:
            example: '2024-01-01T00:00:00.000Z'
            type: string
        - name: to
          required: false
          in: query
          description: >-
            Sale-date window end (inclusive). Accepts ISO 8601 string or Unix
            timestamp (sec/ms). Bare `YYYY-MM-DD` is coerced to end-of-day UTC.
            Defaults to now.
          schema:
            example: '2024-12-31T23:59:59.999Z'
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - status
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/PublicSalesTrendPointDto'
                  status:
                    $ref: '#/components/schemas/ResponseStatusDto'
        '400':
          description: Request validation failed
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - status
                    properties:
                      code:
                        type: string
                        enum:
                          - VALIDATION_ERROR
                        example: VALIDATION_ERROR
                      message:
                        type: string
                        example: Validation failed
                      status:
                        type: number
                        example: 400
        '401':
          description: API key is missing or invalid
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - status
                    properties:
                      code:
                        type: string
                        enum:
                          - API_KEY_MISSING
                          - API_KEY_INVALID
                        example: API_KEY_MISSING
                      message:
                        type: string
                        example: API key is missing
                      status:
                        type: number
                        example: 401
        '403':
          description: >-
            No active subscription, the endpoint is not available in your plan,
            or the request goes beyond what your plan allows
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - status
                    properties:
                      code:
                        type: string
                        enum:
                          - NO_ACTIVE_SUBSCRIPTION
                          - ENDPOINT_NOT_AVAILABLE
                          - PLAN_LIMIT_EXCEEDED
                        example: NO_ACTIVE_SUBSCRIPTION
                      message:
                        type: string
                        example: No active subscription found
                      status:
                        type: number
                        example: 403
        '429':
          description: Rate limit or credit limit exceeded
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - status
                    properties:
                      code:
                        type: string
                        enum:
                          - RATE_LIMIT_EXCEEDED
                          - DAILY_CREDITS_EXCEEDED
                          - MONTHLY_CREDITS_EXCEEDED
                        example: RATE_LIMIT_EXCEEDED
                      message:
                        type: string
                        example: Rate limit exceeded
                      status:
                        type: number
                        example: 429
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - status
                    properties:
                      code:
                        type: string
                        enum:
                          - INTERNAL_ERROR
                        example: INTERNAL_ERROR
                      message:
                        type: string
                        example: Internal server error
                      status:
                        type: number
                        example: 500
      security:
        - X-Api-Key: []
components:
  schemas:
    PublicSalesTrendPointDto:
      type: object
      properties:
        date:
          type: string
          example: '2024-08-01T00:00:00.000Z'
          description: >-
            Bucket start (ISO 8601 UTC). For `1w` the bucket starts on Monday;
            for `1m` on the 1st.
        totalRaised:
          type: string
          example: '125000000'
          description: >-
            Sum of `raised` (USD) across all sales in the bucket with disclosed
            raise.
        salesCount:
          type: number
          example: 42
          description: Number of sales in the bucket with disclosed `raised` amount.
        icoCount:
          type: number
          example: 8
          description: Number of `ICO` sales in the bucket with disclosed `raised` amount.
        idoCount:
          type: number
          example: 28
          description: Number of `IDO` sales in the bucket with disclosed `raised` amount.
        ieoCount:
          type: number
          example: 6
          description: Number of `IEO` sales in the bucket with disclosed `raised` amount.
      required:
        - date
        - totalRaised
        - salesCount
        - icoCount
        - idoCount
        - ieoCount
    ResponseStatusDto:
      type: object
      properties:
        usedCredits:
          type: number
          example: 1
          description: Credits charged for this request
        timestamp:
          type: number
          example: 1780000000000
          description: Server time of the response. Unix timestamp in milliseconds
      required:
        - usedCredits
        - timestamp
  securitySchemes:
    X-Api-Key:
      name: X-Api-Key
      type: apiKey
      in: header

````