> For the complete documentation index, see [llms.txt](https://pacifica.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pacifica.gitbook.io/docs/api-documentation/api/rest-api/markets/get-historical-funding.md).

# Get historical funding

```
GET /api/v1/funding_rate/history
```

#### Query Parameters

<table><thead><tr><th width="176">Field</th><th width="98">Type</th><th width="95">Need</th><th width="239">Description</th><th>Example</th></tr></thead><tbody><tr><td><code>"symbol"</code></td><td>string</td><td>required</td><td>Market symbol to query</td><td><code>BTC</code></td></tr><tr><td><code>"limit"</code></td><td>integer</td><td>optional</td><td>Number of records to show (default 100, max 4000)</td><td><code>20</code></td></tr><tr><td><code>"cursor"</code></td><td>string</td><td>optional</td><td>Cursor pagination to access records. Default to none</td><td><code>1115hVka</code></td></tr></tbody></table>

```
/api/v1/funding_rate/history?symbol=BTC&limit=20&cursor=11115hVka
```

#### Response

* Status 200: Successfully retrieved funding history

```json
{
  "success": true,
  "data": [ 
    {
      "oracle_price": "117170.410304",
      "bid_impact_price": "117126",
      "ask_impact_price": "117142",
      "funding_rate": "0.0000125",
      "next_funding_rate": "0.0000125",
      "created_at": 1753806934249
    },
    ... 
  ],
  "next_cursor": "11114Lz77",
  "has_more": true
}
    
```

| Field                 | Type           | Description                                                                                                  |
| --------------------- | -------------- | ------------------------------------------------------------------------------------------------------------ |
| `'oracle_price'`      | decimal string | Oracle price used for [funding rate calculation](https://docs.pacifica.fi/trading-on-pacifica/funding-rates) |
| `'bid_impact_price'`  | decimal string | Bid impact price at time of calculation (see funding rate docs)                                              |
| `'ask_impact_price'`  | decimal string | Ask impact price at time of calculation (see funding rate docs)                                              |
| `'funding_rate'`      | decimal string | Last settled funding rate                                                                                    |
| `'next_funding_rate'` | decimal string | Predicted funding rate for next settlement                                                                   |
| `'created_at'`        | integer        | Timestamp in milliseconds                                                                                    |
| `'next_cursor'`       | string         | Next cursor for pagination                                                                                   |
| `'has_more'`          | boolean        | True if there exists a `'next_cursor'`                                                                       |

* Status 400: Invalid request parameters
* Status 401: Unauthorized access
* Status 500: Internal server error

#### Code Example (Python)

```python
import requests

response = requests.get(
    "/api/v1/funding_rate/history?symbol=BTC",
    headers={"Accept": "*/*"},
)

data = response.json()
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://pacifica.gitbook.io/docs/api-documentation/api/rest-api/markets/get-historical-funding.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
