> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.paradex.trade/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.paradex.trade/_mcp/server.

# Funding data history

GET https://api.testnet.paradex.trade/v1/funding/data

List historical funding data by market


Reference: https://docs.paradex.trade/api/prod/markets/get-funding-data

## Request

### Query parameters

- `cursor` (string, optional) — Returns the ‘next’ paginated page.
- `end_at` (integer, optional) — End Time (unix time millisecond)
- `market` (string, required) — Market for which funding payments are queried
- `page_size` (integer, optional, default: 100) — Limit the number of responses in the page
- `start_at` (integer, optional) — Start Time (unix time millisecond)

## Response

### 200

OK

- `next` (string, optional) — The pointer to fetch next set of records (null if there are no records left)
- `prev` (string, optional) — The pointer to fetch previous set of records (null if there are no records left)
- `results` (list of responses.FundingDataResult, optional) — Array of paginated results

## Errors

### 400 Bad Request Error

Bad Request

- `data` (ResponsesApiErrorData, optional) — any additional data related to the error
- `error` (enum, optional) — unique immutable string identifier for specific error
  - Allowed values: `VALIDATION_ERROR`, `BINDING_ERROR`, `INTERNAL_ERROR`, `NOT_FOUND`, `SERVICE_UNAVAILABLE`, `INVALID_REQUEST_PARAMETER`, `ORDER_ID_NOT_FOUND`, `ORDER_IS_CLOSED`, `ORDER_IS_NOT_OPEN`, `INVALID_ORDER_SIZE`, `CLIENT_ORDER_ID_NOT_FOUND`, `DUPLICATED_CLIENT_ID`, `INVALID_PRICE_PRECISION`, `INVALID_SYMBOL`, `INVALID_TOKEN`, `INVALID_ETHEREUM_ADDRESS`, `INVALID_ETHEREUM_SIGNATURE`, `INVALID_STARKNET_ADDRESS`, `INVALID_STARKNET_SIGNATURE`, `STARKNET_SIGNATURE_VERIFICATION_FAILED`, `BAD_STARKNET_REQUEST`, `ETHEREUM_SIGNER_MISMATCH`, `ETHEREUM_HASH_MISMATCH`, `NOT_ONBOARDED`, `INVALID_TIMESTAMP`, `INVALID_BLOCK_EXPIRATION`, `ACCOUNT_NOT_FOUND`, `INVALID_ORDER_SIGNATURE`, `PUBLIC_KEY_INVALID`, `UNAUTHORIZED_ETHEREUM_ADDRESS`, `UNAUTHORIZED_ERROR`, `ETHEREUM_ADDRESS_ALREADY_ONBOARDED`, `MARKET_NOT_FOUND`, `ALLOWLIST_ENTRY_NOT_FOUND`, `USERNAME_IN_USE`, `GEO_IP_BLOCK`, `ETHEREUM_ADDRESS_BLOCKED`, `PROGRAM_NOT_FOUND`, `PROGRAM_NOT_SUPPORTED`, `INVALID_DASHBOARD`, `MARKET_NOT_OPEN`, `INVALID_REFERRAL_CODE`, `REQUEST_NOT_ALLOWED`, `PARENT_ADDRESS_ALREADY_ONBOARDED`, `INVALID_PARENT_ACCOUNT`, `INVALID_VAULT_OPERATOR_CHAIN`, `VAULT_OPERATOR_ALREADY_ONBOARDED`, `VAULT_NAME_IN_USE`, `VAULT_NOT_FOUND`, `VAULT_STRATEGY_NOT_FOUND`, `VAULT_LIMIT_REACHED`, `BATCH_SIZE_OUT_OF_RANGE`, `ISOLATED_MARKET_ACCOUNT_MISMATCH`, `NO_ACCESS_TO_MARKET`, `POINTS_SUMMARY_NOT_FOUND`, `ALGO_ID_NOT_FOUND`, `INVALID_DERIVATION_PATH`, `PROFILE_STATS_NOT_FOUND`, `INVALID_CHAIN`, `INVALID_LAYERSWAP_SWAP`, `INVALID_RHINOFI_REQUEST`, `INVALID_RHINOFI_QUOTE`, `INVALID_RHINOFI_QUOTE_COMMIT`, `SOCIAL_USERNAME_IN_USE`, `INVALID_OAUTH_REQUEST`, `RPI_ACCOUNT_NOT_WHITELISTED`, `SYSTEM_STATUS_POST_ONLY`, `SYSTEM_STATUS_CANCEL_ONLY`, `INVALID_MARKETING_CODE`, `INVALID_JOIN_WAITLIST_REQUEST`, `TRANSACTION_NOT_FOUND`, `OFFER_NOT_FOUND`, `MARKET_MARGIN_RESTRICTED`, `NOT_UNIQUE`, `ACCOUNT_ALREADY_REFERRED`, `ONBOARDING_PERIOD_EXPIRED`, `ONBOARDING_RATE_LIMITED`, `SUBACCOUNTS_LIMIT_EXCEEDED`, `INSUFFICIENT_MIN_CHAIN_BALANCE`, `INVALID_SUBKEY`, `TOKEN_LIMIT_REACHED`, `INVALID_TOKEN_SCOPE`, `INSUFFICIENT_TRANSFERRABLE_XP`, `TRANSFER_LIMIT_REACHED`
