# Funding Payments

## OpenAPI Specification

```yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /v1/account/futures/funding-payments:
    get:
      summary: Funding Payments
      deprecated: false
      description: >-
        Returns a paginated list of funding payments for the account, sorted by
        timestamp (newest first by default, see `order`). If no instrument code
        is provided, funding payments are returned for all futures markets.


        **Authentication:** Bearer token; any valid API key (no specific scope
        required). This endpoint is rate-limited. Each call to this endpoint
        counts as two requests towards the rate limit.


        Default Behaviour for `from` and `to` parameters


        | Parameters Provided | Behaviour |

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

        | **Neither `from` nor `to`** | Returns last 7 days from UTC midnight to
        current time |

        | **Only `from`** | Returns 7 days starting from the provided `from`
        date (capped at the current time) |

        | **Only `to`** | Returns 7 days ending at the provided `to` date
        (starting from UTC midnight 7 days prior) |

        | **Both `from` and `to`** | Returns funding payments within the
        specified date range (max 92 days) |


        `from`/`to` accept epoch (s, ms, µs or ns) or an ISO 8601 UTC timestamp
        ending in `Z` (or `YYYY-MM-DD`). `from` must be on or after 2024-01-01,
        not in the future, and strictly before `to`; `to` is exclusive.


        `cursor` is an opaque string. Pass the value from the previous response
        unchanged; it is `null` (or absent) on the last page.


        Unknown query parameters are rejected with `400 UNEXPECTED_PARAMETERS`.


        ### Parameter Specification


        | Parameter       | Accepted Formats | Example Values |

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

        | `from`          | ISO 8601        | `2025-09-25T13:45:30Z` (s),
        `2025-09-25T13:45:30.123Z` (ms), `2025-09-25T13:45:30.123456Z` (us) |

        |                 | Epoch           | `1695647130` (s), `1695647130123`
        (ms), `1695647130123456` (us), `1695647130123456789` (ns) |

        |                 | Date            | `2025-09-25` |

        | `to`            | ISO 8601        | `2025-09-26T18:00:00Z` (s),
        `2025-09-26T18:00:00.456Z` (ms), `2025-09-26T18:00:00.456789Z` (us) |

        |                 | Epoch           | `1695734400` (s), `1695734400456`
        (ms), `1695734400456789` (us), `1695734400456789012` (ns) |

        |                 | Date            | `2025-09-26` |

        | `instrument_code` | String         | `BTC_USD_P` (single) |

        |                  | List           | `BTC_USD_P,ETH_USD_P`
        (comma-separated list) |

        | `limit`          | Integer        | `50` |

        | `order`          | String         | `DESC` or `ASC` |

        | `cursor`         | String         |
        `eyJlcG9jaCI6IjE3Njk2MDE2MDEwNTQzNzk0NTciLCJjcW8iOiIyMTExMjMyMjkwMTU1ODc3In0=`
        |


        ### Parameter Limits


        | Parameter        | Constraints / Range |

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

        | `from`           | Date between **2024-01-01** and **present** |

        | `to`             | Strictly **after** `from`; the period between
        `from` and `to` **must not exceed 92 days** |

        | `limit`          | Integer between **1** and **200** (`max_page_size`
        is accepted as a deprecated alias; `limit` wins if both are sent) |

        | `order`          | `DESC` or `ASC` |

        | `instrument_code`| Optional; must be valid futures market code(s) |

        | `cursor`         | Optional; string returned by previous response |


        ### Parameter Defaults


        | Parameter(s)    | Default Behaviour |

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

        | `from` / `to`   | Neither provided: `from` = 7 days ago at midnight
        UTC, `to` = present time |

        | `from` / `to`   | Only `from` provided: `to` = 7 days later or present
        time, whichever is smaller |

        | `from` / `to`   | Only `to` provided: `from` = midnight UTC, 7 days
        earlier |

        | `instrument_code`| Defaults to all futures markets |

        | `limit` | Defaults to 200 |

        | `order` | Defaults to `DESC` |
      tags:
        - One Trading Public REST API/Futures
      parameters:
        - name: from
          in: query
          description: >-
            Specifies the start of the period (inclusive). Accepts date strings
            (YYYY-MM-DD), ISO 8601 UTC strings ending in `Z`, or numeric
            timestamps in seconds, milliseconds, microseconds or nanoseconds.
          required: false
          example: '2026-01-22'
          schema:
            type: string
        - name: to
          in: query
          description: >-
            Specifies the end of the period (exclusive); the range between start
            and end cannot exceed 92 days. Same formats as `from`.
          required: false
          example: '2026-01-29T00:00:00Z'
          schema:
            type: string
        - name: instrument_code
          in: query
          description: >-
            Instrument(s) to filter by: a single futures instrument code or a
            comma-separated list. Codes are case-insensitive; duplicates are
            rejected. Defaults to all futures markets.
          required: false
          example: BTC_USD_P
          schema:
            type: string
        - name: cursor
          in: query
          description: >-
            Opaque pointer to the next page, taken unchanged from the `cursor`
            of the previous response.
          required: false
          example: ''
          schema:
            type: string
        - name: max_page_size
          in: query
          description: >-
            Deprecated alias of `limit`. Maximum number of results per page, 1
            to 200 (default 200). Ignored if `limit` is also sent.
          required: false
          example: 100
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 200
        - name: limit
          in: query
          description: Maximum number of results per page, 1 to 200. Defaults to 200.
          required: false
          example: 50
          schema:
            type: integer
            minimum: 1
            maximum: 200
            default: 200
        - name: order
          in: query
          description: >-
            Sort order by timestamp: `ASC` or `DESC` (case-insensitive).
            Defaults to `DESC` (newest first).
          required: false
          example: DESC
          schema:
            type: string
            enum:
              - ASC
              - DESC
            default: DESC
      responses:
        '200':
          x-apidog-name: OK
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  funding_payments:
                    type: array
                    items:
                      allOf:
                        - $ref: '#/components/schemas/FuturesFundingPayment'
                        - type: object
                          properties:
                            position_id:
                              type: string
                              description: >-
                                The position ID the funding payment belongs to
                                (numeric string), or `null` if not linked to a
                                position.
                              nullable: true
                            time_nanos:
                              type: string
                              format: date-time
                              description: >-
                                Time of the funding payment (ISO 8601,
                                nanosecond precision).
                          required:
                            - position_id
                            - time_nanos
                          x-apidog-orders:
                            - position_id
                            - time_nanos
                          x-apidog-ignore-properties: []
                    description: >-
                      Funding payments, as a flat list sorted by timestamp in
                      the requested `order`.
                  account_id:
                    type: string
                    description: The unique identifier for the futures account.
                    x-apidog-mock: '{{$string.uuid}}'
                    format: uuid
                  max_page_size:
                    type: integer
                    description: Deprecated; same value as `limit`.
                    deprecated: true
                  cursor:
                    type: string
                    description: >-
                      Opaque cursor for the next page. Absent on the last page.
                      Pass it unchanged into the next request to fetch the
                      following batch of funding payments.
                  from:
                    type: string
                    description: >-
                      Start of the queried range (ISO 8601, nanosecond
                      precision).
                  to:
                    type: string
                    description: >-
                      End of the queried range, exclusive (ISO 8601, nanosecond
                      precision).
                  limit:
                    type: integer
                    description: The page size applied.
                x-apidog-orders:
                  - funding_payments
                  - account_id
                  - max_page_size
                  - cursor
                  - from
                  - to
                  - limit
                required:
                  - funding_payments
                  - account_id
                  - max_page_size
                  - from
                  - to
                  - limit
                x-apidog-ignore-properties: []
              example:
                account_id: aaaba8bd-3195-4f72-87ff-98720a940f23
                funding_payments:
                  - account_id: aaaba8bd-3195-4f72-87ff-98720a940f23
                    position_id: '2111199765938682'
                    instrument_code: BTC_USD_P
                    funding_rate: '0.0000179051'
                    mark_price: '89361.93'
                    funding_payment: '-0.0144'
                    cash_balance: '106628.0604'
                    time: '2026-01-28T20:00:01.055392Z'
                    time_nanos: '2026-01-28T20:00:01.055392483Z'
                  - account_id: aaaba8bd-3195-4f72-87ff-98720a940f23
                    position_id: '2111199765938682'
                    instrument_code: BTC_USD_P
                    funding_rate: '0.0000179029'
                    mark_price: '89390.01'
                    funding_payment: '-0.0144'
                    cash_balance: '106655.4032'
                    time: '2026-01-28T16:00:01.055094Z'
                    time_nanos: '2026-01-28T16:00:01.055094817Z'
                from: '2026-01-22T00:00:00.000000000Z'
                to: '2026-01-29T00:00:00.000000000Z'
                limit: 2
                max_page_size: 2
                cursor: >-
                  eyJlcG9jaCI6IjE3Njk2MDE2MDEwNTQzNzk0NTciLCJjcW8iOiIyMTExMjMyMjkwMTU1ODc3In0=
          headers: {}
        '400':
          description: ''
          content:
            application/json:
              schema: &ref_0
                $ref: '#/components/schemas/ErrorResponse'
          headers: {}
          x-apidog-name: Bad Request
        '401':
          description: ''
          content:
            application/json:
              schema:
                oneOf:
                  - *ref_0
                  - $ref: '#/components/schemas/GatewayError'
          headers: {}
          x-apidog-name: Unauthorized
        '403':
          description: ''
          content:
            application/json:
              schema:
                title: ''
                type: object
                properties:
                  error:
                    type: string
                    description: Reason
                x-apidog-orders:
                  - error
                required:
                  - error
                x-apidog-ignore-properties: []
          headers: {}
          x-apidog-name: Forbidden
        '429':
          description: >-
            Rate limit exceeded. Limits are per account holder per minute: 600
            (retail), 2,000 (institutional), 10,000 (market maker).
          content:
            application/json:
              schema: *ref_0
              example:
                error: TOO_MANY_REQUESTS
                error_message: Too many requests
          headers: {}
          x-apidog-name: ''
        '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:
        - bearer: []
      x-apidog-folder: One Trading Public REST API/Futures
      x-apidog-status: released
      x-run-in-apidog: https://app.eu.apidog.com/web/project/349694/apis/api-3877628-run
components:
  schemas:
    FuturesFundingPayment:
      type: object
      properties:
        account_id:
          type: string
          description: The account ID the funding payment belongs to
          format: uuid
        instrument_code:
          type: string
          description: Instrument code of the futures market.
        time:
          type: string
          description: >-
            Time of the funding payment (ISO 8601 UTC). Microsecond precision on
            `GET /v1/account/futures/funding-payments` (see `time_nanos` there
            for nanoseconds); nanosecond precision on the per-position endpoint.
          format: date-time
        funding_payment:
          type: string
          description: >-
            The funding payment amount in the settlement currency (positive =
            received, negative = paid), up to 4 decimal places.
        cash_balance:
          type: string
          description: Cash balance after the payment, up to 4 decimal places.
        funding_rate:
          type: string
          description: >-
            Funding rate applied (up to 10 decimal places). `null` if no funding
            rate record is found within 2 minutes of the payment.
          nullable: true
        mark_price:
          type: string
          description: >-
            Mark price used for the funding calculation. `null` if no funding
            rate record is found within 2 minutes of the payment.
          nullable: true
      x-apidog-orders:
        - account_id
        - instrument_code
        - time
        - funding_payment
        - cash_balance
        - funding_rate
        - mark_price
      required:
        - account_id
        - instrument_code
        - time
        - funding_payment
        - cash_balance
        - funding_rate
        - mark_price
      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: []
    GatewayError:
      type: object
      description: >-
        Returned by the API gateway itself when the bearer token is missing,
        invalid, expired or revoked, or the calling IP is not on the API key's
        allowlist.
      properties:
        message:
          type: string
          enum:
            - Forbidden
            - Unauthorized
      required:
        - message
      x-apidog-orders:
        - 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: http
      scheme: bearer
servers:
  - url: https://api.onetrading.com/fast
    description: Production Env
security: []

```