crypto / wire operation
Perpetual funding → implied carry
totalfinance.crypto.perpetual_funding
Annualize a perpetual funding rate into the implied cost-of-carry: the mark/index premium, simple and compounded annualized funding, and an extreme-funding flag. All rates are decimals; the interval defaults to the standard 8 hours.
| Pack / profiles | crypto / default, full |
|---|---|
| Default discovery | Included |
| Required capabilities | None |
| Effects / authorization | none / none |
| Cost / cancellation | small / Do not assume inline interruption |
| Handle-eligible inputs | None |
| Idempotency | not-applicable |
Input schema
{
"type": "object",
"properties": {
"markPrice": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Perpetual mark price (quote currency)"
},
"indexPrice": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Index / spot price (quote currency)"
},
"fundingRate": {
"type": "number",
"description": "Realized funding for ONE interval (decimal; 0.0001 = 0.01%). Longs pay when positive"
},
"intervalHours": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Funding interval in hours (default 8)"
}
},
"additionalProperties": false,
"required": [
"markPrice",
"indexPrice",
"fundingRate"
]
}Output schema
{
"type": "object",
"properties": {
"value": {
"description": "The computed result"
},
"assumptions": {
"type": "object",
"description": "Every applied convention, echoed"
},
"diagnostics": {
"type": "object",
"description": "Engine/method/warnings (+ convergence where iterative)"
}
},
"required": [
"value",
"assumptions",
"diagnostics"
]
}