The finance developer workbenchSearch the reference Development · 0.1.4 · unpublished

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 / profilescrypto / default, full
Default discoveryIncluded
Required capabilitiesNone
Effects / authorizationnone / none
Cost / cancellationsmall / Do not assume inline interruption
Handle-eligible inputsNone
Idempotencynot-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"
  ]
}

All operations · Setup, handles, jobs & permissions