- `message` (string, optional) — detailed description of error and how to address it

## Types

### responses.FundingDataResult

- `created_at` (integer, optional) — Timestamp in milliseconds when the funding data was created
- `funding_index` (string, optional) — Current funding index value as a decimal string
- `funding_period_hours` (double, optional) — Actual funding period in hours for this market
- `funding_premium` (string, optional) — Current funding premium as a decimal string
- `funding_rate` (string, optional) — Raw funding rate for the actual funding period as a decimal string
- `funding_rate_8h` (string, optional) — Normalized 8-hour funding rate as a decimal string
- `market` (string, optional) — Market represents the market identifier

### ResponsesApiErrorData

any additional data related to the error

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "next": "eyJmaWx0ZXIiMiwiYXQiOjE2ODQ4MDAwMDAwMDAwLCJtYXJrZXIiOnsibWFya2V0IjoiQlRDLVVTRC1QRVJQIn19",
  "prev": "eyJmaWx0ZXIiOnsiTGltaXQiOjEwMCwiYXQiOjE2ODQ3OTY0MDAwMDAwLCJtYXJrZXIiOnsibWFya2V0IjoiQlRDLVVTRC1QRVJQIn19fQ==",
  "results": [
    {
      "created_at": 1684796400000,
      "funding_index": "0.00012345",
      "funding_period_hours": 8,
      "funding_premium": "0.00004567",
      "funding_rate": "0.00000567",
      "funding_rate_8h": "0.00000567",
      "market": "BTC-USD-PERP"
    }
  ]
}
```

**SDK Code**

```python
import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('https://api.testnet.paradex.trade/v1/funding/data', params={
  'market': 'BTC-USD-PERP'
}, headers = headers)

print(r.json())

```

```javascript
const headers = {
  'Accept':'application/json'
};

fetch('https://api.testnet.paradex.trade/v1/funding/data?market=BTC-USD-PERP',
{
  method: 'GET',

  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});

```

```go
package main
import (
      "bytes"
      "net/http"
)

func main() {

    headers := map[string][]string{
        "Accept": []string{"application/json"},
    }

    data := bytes.NewBuffer([]byte{jsonReq})
    req, err := http.NewRequest("GET", "https://api.testnet.paradex.trade/v1/funding/data", data)
    req.Header = headers

    client := &http.Client{}
    resp, err := client.Do(req)
    // ...
}

```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.testnet.paradex.trade/v1/funding/data?market=market")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.testnet.paradex.trade/v1/funding/data?market=market")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.testnet.paradex.trade/v1/funding/data?market=market', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.testnet.paradex.trade/v1/funding/data?market=market");
var request = new RestRequest(Method.GET);
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["Content-Type": "application/json"]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.testnet.paradex.trade/v1/funding/data?market=market")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```