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

# Get a chart for a fungible asset

> This endpoint returns the chart for the fungible asset for a selected period



## OpenAPI

````yaml /openapi-v1.yaml get /v1/fungibles/{fungible_id}/charts/{chart_period}
openapi: 3.0.3
info:
  version: 1.0.0
  title: REST API
  description: REST-like API provides access to rich Zerion ecosystem.
  contact:
    name: Zerion API
    url: https://developers.zerion.io/
    email: api@zerion.io
servers:
  - description: Production API
    url: https://api.zerion.io
security:
  - APIKeyBasicAuth: []
tags:
  - name: wallets
    description: >-
      Operations related to wallets, such as portfolio charts, positions, and
      transactions.
  - name: wallet sets
    description: >-
      Operations on a wallet set — aggregated portfolio data across at most one
      EVM address and one Solana address queried together.
  - name: fungibles
    description: >-
      Operations related to fungible assets, such as list them all, search or
      get by ID.
  - name: chains
    description: Operations related to chains, such as list all chains.
  - name: swap
    description: Operations related to swapping and bridging assets.
  - name: gas
    description: Operations related to gas.
  - name: nfts
    description: >-
      Operations related to non fungible assets, such list them, search or get
      by ID.
  - name: dapps
    description: >-
      Operations related to decentralized applications, such as list them all,
      search or get by ID.
  - name: subscriptions to transactions
    description: Operations related to subscriptions to transactions.
paths:
  /v1/fungibles/{fungible_id}/charts/{chart_period}:
    get:
      tags:
        - fungibles
      summary: Get a chart for a fungible asset
      description: >-
        This endpoint returns the chart for the fungible asset for a selected
        period
      operationId: getFungibleChart
      parameters:
        - name: fungible_id
          in: path
          required: true
          description: Unique fungible ID
          schema:
            type: string
            maxLength: 44
        - $ref: '#/components/parameters/ChartPeriod'
        - $ref: '#/components/parameters/Currency'
      responses:
        '200':
          $ref: '#/components/responses/SingleFungibleChartResponse'
        '400':
          $ref: '#/components/responses/MalformedParameters'
        '401':
          $ref: '#/components/responses/UnauthenticatedError'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '503':
          $ref: '#/components/responses/RetryAfter'
components:
  parameters:
    ChartPeriod:
      name: chart_period
      in: path
      required: true
      description: >
        Chart period. Determines both the time window covered and the spacing

        between chart points (`points`). Each period samples the window at a
        fixed

        interval, so the number of points is roughly constant (~290–460)
        regardless

        of period:


        | Period     | Point interval | Time window         |

        | ---------- | -------------- | ------------------- |

        | `hour`     | 10 seconds     | last 1 hour         |

        | `day`      | 5 minutes      | last 24 hours       |

        | `week`     | 30 minutes     | last 7 days         |

        | `month`    | 2 hours        | last 30 days        |

        | `3months`  | 6 hours        | last 90 days        |

        | `6months`  | 12 hours       | last 180 days       |

        | `year`     | 1 day          | last 365 days       |

        | `5years`   | 4 days         | last 5 years        |

        | `max`      | varies         | full available history |


        Point counts are approximate, and `begin_at` / `end_at` are aligned to
        the

        interval. For `max`, the interval is derived from the amount of
        available

        history (targeting ~400 points), so it varies; for wallet and wallet-set

        charts the spacing is at least 1 day.
      schema:
        type: string
        minLength: 3
        maxLength: 7
        default: day
        enum:
          - hour
          - day
          - week
          - month
          - 3months
          - 6months
          - year
          - 5years
          - max
    Currency:
      name: currency
      in: query
      required: false
      description: Denominated currency value of returned prices
      schema:
        type: string
        default: usd
        enum:
          - eth
          - btc
          - usd
          - eur
          - krw
          - rub
          - gbp
          - aud
          - cad
          - inr
          - jpy
          - nzd
          - try
          - zar
          - cny
          - chf
  responses:
    SingleFungibleChartResponse:
      description: Resource for the requested fungible chart
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Response-13'
    MalformedParameters:
      description: Parameters are malformed
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Parameter is malformed
                    detail:
                      type: string
                      description: Long description of the error
                      example: Some validation errors will be described here
    UnauthenticatedError:
      description: Unathenticated request
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Unauthorized Error
                    detail:
                      type: string
                      description: Long description of the error
                      example: >-
                        The API key is invalid, please, make sure that you are
                        using a valid key
    NotFoundResponse:
      description: Resource was not found
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Resource was not found
                    detail:
                      type: string
                      description: Long description of the error
                      example: Requested resource was not found, try later
    TooManyRequests:
      description: Too many requests error
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Too many requests
                    detail:
                      type: string
                      description: Long description of the error
                      example: Your request had been throttled
    RetryAfter:
      description: Service is temporarily unavailable
      headers:
        Retry-After:
          description: >
            Indicates how long the client should wait before making a follow-up
            request.
          schema:
            type: integer
            example: 10
            description: Number of seconds to wait.
      content:
        application/json:
          schema:
            type: object
            properties:
              errors:
                type: array
                items:
                  type: object
                  properties:
                    title:
                      type: string
                      description: Error short title
                      example: Service is temporarily unavailable
                    detail:
                      type: string
                      description: Long description of the error
                      example: Please, retry later (check the Retry-After header)
  schemas:
    Response-13:
      type: object
      required:
        - links
        - data
      properties:
        links:
          $ref: '#/components/schemas/ResponseLinks-13'
        data:
          $ref: '#/components/schemas/Container-13'
    ResponseLinks-13:
      type: object
      properties:
        self:
          type: string
          format: url
          example: >-
            https://api.zerion.io/v1/fungibles/fda0820a-9cff-40f5-997b-a76b9f9d60e7/charts/day
    Container-13:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
          description: Fungible chart resource type
          example: fungible_charts
        id:
          type: string
          description: Fungible chart unique identifier
          example: fda0820a-9cff-40f5-997b-a76b9f9d60e7-week
        attributes:
          $ref: '#/components/schemas/Attributes-11'
    Attributes-11:
      type: object
      required:
        - begin_at
        - end_at
      properties:
        begin_at:
          type: string
          description: Begin timestamp of the chart
          example: '2023-01-18T11:00:00Z'
        end_at:
          type: string
          description: End timestamp of the chart
          example: '2023-01-25T10:30:00Z'
        stats:
          type: object
          required:
            - first
            - min
            - avg
            - max
            - last
          properties:
            first:
              type: number
              format: double
              description: First chart value
              example: 1145.00999
            min:
              type: number
              format: double
              description: Minimum value on the chart
              example: 1133.034
            avg:
              type: number
              format: double
              description: Average chart value
              example: 1689.1110093
            max:
              type: number
              format: double
              description: Maximum value on the chart
              example: 2345.601
            last:
              type: number
              format: double
              description: Last chart value
              example: 1515.34
        points:
          type: array
          description: Sorted list of chart points
          items:
            type: array
            description: >-
              Chart point - tuple of two items, the first one is timestamp, the
              second one is a price in requested currency
            items:
              oneOf:
                - type: integer
                - type: number
            minItems: 2
            maxItems: 2
            example:
              - 1674039600
              - 1145.00999
  securitySchemes:
    APIKeyBasicAuth:
      type: http
      scheme: basic
      description: >-
        To test endpoints here, paste your API key from the
        [dashboard](https://dashboard.zerion.io/) into the username field and
        leave the password empty.

````