> ## 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.

# Periodic Returns

> Closing price and within-period return for each period, all years, including the current incomplete one.<br/><br/>Available from&#58; <Badge color="green">Advanced</Badge><br/>Cost&#58; <Badge color="surface">1 credit per request</Badge>

<Note>
  Returns are open→close within each period. The last period may be incomplete.
</Note>


## OpenAPI

````yaml https://api.cryptorank.io/v3/documentation-json get /v3/currencies/{id}/analytics/returns
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/currencies/{id}/analytics/returns:
    get:
      tags:
        - Currencies
      summary: Periodic Returns
      description: >-
        **Description**


        Closing price and within-period return for each period, all years,
        including the current incomplete one.


        > **Note:** Returns are open→close within each period. The last period
        may be incomplete.


        **Access**

        - Available from: **Advanced**

        - Cost: 1 credit per request
      operationId: CurrenciesController_getAnalyticsReturns
      parameters:
        - name: id
          required: true
          in: path
          description: Numeric coin id.
          schema:
            example: 1
            type: integer
        - name: period
          required: false
          in: query
          description: 'Aggregation period: monthly, quarterly, or yearly.'
          schema:
            default: monthly
            type: string
            enum:
              - monthly
              - quarterly
              - yearly
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - status
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CurrencyAnalyticsReturnItemDto'
                  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
        '404':
          description: Currency not found
          content:
            application/json:
              schema:
                type: object
                required:
                  - error
                properties:
                  error:
                    type: object
                    required:
                      - code
                      - message
                      - status
                    properties:
                      code:
                        type: string
                        enum:
                          - NOT_FOUND
                        example: NOT_FOUND
                      message:
                        type: string
                        example: Resource not found
                      status:
                        type: number
                        example: 404
        '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:
    CurrencyAnalyticsReturnItemDto:
      type: object
      properties:
        date:
          type: string
          example: '2024-01-01T00:00:00.000Z'
          description: >-
            Period start (month, quarter, or year), ISO 8601 UTC. The last
            period may be incomplete.
        closingPrice:
          type: string
          example: '42100.5'
          description: >-
            Closing price of the period, USD. For an incomplete period, the
            latest available price.
        pricePercentChange:
          type: number
          example: 12.45
          description: 'Within-period return: (close − open) / open × 100, %.'
      required:
        - date
        - closingPrice
        - pricePercentChange
    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

````