Reference

Funding rates

Current and historical net funding rates per side. The rate folds funding and borrowing into one figure — positive = the side receives, negative = it pays. GMTrade nets its signed funding leg with per-side borrowing; Jupiter has no funding mechanism, so its rate is the negated per-side borrow cost (always ≤ 0); Phoenix has a single signed funding rate, so its two sides mirror each other. History goes back 7 days on every plan.

Current funding rates

GET
Current net funding rates per side across markets (funding folded with borrowing).
Headers
x-api-keystringrequired
API key sent in the request header; never accepted as a query parameter.
Query parameters
market_variantstring
Filter to a protocol-native market variant.
Response
200
{ data: Rate[] }
Request
cURL
curl --request GET \
  --url https://api.perpdb.xyz/v1/gmtrade/funding-rates \
  --header 'x-api-key: ak_...'
Example
{
  "data": [
    {
      "market_variant": "AAPL/USD[USDC]",
      "time": "2026-11-25T16:29:25.934Z",
      "funding_rate_1h_long": 0.000011415525114168,
      "funding_rate_1h_short": -0.000022290345273096
    },
    {
      "market_variant": "AAVE/USD[WSOL-USDC]",
      "time": "2026-11-25T17:09:49.606Z",
      "funding_rate_1h_long": 0.000014863875300683998,
      "funding_rate_1h_short": -0.000039688825718772
    }
  ]
}

Funding rate history

GET
Net funding-rate history per side, bucketed over time. Rates are per market variant, so market_variant is required.
History depth
Headers
x-api-keystringrequired
API key sent in the request header; never accepted as a query parameter.
Query parameters
market_variantstringrequired
Protocol-native market variant to aggregate; required because rates are calculated per variant.
interval1h | 4h | 1d
Aggregation bucket size.
fromstring
Inclusive window start as an RFC 3339 timestamp; defaults per endpoint.
tostring
Exclusive window end as an RFC 3339 timestamp; defaults to the current time.
Response
200
{ interval, from, to, data: Bucket[] }
Request
cURL
curl --request GET \
  --url https://api.perpdb.xyz/v1/gmtrade/funding-rates/history?market_variant=SOL/USD[USDC]&interval=1h \
  --header 'x-api-key: ak_...'
Example
{
  "interval": "1h",
  "from": "2026-11-18T17:10:56.574Z",
  "to": "2026-11-25T17:10:56.601Z",
  "data": [
    {
      "time": "2026-11-18T17:00:00.000Z",
      "funding_rate_1h_long": -0.00006264689925709018,
      "funding_rate_1h_short": 0.00003813043159033857
    },
    {
      "time": "2026-11-18T18:00:00.000Z",
      "funding_rate_1h_long": -0.00005756760538643562,
      "funding_rate_1h_short": 0.00003267500535863562
    }
  ]
}