Skip to main content
GET
/
1
/
market
/
cefi
/
funding-rate
Get funding rate
curl --request GET \
  --url https://demo-api.mobula.io/api/1/market/cefi/funding-rate
{
  "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
  },
  "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).
  • You can specify one or more exchanges by separating them with commas.
Note on Gate.io:
Uses usdt as the settle currency. Contracts are in format SYMBOL_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 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 protocol with one of xyz, flx, vntl, hyna, km, cash to request funding for that protocol (e.g. ?symbol=BTC&protocol=xyzxyz:BTC). If omitted, standard behaviour applies (no prefix unless symbol contains : or is a stock-like symbol like XYZ100 which defaults to xyz).
  • For custom HIP3 perpetuals such as XYZ100, you can use symbol=dex:XYZ100 or symbol=XYZ100&protocol=xyz.
    This keeps the existing dex: and stock-like prefix behaviour; protocol is an alternative way to set the prefix for Hyperliquid only.

Query Parameters

ParameterTypeRequiredDescription
symbolstringYesThe trading pair symbol (e.g., BTC)
quotestringNoOptional quote currency (e.g., USDT)
exchangestringNoOptional CeFi exchanges, comma-separated (binance,bybit,deribit,okx,hyperliquid,gate,lighter)
protocolstringNoOptional. Hyperliquid only. One of xyz, flx, vntl, hyna, km, cash. When set, used as symbol prefix (e.g. protocol=xyzxyz:BTC). Default is normal (no protocol prefix).

Step-by-Step Tutorial and Video Walkthrough

  • Check out the guide: Here

Usage Examples

  1. REST

  • Query by symbol with default exchange (all supported):
curl -X GET "https://demo-api.mobula.io/api/1/market/cefi/funding-rate?symbol=BTC"
-Query by symbol with specific exchange:
curl -X GET "https://demo-api.mobula.io/api/1/market/cefi/funding-rate?symbol=BTC&exchange=deribit"
  • Query by symbol with mulitple exchange:
curl -X GET "https://demo-api.mobula.io/api/1/market/cefi/funding-rate?symbol=ETH&exchange=deribit,binance"
  • Query by symbol with quote and multiple exchange:
curl -X GET "https://demo-api.mobula.io/api/1/market/cefi/funding-rate?exchange=deribit,binance&symbol=ETH&quote=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"
  1. WebSocket Access

You can also access funding rates via WSS.
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 using exchange: "hyperliquid". Supported: xyz, flx, vntl, hyna, km, cash.

Query Parameters

symbol
string
required
quote
string
exchange
string
protocol
enum<string>
Available options:
xyz,
flx,
vntl,
hyna,
km,
cash

Response

200 - application/json

Funding rate response

queryDetails
object
required
binanceFundingRate
object
deribitFundingRate
object
bybitFundingRate
object
okxFundingRate
object
hyperliquidFundingRate
object
gateFundingRate
object
lighterFundingRate
object