# Funding Rate Settings

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/funding-rate/settings:
    get:
      summary: Funding Rate Settings
      deprecated: false
      description: >-
        Returns an array of funding rate settings, sorted alphabetically by
        instrument code. Refer to the funding rate methodology for a detailed
        explanation of the calculation logic.

        https://docs.onetrading.com/futures/funding-rate-methodology


        Settings may be cached for up to 30 seconds. Unknown query parameters
        are rejected with `400 UNEXPECTED_PARAMETERS`.
      tags:
        - One Trading Public REST API/Futures
      parameters:
        - name: instrument_code
          in: query
          description: >-
            Instrument(s) to filter by. Can be a single pair or a
            comma-separated string of pairs. Defaults to all instruments with
            funding rate settings, including those whose `state` is `INACTIVE`.
          required: false
          example: BTC_USD_P,ETH_USD_P
          schema:
            type: string
      responses:
        '200':
          x-apidog-name: Success
          description: ''
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/FundingRateSetting'
              examples:
                '1':
                  summary: Success Example
                  value:
                    instrument_code: ADA_USD_P
                    state: ACTIVE
                    market_offset: 6
                    clamp_threshold: 0.0005
                    annual_interest_rate: 0.04
                    cap: 0.001
                    period: 240
                '2':
                  summary: Success Example
                  value:
                    instrument_code: BTC_USD_P
                    state: ACTIVE
                    market_offset: 0
                    clamp_threshold: 0.0005
                    annual_interest_rate: 0.04
                    cap: 0.001
                    period: 240
                '3':
                  summary: Success Example
                  value:
                    instrument_code: DOGE_USD_P
                    state: ACTIVE
                    market_offset: 5
                    clamp_threshold: 0.0005
                    annual_interest_rate: 0.04
                    cap: 0.001
                    period: 240
                '4':
                  summary: Success Example
                  value:
                    instrument_code: ETH_USD_P
                    state: ACTIVE
                    market_offset: 2
                    clamp_threshold: 0.0005
                    annual_interest_rate: 0.04
                    cap: 0.001
                    period: 240
                '5':
                  summary: Success Example
                  value:
                    instrument_code: LINK_USD_P
                    state: ACTIVE
                    market_offset: 7
                    clamp_threshold: 0.0005
                    annual_interest_rate: 0.04
                    cap: 0.001
                    period: 240
                '6':
                  summary: Success Example
                  value:
                    instrument_code: LTC_USD_P
                    state: ACTIVE
                    market_offset: 9
                    clamp_threshold: 0.0005
                    annual_interest_rate: 0.04
                    cap: 0.001
                    period: 240
                '7':
                  summary: Success Example
                  value:
                    instrument_code: SOL_USD_P
                    state: ACTIVE
                    market_offset: 4
                    clamp_threshold: 0.0005
                    annual_interest_rate: 0.04
                    cap: 0.001
                    period: 240
                '8':
                  summary: Success Example
                  value:
                    instrument_code: SUI_USD_P
                    state: ACTIVE
                    market_offset: 8
                    clamp_threshold: 0.0005
                    annual_interest_rate: 0.04
                    cap: 0.001
                    period: 240
                '9':
                  summary: Success Example
                  value:
                    instrument_code: TAO_USD_P
                    state: ACTIVE
                    market_offset: 10
                    clamp_threshold: 0.0005
                    annual_interest_rate: 0.04
                    cap: 0.001
                    period: 240
                '10':
                  summary: Success Example
                  value:
                    instrument_code: XRP_USD_P
                    state: ACTIVE
                    market_offset: 3
                    clamp_threshold: 0.0005
                    annual_interest_rate: 0.04
                    cap: 0.001
                    period: 240
          headers: {}
        '400':
          description: >-
            Invalid request. Possible codes: `INVALID_INSTRUMENT_CODE` (no
            funding rate settings exist for the code),
            `DUPLICATE_INSTRUMENT_CODES`, `MISSING_INSTRUMENT_CODE`,
            `UNEXPECTED_PARAMETERS`.
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                '11':
                  summary: INVALID_INSTRUMENT_CODE
                  value:
                    error: INVALID_INSTRUMENT_CODE
                    error_message: >-
                      Invalid instrument codes: FOO_USD_P. Valid codes:
                      BTC_USD_P, ETH_USD_P
                '12':
                  summary: DUPLICATE_INSTRUMENT_CODES
                  value:
                    error: DUPLICATE_INSTRUMENT_CODES
                    error_message: 'Duplicate instrument codes: BTC_USD_P'
                '13':
                  summary: UNEXPECTED_PARAMETERS
                  value:
                    error: UNEXPECTED_PARAMETERS
                    error_message: 'Unsupported parameter: foo. Allowed: instrument_code'
          headers: {}
          x-apidog-name: Bad Request
        '500':
          description: Unexpected server error.
          content:
            application/json:
              schema: *ref_0
              example:
                error: SERVER_ERROR
                error_message: An internal server error occurred
          headers: {}
          x-apidog-name: Server Error
      security: []
      x-apidog-folder: One Trading Public REST API/Futures
      x-apidog-status: developing
      x-run-in-apidog: https://app.eu.apidog.com/web/project/349694/apis/api-4022131-run
