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
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Asset symbol (e.g., BTC, ETH, SOL). Case insensitive. |
| exchange | string | No | Filter by exchange: binance, bybit, okx, deribit, hyperliquid. |
| quote | string | No | Filter by quote currency: USDT, USDC, USD. |
Response
Returns data — an array of FundingRate objects:
| Field | Type | Description |
|---|---|---|
| symbol | string | Normalized symbol (BTC, ETH, etc.) |
| rawTicker | string | Original exchange ticker (BTCUSDT, BTC-PERPETUAL) |
| exchange | string | Exchange name |
| rate | number | Funding rate (0.0001 = 0.01%) |
| fundingTime | string | Funding timestamp (ISO 8601) |
| intervalHours | number | Funding interval in hours (1, 4, or 8) |
| markPrice | number | null | Contract mark price |
| indexPrice | number | null | Index (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
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | Asset symbol (e.g., BTC, ETH, SOL). Case insensitive. |
| exchange | string | No | Filter by exchange: binance, bybit, okx, deribit, hyperliquid. |
| from | string | No | Start date (ISO 8601). E.g., 2024-01-01T00:00:00Z |
| to | string | No | End date (ISO 8601). E.g., 2024-01-31T23:59:59Z |
| limit | integer | No | Number 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:
| Field | Type | Description |
|---|---|---|
| id | string | Exchange identifier |
| name | string | Display name |
| defaultIntervalHours | number | Default funding interval (hours) |
| symbolCount | integer | Number of available symbols |
| isActive | boolean | Exchange 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
| Field | Type | Description |
|---|---|---|
| status | string | Service status: healthy, degraded, or unhealthy |
| timestamp | string | Check timestamp (ISO 8601) |
| exchanges | array | Per-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 — freeNo credit card required