Funding Rates API

Endpoints to access funding rates for perpetual contracts, aggregated from multiple exchanges.

Note: Get your API key to test these endpoints — sign up at the dashboard.

GET /api/funding-rates

Get current funding rates for a symbol, aggregated from multiple exchanges.

GET https://api.nefariouslabs.dev/api/funding-rates

Parameters

ParameterTypeRequiredDescription
symbolstringYesAsset symbol (e.g., BTC, ETH, SOL). Case insensitive.
exchangestringNoFilter by exchange: binance, bybit, okx, deribit, hyperliquid.
quotestringNoFilter by quote currency: USDT, USDC, USD.

Response

Returns data — an array of FundingRate objects:

FieldTypeDescription
symbolstringNormalized symbol (BTC, ETH, etc.)
rawTickerstringOriginal exchange ticker (BTCUSDT, BTC-PERPETUAL)
exchangestringExchange name
ratenumberFunding rate (0.0001 = 0.01%)
fundingTimestringFunding timestamp (ISO 8601)
intervalHoursnumberFunding interval in hours (1, 4, or 8)
markPricenumber | nullContract mark price
indexPricenumber | nullIndex (spot) price

Examples

curl "https://api.nefariouslabs.dev/api/funding-rates?symbol=BTC" \
-H "X-API-Key: nf_your_api_key"

Example Response

json
{
"data": [
{
"symbol": "BTC",
"rawTicker": "BTCUSDT",
"exchange": "binance",
"rate": 0.0001,
"fundingTime": "2024-01-15T08:00:00.000Z",
"intervalHours": 8,
"markPrice": 42500.5,
"indexPrice": 42498.25
},
{
"symbol": "BTC",
"rawTicker": "BTCUSDT",
"exchange": "bybit",
"rate": 0.00012,
"fundingTime": "2024-01-15T08:00:00.000Z",
"intervalHours": 8,
"markPrice": 42501.2,
"indexPrice": 42499.0
}
]
}

GET /api/funding-rates/history

Get historical funding rates for a symbol.

GET https://api.nefariouslabs.dev/api/funding-rates/history

Parameters

ParameterTypeRequiredDescription
symbolstringYesAsset symbol (e.g., BTC, ETH, SOL). Case insensitive.
exchangestringNoFilter by exchange: binance, bybit, okx, deribit, hyperliquid.
fromstringNoStart date (ISO 8601). E.g., 2024-01-01T00:00:00Z
tostringNoEnd date (ISO 8601). E.g., 2024-01-31T23:59:59Z
limitintegerNoNumber of results (max: 1000, default: 100).

Response

Returns data — an array of FundingRate objects sorted by date descending (same schema as above).

Examples

curl "https://api.nefariouslabs.dev/api/funding-rates/history?symbol=ETH&limit=50" \
-H "X-API-Key: nf_your_api_key"

Example Response

json
{
"data": [
{
"symbol": "ETH",
"rawTicker": "ETHUSDT",
"exchange": "binance",
"rate": 0.00015,
"fundingTime": "2024-01-15T16:00:00.000Z",
"intervalHours": 8,
"markPrice": 2450.75,
"indexPrice": 2449.5
},
{
"symbol": "ETH",
"rawTicker": "ETHUSDT",
"exchange": "binance",
"rate": 0.00012,
"fundingTime": "2024-01-15T08:00:00.000Z",
"intervalHours": 8,
"markPrice": 2445.25,
"indexPrice": 2444.0
}
]
}

GET /api/exchanges

List available exchanges with their status.

GET https://api.nefariouslabs.dev/api/exchanges

Response

Returns data — an array of Exchange objects:

FieldTypeDescription
idstringExchange identifier
namestringDisplay name
defaultIntervalHoursnumberDefault funding interval (hours)
symbolCountintegerNumber of available symbols
isActivebooleanExchange status

Example

bash
curl "https://api.nefariouslabs.dev/api/exchanges" \
-H "X-API-Key: nf_your_api_key"

Example Response

json
{
"data": [
{ "id": "binance", "name": "Binance", "defaultIntervalHours": 8, "symbolCount": 245, "isActive": true },
{ "id": "bybit", "name": "Bybit", "defaultIntervalHours": 8, "symbolCount": 198, "isActive": true },
{ "id": "hyperliquid", "name": "Hyperliquid", "defaultIntervalHours": 1, "symbolCount": 142, "isActive": true }
]
}

GET /health

Check service availability.

GET https://api.nefariouslabs.dev/health

Response

FieldTypeDescription
statusstringService status: healthy, degraded, or unhealthy
timestampstringCheck timestamp (ISO 8601)
exchangesarrayPer-exchange health status

Example

bash
curl "https://api.nefariouslabs.dev/health"

Example Response

json
{
"status": "healthy",
"timestamp": "2024-01-15T16:10:00.000Z",
"exchanges": [
{ "exchange": "binance", "status": "healthy", "ageMinutes": 5 },
{ "exchange": "bybit", "status": "healthy", "ageMinutes": 5 }
]
}

Ready to start building?

Get your API key in seconds. Free tier included.

Get Started — free

No credit card required