# AgentFeed Perp-vs-Spot Basis

> AgentFeed Perp-vs-Spot Basis is a paid API for AI agents from x402.ochinimus.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-01).

Returns the perpetual-vs-spot price basis percentage, contango/backwardation state, mark price, spot price, and 8-hour funding rate for any USDT perpetual pair on Bybit.

## Facts

- Endpoint: GET https://x402.ochinimus.app/api/basis?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentfeed-perp-vs-spot-basis-24b684d7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_i4Hp1-iuTK10h4P8wMQRy

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 agentfeed-perp-vs-spot-basis-24b684d7
```

Example prompt: What's the current basis between the SOLUSDT perpetual and spot — is it in contango or backwardation, and what's the funding rate right now?

## When to prefer this

Choose this endpoint when you need a single-symbol, real-time snapshot of the perp-vs-spot relationship including basis percentage, market state classification, and funding rate context — especially for basis trading analysis, pre-trade sentiment checks, or funding arbitrage assessment. Prefer this over general price feeds when the perp premium/discount and funding context are the specific signals needed.

## Known failure modes

- Invalid or unsupported symbol returns an error or empty data
- Symbol must be a valid Bybit USDT perp symbol (e.g. SOLUSDT, not SOL/USD)
- Stale or delayed data if upstream exchange feed is lagging
- Payment failure via x402 protocol blocks the response
- Missing required 'symbol' query parameter causes a 400-level error

## How this service works

Perp-vs-spot basis for any USDT pair: the premium or discount in %, a contango or backwardation read, and the funding context that goes with it. Use when you need to answer: Is this perp trading above or below spot?

## Output

A JSON object containing the USDT pair symbol, basis percentage (positive = contango/premium, negative = backwardation/discount), a human-readable state label ('contango', 'backwardation', or 'flat'), the current mark price, spot price, and the 8-hour funding rate as a decimal.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [],
     "properties": {
      "symbol": {
       "type": "string",
       "description": "USDT perp symbol e.g. SOLUSDT, BTCUSDT (default SOLUSDT)"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "data": {
       "type": "object",
       "properties": {
        "state": {
         "type": "string"
        },
        "symbol": {
         "type": "string"
        },
        "basis_pct": {
         "type": "number"
        },
        "mark_price": {
         "type": "number"
        },
        "spot_price": {
         "type": "number"
        },
        "funding_rate_8h": {
         "type": "number"
        },
        "funding_rate_raw": {
         "type": "number"
        },
        "funding_interval_hours": {
         "type": "number"
        }
       }
      },
      "paid": {
       "type": "boolean"
      },
      "tool": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {
   "state": "flat",
   "symbol": "SOLUSDT",
   "basis_pct": -0.0082,
   "mark_price": 121.42,
   "spot_price": 121.43,
   "funding_rate_8h": 0.0001
  },
  "paid": true,
  "tool": "get_basis"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentfeed-perp-vs-spot-basis-24b684d7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402.ochinimus.app](https://www.zero.xyz/host/x402.ochinimus.app/llms.txt)
