# Perpetual Funding Carry Cost Calculator

> Perpetual Funding Carry Cost Calculator is a paid API for AI agents from x402.presenceoperations.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-13).

Returns the projected funding cost of holding a perpetual futures position over a specified horizon, including hourly funding rate, mark-to-oracle basis, open interest, and annualized rate.

## Facts

- Endpoint: GET https://x402.presenceoperations.com/services/carry-cost?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/perpetual-funding-carry-cost-calculator-b2a440e5
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fgdqYG_cQlkbdOzpfXB8v

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability perpetual-funding-carry-cost-calculator-b2a440e5
```

Example prompt: What's the carry cost to hold a $50,000 long position on BTC-PERP over the next 48 hours — give me the projected funding, the hourly rate, and the mark-to-oracle basis?

## When to prefer this

Use this endpoint when you need a precise, signed, horizon-specific carry cost for a perpetual futures position — not just a raw funding rate. It is uniquely valuable because it explicitly states the projection assumption, provides the mark-to-oracle basis, and scopes the answer to your actual notional and side, rather than returning a generic rate you must interpret yourself. Prefer it over raw exchange funding rate APIs when the agent needs a decision-ready cost figure rather than a raw rate.

## Known failure modes

- Invalid market symbol format (must match ^[A-Z0-9]{1,16}-PERP$) returns an error
- Side value outside LONG or SHORT is refused rather than defaulted
- Hours value outside 1-720 range is rejected
- Notional outside $1-$100,000,000 range is rejected
- Market not found or not actively traded returns an error
- 402 Payment Required if x402 payment header is missing or insufficient

## How this service works

Pay-per-call analytics on live perpetual-futures microstructure: what it costs to execute a size, what it costs to hold a position, and how much liquidity a market really has. USDC via x402 on Base, no account and no API key. Each response states the limit of its own instrument rather than implying none.

## Output

A JSON object containing: the market and side you queried, the observed hourly funding rate and its annualized equivalent in basis points, the projected total funding cost over your specified horizon in quote currency, the current mark price and oracle price, the basis between them in basis points, total open interest on the market, a plain-English description of the assumption behind the projection, and the timestamp of observation.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "market",
      "notional"
     ],
     "properties": {
      "side": {
       "enum": [
        "LONG",
        "SHORT"
       ],
       "type": "string",
       "default": "LONG",
       "description": "which side of the funding you are on; the two answers have opposite signs, so anything outside LONG or SHORT is refused rather than read as the default"
      },
      "hours": {
       "type": "number",
       "default": "8",
       "maximum": 720,
       "minimum": 1,
       "description": "the holding horizon to project over; bounded because funding resets hourly and a projection past a month is a number with the shape of an answer and none of the content"
      },
      "market": {
       "type": "string",
       "pattern": "^[A-Z0-9]{1,16}-PERP$",
       "description": "the perpetual market to price the carry of, upper-cased before matching, for example BTC-PERP"
      },
      "notional": {
       "type": "number",
       "maximum": 100000000,
       "minimum": 1,
       "description": "the position size to price the funding on, in quote currency"
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "side": "",
  "hours": 0,
  "detail": "",
  "market": "",
  "notional": 0,
  "direction": "",
  "markPrice": "",
  "assumption": "",
  "observedAt": "",
  "oraclePrice": "",
  "openInterest": "",
  "fundingPerHour": "",
  "basisBasisPoints": 0,
  "hourlyFundingRate": "",
  "annualisedRateBasisPoints": 0,
  "projectedFundingOverHorizon": ""
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/perpetual-funding-carry-cost-calculator-b2a440e5/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.presenceoperations.com](https://www.zero.xyz/host/x402.presenceoperations.com/llms.txt)
