# 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()
```
