Calculators
Perpetual funding cost calculator API
Compute perpetual-futures funding: cost = notional·fundingRate·intervals (longs pay shorts when the rate is positive), with the annualized funding rate from the interval length. Deterministic funding math. Answers 'how much funding will I pay','perp funding cost over a day','annualized funding rate'.
Price$0.01per request
MethodPOST
Route/v1/calc/cryptocalc-perp-funding-cost
StatusLive
MIME typeapplication/json
Rate limit120/minute
CacheNo cache
calccryptodefiperpsfundingfuturesleveragetrading
API URL
Integration docshttps://x402.hexl.dev/v1/calc/cryptocalc-perp-funding-costExample request
{
"positionNotional": 50000,
"fundingRate": 0.0001,
"intervalsHeld": 3,
"side": "long"
}Example response
{
"formula": "cost = notional·fundingRate·intervals (long pays when rate>0)",
"side": "long",
"positionNotional": 50000,
"fundingRatePct": 0.01,
"intervalsHeld": 3,
"intervalHours": 8,
"costPerInterval": 5,
"totalFundingCost": 15,
"annualizedFundingRatePct": 10.95,
"note": "you pay funding"
}Input schema
{
"type": "object",
"required": [
"positionNotional",
"fundingRate"
],
"properties": {
"positionNotional": {
"type": "number",
"description": "position notional (USD)",
"examples": [
50000
]
},
"fundingRate": {
"type": "number",
"description": "per-interval rate (decimal, can be negative)",
"examples": [
0.0001
]
},
"intervalsHeld": {
"type": "number",
"examples": [
3
]
},
"intervalHours": {
"type": "number",
"description": "hours per funding interval",
"examples": [
8
]
},
"side": {
"type": "string",
"enum": [
"long",
"short"
],
"examples": [
"long"
]
}
}
}Output schema
{
"type": "object",
"additionalProperties": true
}