# Onchain Query API – Crypto Perpetual Futures Snapshot

> Onchain Query API – Crypto Perpetual Futures Snapshot is a paid API for AI agents from chain.cyberwarex.com, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Returns a comprehensive perpetual-futures market snapshot for a given symbol from Binance USD-M, including funding rate, mark/index price, open interest, 24h stats, and long/short ratio — all in one call.

## Facts

- Endpoint: GET https://chain.cyberwarex.com/derivatives
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/onchain-query-api-crypto-perpetual-futures-snapshot-811ea98e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_XCCOCvx5qFxAYS00HX69Z

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 onchain-query-api-crypto-perpetual-futures-snapshot-811ea98e
```

Example prompt: What's the current funding rate, mark price, open interest, and long/short ratio for BTC perpetual futures right now?

## When to prefer this

Choose this endpoint when you need a one-call, aggregated derivatives view for a crypto asset — especially when you need funding rate, open interest, and long/short ratio together without assembling multiple Binance API calls. Ideal for funding arbitrage decisions, leverage/positioning reads, or when onchain-only data sources lack derivatives coverage.

## Known failure modes

- Unknown or unsupported symbol returns null fields or an error
- Symbol not available on Binance USD-M returns empty or null data
- Network/cache timeout may return stale data beyond the 30s cache window
- Malformed symbol input (e.g. wrong format) may return an error response
- Payment failure (x402) if USDC balance is insufficient

## How this service works

Crypto perpetual-futures snapshot for a symbol in ONE call (Binance USD-M, keyless): current funding rate and the next funding time, mark and index price, open interest (contracts and USD), 24h price change/high/low/volume, and the top-trader long/short account ratio. For funding arbitrage, leverage/positioning reads, and a derivatives view an onchain-only feed cannot give. Cached 30s.

## Output

A JSON object containing: the perpetual symbol, funding rate, annualized funding rate percentage, next funding timestamp (Unix ms), mark price, index price, open interest in contracts and USD, 24h high/low/volume and price change percent, and the top-trader long/short account ratio. Data is sourced from Binance USD-M and cached for 30 seconds.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "symbol"
     ],
     "properties": {
      "symbol": {
       "type": "string",
       "description": "Asset ticker (BTC, ETH, SOL...) or a full perp symbol like BTCUSDT."
      }
     },
     "additionalProperties": false
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "perp": {
       "type": "string"
      },
      "source": {
       "type": "string"
      },
      "symbol": {
       "type": "string"
      },
      "low_24h": {
       "type": [
        "number",
        "null"
       ]
      },
      "high_24h": {
       "type": [
        "number",
        "null"
       ]
      },
      "mark_price": {
       "type": [
        "number",
        "null"
       ]
      },
      "volume_24h": {
       "type": [
        "number",
        "null"
       ]
      },
      "index_price": {
       "type": [
        "number",
        "null"
       ]
      },
      "funding_rate": {
       "type": [
        "number",
        "null"
       ]
      },
      "open_interest": {
       "type": [
        "number",
        "null"
       ]
      },
      "long_short_ratio": {
       "type": [
        "number",
        "null"
       ]
      },
      "next_funding_time": {
       "type": [
        "integer",
        "null"
       ]
      },
      "open_interest_usd": {
       "type": [
        "number",
        "null"
       ]
      },
      "price_change_24h_pct": {
       "type": [
        "number",
        "null"
       ]
      },
      "funding_rate_annualized_pct": {
       "type": [
        "number",
        "null"
       ]
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/onchain-query-api-crypto-perpetual-futures-snapshot-811ea98e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from chain.cyberwarex.com](https://www.zero.xyz/host/chain.cyberwarex.com/llms.txt)
