Get funding rate
curl --request GET \
--url https://demo-api.mobula.io/api/1/market/cefi/funding-rateimport requests
url = "https://demo-api.mobula.io/api/1/market/cefi/funding-rate"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://demo-api.mobula.io/api/1/market/cefi/funding-rate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://demo-api.mobula.io/api/1/market/cefi/funding-rate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://demo-api.mobula.io/api/1/market/cefi/funding-rate"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://demo-api.mobula.io/api/1/market/cefi/funding-rate")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo-api.mobula.io/api/1/market/cefi/funding-rate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"queryDetails": {
"base": "<string>",
"quote": "<string>"
},
"binanceFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"marketPrice": "<string>",
"epochDurationMs": 123
},
"deribitFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"marketPrice": 123,
"epochDurationMs": 123
},
"bybitFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"okxFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"hyperliquidFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"gateFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"kucoinFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"mexcFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"bitgetFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"krakenFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"coinbaseFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"marketPrice": 123,
"epochDurationMs": 123
},
"lighterFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
}
}Perps Data
Get Funding Rate
Fetches the latest CeFi funding rate for a given symbol on a specified exchange. This can be queried via REST or WebSocket.
GET
/
1
/
market
/
cefi
/
funding-rate
Get funding rate
curl --request GET \
--url https://demo-api.mobula.io/api/1/market/cefi/funding-rateimport requests
url = "https://demo-api.mobula.io/api/1/market/cefi/funding-rate"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://demo-api.mobula.io/api/1/market/cefi/funding-rate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://demo-api.mobula.io/api/1/market/cefi/funding-rate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://demo-api.mobula.io/api/1/market/cefi/funding-rate"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://demo-api.mobula.io/api/1/market/cefi/funding-rate")
.asString();require 'uri'
require 'net/http'
url = URI("https://demo-api.mobula.io/api/1/market/cefi/funding-rate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"queryDetails": {
"base": "<string>",
"quote": "<string>"
},
"binanceFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"marketPrice": "<string>",
"epochDurationMs": 123
},
"deribitFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"marketPrice": 123,
"epochDurationMs": 123
},
"bybitFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"okxFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"hyperliquidFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"gateFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"kucoinFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"mexcFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"bitgetFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"krakenFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
},
"coinbaseFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"marketPrice": 123,
"epochDurationMs": 123
},
"lighterFundingRate": {
"symbol": "<string>",
"fundingTime": 123,
"fundingRate": 123,
"epochDurationMs": 123
}
}Query Details
Fetches the latest CeFi funding rate for a given symbol.- If no exchange is provided, the endpoint returns the rate from all supported CeFi exchanges by default (
binance,bybit,hyperliquid,deribit,okx,gate,lighter,kucoin,mexc,bitget,kraken,coinbase). - You can specify one or more exchanges by separating them with commas.
Note on Gate.io:
Usesusdtas the settle currency. Contracts are in formatSYMBOL_USDT(e.g.,BTC_USDT).
Note on Lighter:
Funding rate sign convention - positive rate means longs pay shorts, negative rate means shorts pay longs. Epoch duration is 1 hour.
Note on Bitget:
quoteselects the contract type -USDT→usdt-futures(tickerETHUSDT),USDC→usdc-futures(tickerETHPERP),USD→ coin-marginedcoin-futures. Defaults toUSDT.
Note on Hyperliquid (DEX - HIP3):
Funding rates from Hyperliquid DEX are available exclusively for HIP3 instruments.
- Symbol prefix: You can prefix the symbol with
dex:(e.g.,dex:BTC) or use the protocol query parameter.- Protocol parameter: Use
protocolwith one ofxyz,flx,vntl,hyna,km,cashto request funding for that protocol (e.g.?symbol=BTC&protocol=xyz→xyz:BTC). If omitted, standard behaviour applies (no prefix unless symbol contains:or is a stock-like symbol likeXYZ100which defaults toxyz).- For custom HIP3 perpetuals such as
XYZ100, you can usesymbol=dex:XYZ100orsymbol=XYZ100&protocol=xyz.
This keeps the existingdex:and stock-like prefix behaviour;protocolis an alternative way to set the prefix for Hyperliquid only.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| symbol | string | Yes | The trading pair symbol (e.g., BTC) |
| quote | string | No | Optional quote currency (e.g., USDT) |
| exchange | string | No | Optional CeFi exchanges, comma-separated (binance,bybit,deribit,okx,hyperliquid,gate,lighter,kucoin,mexc,bitget,kraken,coinbase) |
| protocol | string | No | Optional. Hyperliquid only. One of xyz, flx, vntl, hyna, km, cash. When set, used as symbol prefix (e.g. protocol=xyz → xyz:BTC). Default is normal (no protocol prefix). |
Step-by-Step Tutorial and Video Walkthrough
- Check out the guide: Here
Usage Examples
-
REST
- Query by
symbolwith defaultexchange(all supported):
curl -X GET "https://demo-api.mobula.io/api/1/market/cefi/funding-rate?symbol=BTC"
symbol with specific exchange:
curl -X GET "https://demo-api.mobula.io/api/1/market/cefi/funding-rate?symbol=BTC&exchange=deribit"
- Query by
symbolwith mulitpleexchange:
curl -X GET "https://demo-api.mobula.io/api/1/market/cefi/funding-rate?symbol=ETH&exchange=deribit,binance"
- Query by
symbolwithquoteand multipleexchange:
curl -X GET "https://demo-api.mobula.io/api/1/market/cefi/funding-rate?exchange=deribit,binance&symbol=ETH"e=USDC"
- Query Hyperliquid with
protocol(e.g. xyz:BTC):
curl -X GET "https://demo-api.mobula.io/api/1/market/cefi/funding-rate?symbol=BTC&exchange=hyperliquid&protocol=xyz"
-
WebSocket Access
View more details →
- Endpoint:
wss://api.mobula.io - Payload example:
{
"type": "funding",
"authorization": "api-key",
"payload": {
"symbol": "BTC",
"quote" : "USDT",
"exchange": "deribit,binance,okx,lighter",
"subscriptionTracking": "true"
}
}
- With Hyperliquid protocol (e.g. cash:HOOD): add
"protocol": "cash"in the payload when usingexchange: "hyperliquid". Supported:xyz,flx,vntl,hyna,km,cash.
Query Parameters
Available options:
xyz, flx, vntl, hyna, km, cash Response
200 - application/json
Funding rate response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
- object
- object[]
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes