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

# Get Holding Rates

> Returns historical borrowing and funding rates for a collateral and pair.

### Endpoint

`GET /api/holding-rates/{collateralIndex}/{pairIndex}`

Returns historical borrowing and funding rates for a collateral and pair.

### Parameters

| Parameter         | Location | Required | Type    | Description                                                                 |
| ----------------- | -------- | -------- | ------- | --------------------------------------------------------------------------- |
| `collateralIndex` | path     | Yes      | integer | Collateral index.                                                           |
| `pairIndex`       | path     | Yes      | integer | Trading pair index.                                                         |
| `chainId`         | query    | Yes      | integer | Blockchain chain ID. Common values: 42161 Arbitrum, 8453 Base, 137 Polygon. |

### Usage Example

```bash theme={null}
curl -X GET "https://backend-global.gains.trade/api/holding-rates/1/0?chainId=42161"
```

### Response Structure

The generated API panel lists the response schema for status codes: 200, 400, 503, 500. Error responses generally return an `error` or `message` field.


## OpenAPI

````yaml get /api/holding-rates/{collateralIndex}/{pairIndex}
openapi: 3.0.3
info:
  title: Gains Network Backend API
  version: 1.0.0
  description: >-
    OpenAPI reference for Gains Network backend-global and public chain-specific
    trading backend endpoints.
servers:
  - url: https://backend-global.gains.trade
    description: Backend Global API
  - url: https://backend-arbitrum.gains.trade
    description: Arbitrum trading backend
  - url: https://backend-base.gains.trade
    description: Base trading backend
  - url: https://backend-polygon.gains.trade
    description: Polygon trading backend
  - url: https://backend-sepolia.gains.trade
    description: Arbitrum Sepolia trading backend
  - url: http://localhost:3002
    description: Local backend-global development server
security: []
tags:
  - name: Health
  - name: Stats
  - name: APR
  - name: Trading History
  - name: Personal Trading History
  - name: Leaderboard
  - name: Holding Rates
  - name: Contests
  - name: Dapp
  - name: Wallet
  - name: Circle
  - name: Solana
  - name: Transak
  - name: Bridge
  - name: Campaigns
  - name: VIP
  - name: Notifications
  - name: Referrals
  - name: Trading Backend
  - name: Legacy Contests
  - name: Rewards
paths:
  /api/holding-rates/{collateralIndex}/{pairIndex}:
    get:
      tags:
        - Holding Rates
      summary: Get Holding Rates
      description: >-
        Returns historical borrowing and funding rates for a collateral and
        pair.
      operationId: get_holding-rates
      parameters:
        - name: collateralIndex
          in: path
          required: true
          schema:
            type: integer
            example: 1
          description: Collateral index.
        - name: pairIndex
          in: path
          required: true
          schema:
            type: integer
            example: 0
          description: Trading pair index.
        - name: chainId
          in: query
          required: true
          schema:
            type: integer
            example: 42161
          description: >-
            Blockchain chain ID. Common values: 42161 Arbitrum, 8453 Base, 137
            Polygon.
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  holdingRates:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
        '400':
          description: Invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Service not available
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
        success:
          type: boolean
      additionalProperties: true

````