x402 Paid API

Market Data API

Live risk scores from Hyperliquid. Pay per call in USDC on Base. No API key. No signup. Just HTTP + money.

How it works

  1. 1Your agent calls any endpoint below — no auth headers needed.
  2. 2Server responds 402 Payment Required with X-Payment-Amount header.
  3. 3Agent sends USDC on Base to the payment address.
  4. 4Agent retries the request with X-Payment-Proof header containing the tx hash.
  5. 5Server verifies on-chain via x402 facilitator, returns data.

Endpoints

GET/api/v1/market/risk-scores$0.01

All monitored assets with composite risk scores, component breakdown, and active alerts.

Example response
{
  "timestamp": 1711583000,
  "portfolio_risk_score": 6.6,
  "assets": [
    {
      "asset": "BTC",
      "mark_price": 66116.0,
      "risk_score": 5.5,
      "component_scores": {
        "funding": 1.1,
        "volume_spike": 20.0,
        "oi_shift": 0.0,
        "basis": 0.9
      },
      "alerts": []
    }
  ],
  "alerts": []
}
GET/api/v1/market/risk-scores/{asset}$0.005

Deep dive on a single asset — risk scores plus 24h funding history and L2 orderbook snapshot.

Example response
{
  "asset": "BTC",
  "mark_price": 66116.0,
  "risk_score": 5.5,
  "component_scores": { ... },
  "funding_history_24h": [
    { "time": 1711540000, "funding_rate": "0.000011" }
  ],
  "orderbook": {
    "bids": [{ "price": "66110", "size": "2.5" }],
    "asks": [{ "price": "66120", "size": "1.8" }]
  }
}
GET/api/v1/market/alerts$0.005

Only assets with risk score above threshold. Returns empty when markets are calm — your agent saves money.

Example response
{
  "threshold": 60,
  "alerting_assets": [],
  "total_monitored": 4
}
GET/api/v1/market/prices$0.002

Raw price snapshot — mark, oracle, funding, OI, volume. No risk scoring overhead.

Example response
{
  "assets": [
    {
      "asset": "BTC",
      "mark_price": 66116.0,
      "oracle_price": 66148.0,
      "funding_rate": 0.000011,
      "open_interest": 26765.1,
      "day_volume": 2423215983.2
    }
  ]
}

Risk scoring engine

Each asset gets a composite risk score from 0–100, computed from four weighted dimensions. Score hits 60 and the API returns alerts. Different thresholds for crypto vs commodity assets.

Funding Rate

30%

Flags when hourly funding rates hit extreme levels. Tighter thresholds for commodities.

Volume Spike

25%

Detects unusual volume vs rolling 12-sample average. Crypto: 5x, Commodities: 3x.

OI Shift

25%

Catches sudden position buildup. Alerts on 20% change (crypto) or 15% (commodities).

Basis Deviation

20%

Mark price vs oracle/index divergence. 5% threshold for crypto, 3% for commodities.

Monitored assets

Perpetuals

BTC, ETH, SOL, PAXG

Spot Commodities

GLD, SLV

xyz: Namespace

WTI crude, Brent, Gold, Silver, Copper, NatGas, Platinum, Palladium, EUR, JPY

Governance

This API is served by a governed agent running under Agency-OS. Not a raw Lambda.

Start querying

Payment: USDC on Base via x402 protocol

0x2d43d450e395500a09a81d00C713115e1f442D34

Compatible with any x402 client — including AgentCash, Coinbase CDP, and custom implementations.