components:
  schemas:
    FundingRateSetting:
      type: object
      properties:
        instrument_code:
          type: string
          description: Instrument code for the futures market
        state:
          type: string
          description: >-
            Whether funding is currently active for the instrument. ACTIVE or
            INACTIVE.
          enum:
            - ACTIVE
            - INACTIVE
          x-apidog-enum:
            - value: ACTIVE
              name: ''
              description: ''
            - value: INACTIVE
              name: ''
              description: ''
        market_offset:
          type: number
          description: Settlement offset in seconds from the minute mark.
        clamp_threshold:
          description: >-
            Clamp threshold for the funding rate. Either a single number, or an
            object with a weekly schedule of thresholds.
          oneOf:
            - type: number
              description: Fixed clamp threshold (e.g. `0.0005` = 0.05%).
            - type: object
              description: Scheduled clamp thresholds.
              properties:
                schedules:
                  type: array
                  items:
                    type: object
                    properties:
                      day:
                        type: integer
                        minimum: 1
                        maximum: 7
                        description: Day of the week (1 = Monday, 7 = Sunday).
                      hour:
                        type: integer
                        minimum: 0
                        maximum: 23
                        description: Hour of the day (UTC).
                      clamp_threshold:
                        type: number
                        description: Clamp threshold that applies from this day and hour.
                    required:
                      - day
                      - hour
                      - clamp_threshold
                    x-apidog-orders:
                      - day
                      - hour
                      - clamp_threshold
                    x-apidog-ignore-properties: []
              required:
                - schedules
              x-apidog-orders:
                - schedules
              x-apidog-ignore-properties: []
        annual_interest_rate:
          type: number
          description: >-
            Annual interest rate component. Paid by long position holders to
            short position holders when positive.
        cap:
          type: number
          description: Maximum absolute funding rate per period
        period:
          type: integer
          description: Funding period in minutes (240 = every 4 hours).
      x-apidog-orders:
        - instrument_code
        - state
        - market_offset
        - clamp_threshold
        - annual_interest_rate
        - cap
        - period
      required:
        - instrument_code
        - state
        - market_offset
        - clamp_threshold
        - annual_interest_rate
        - cap
        - period
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
    ErrorResponse:
      type: object
      description: >-
        Error body. `error` is a machine-readable code (e.g.
        `INVALID_INSTRUMENT_CODE`) on most endpoints; a few older endpoints
        return a human-readable message in `error` instead and omit
        `error_message`.
      properties:
        error:
          type: string
          description: Error code (or, on older endpoints, a human-readable message).
        error_message:
          type: string
          description: >-
            Human-readable detail. Present on endpoints that return an error
            code in `error`.
      required:
        - error
      x-apidog-orders:
        - error
        - error_message
      x-apidog-folder: ''
      x-apidog-ignore-properties: []
  securitySchemes:
    bearerAuth:
      type: bearer
      scheme: bearer
      description: >-
        API key issued to the account holder, sent as `Authorization: Bearer
        <token>`. The key must hold the `SUBACCOUNT_TRANSFER` scope.
    bearer:
      type: bearer
      scheme: bearer
servers:
  - url: https://api.onetrading.com/fast
    description: Production Env
security: []

```