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

# Get index composition history

> Retrieves a history of index composition records in a descending time order. The results are an array of index composition data recorded at different "timestamps".

<Tabs>
  <Tab value="Typescript" title="TS/JS">
    ```js theme={null}
    const indexService = new IndexService(client);

    indexService.getIndexCompositionHistory({
        index: 'COIN50',
    }).then(async (response) => {
        console.log('Index Composition History: ', response);
    })
    ```

    For more information, please visit the [INTX TS SDK](https://github.com/coinbase-samples/intx-sdk-ts).
  </Tab>
</Tabs>


## OpenAPI

````yaml GET  /api/v1/index/{index}/composition-history
openapi: 3.0.3
info:
  title: REST API
  description: >
    # Welcome to Coinbase INTX API

    ## Introduction

    The INTX APIs allow institutions to trade and manage orders on the
    International Exchange. The following API pages detail various REST API
    endpoints we offer.

    ## Getting Started

    To get started, please visit one of the following pages:

    - [Quickstart](/international-exchange/introduction/quickstart)

    -
    [Overview](/api-reference/international-exchange-api/rest-api/introduction)

    -
    [Authentication](/api-reference/international-exchange-api/rest-api/authentication)

    - [Rate Limits](/international-exchange/introduction/rate-limits-overview)

    ## FIX API

    - [FIX API reference](/international-exchange/fix-api/fix-api-overview)

    ## WebSocket API

    - [WebSocket API
    reference](/international-exchange/websocket-feed/websocket-overview)
  version: '1.0'
servers:
  - url: https://api.international.coinbase.com
security: []
paths:
  /api/v1/index/{index}/composition-history:
    get:
      tags:
        - Index
      summary: Get index composition history
      description: >-
        Retrieves a history of index composition records in a descending time
        order. The results are an array of index composition data recorded at
        different "timestamps".
      operationId: getIndexCompositionHistory
      parameters:
        - name: index
          in: path
          description: Identifies the index by name (e.g., `COIN50`)
          required: true
          schema:
            type: string
        - name: time_from
          in: query
          description: >-
            Filters look back history for returned data (accepts an ISO 8601
            timestamp format)
          required: false
          schema:
            type: string
            example: '2024-10-31T00:00:00Z'
        - name: result_limit
          in: query
          description: The number of results to return (defaults to 5)
          required: false
          schema:
            type: integer
            example: 3
        - name: result_offset
          in: query
          description: The number of results from the beginning to skip past
          required: false
          schema:
            type: integer
            example: 0
      responses:
        '200':
          description: Index composition list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/IndexComposition_v1'
        '400':
          description: Invalid attribute
        '401':
          description: Authentication error
      security:
        - auth_client_id: []
          auth_passphrase: []
          auth_signature: []
          auth_timestamp: []
components:
  schemas:
    IndexComposition_v1:
      type: object
      properties:
        product_id:
          description: The Product ID for the index
          type: string
          example: COIN50
        divisor:
          description: The index divisor
          type: string
          example: 3935813421.91702
        timestamp:
          description: The snapshot timestamp for this index composition
          type: string
          example: '2024-11-11T14:47:26Z'
        inception_timestamp:
          description: The timestamp of when this index was first created
          type: string
          example: '2020-12-31T00:00:00Z'
        last_rebalance:
          description: The timestamp of when the last index rebalance occurred
          type: string
          example: '2024-08-30T00:00:00Z'
        constituents:
          type: array
          items:
            $ref: '#/components/schemas/IndexConstituent_v1'
    IndexConstituent_v1:
      type: object
      properties:
        symbol:
          description: The constituent asset pair symbol
          type: string
          example: BTC-USD
        name:
          description: The constituent name
          type: string
          example: Bitcoin
        rank:
          description: The constituent rank order in the index
          type: number
          format: double
          example: 1
        cap_factor:
          description: The constituent market cap factor (or multiplier)
          type: string
          example: '0.456192678887042'
        amount:
          description: The constituent amount
          type: string
          example: '19745468'
        market_cap:
          description: The constituent total market cap
          type: string
          example: '1625637364529.9463'
        index_market_cap:
          description: The constituent market cap represented in the index
          type: string
          example: '741603864223.787'
        weight:
          description: The weight of the constituent in the index
          type: string
          example: '0.5130230783794717'
        running_weight:
          description: The running weight of the constituent in the index
          type: string
          example: '0.5130230783794717'
  securitySchemes:
    auth_client_id:
      type: apiKey
      name: CB-ACCESS-KEY
      in: header
      description: The Client ID that owns the API Key for the request
    auth_passphrase:
      type: apiKey
      name: CB-ACCESS-PASSPHRASE
      in: header
      description: The pass phrase affiliated with the API Key
    auth_signature:
      type: apiKey
      name: CB-ACCESS-SIGN
      in: header
      description: >-
        A HMAC SHA-256 signature using the API Key secret on the string
        TIMESTAMP, METHOD, REQUEST_PATH, BODY
    auth_timestamp:
      type: apiKey
      name: CB-ACCESS-TIMESTAMP
      in: header
      description: The timestamp of when the request is being made

````