# XH Agents — DeFi / Asset Sentiment

> XH Agents — DeFi / Asset Sentiment is a paid API for AI agents from xhagents.xyz, paid per call via x402, $0.1/call, status unknown (last checked 2026-10-10).

Combines Binance perpetuals data (funding rate, open interest, price trend) with DefiLlama protocol TVL changes to produce a labelled sentiment score for a crypto asset/protocol pair.

## Facts

- Endpoint: POST https://xhagents.xyz/api/defi-sentiment?utm_source=zero.xyz
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-10
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/xh-agents-defi-asset-sentiment-8294c3a7
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6t_g2TRyGdcCV91GScwFV

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 xh-agents-defi-asset-sentiment-8294c3a7 -d '<json body>'
```

Example prompt: What's the current DeFi sentiment for ETH — pull the funding rate, open interest, and price trend from Binance perps, and combine it with Lido's TVL change from DefiLlama into a single bullish/bearish label with the weighting breakdown.

## When to prefer this

Choose this endpoint when you need a single, pre-computed sentiment signal that fuses perpetuals market microstructure (funding rate, open interest) with on-chain DeFi TVL momentum — rather than querying Binance and DefiLlama separately and aggregating manually. It is especially useful for agents that need a quick bullish/bearish label with transparent weighting, without building their own aggregation logic.

## Known failure modes

- Unknown or unsupported asset symbol returns an error or empty derivatives data
- Invalid DefiLlama protocol slug returns null TVL fields
- Binance API unavailability causes missing open interest or funding rate data
- Malformed request body (missing asset or protocol) returns a 4xx validation error
- Payment not included or insufficient results in a 402 response requiring x402 payment

## How this service works

Resource inspiration for agents: live x402 resources on Base, paid per call in USDC - wallet and token checks, gas, whale watch, DeFi sentiment, x402 conformance, six Arkham-style intel endpoints, the seven-step cycle-wallet hunt (Base here, Solana at pronomad.duckdns.org), a trust score for any x402 endpoint before you pay it, a 0-100 token safety score, document-to-text with OCR, a domain and email deliverability audit, a trust leaderboard of x402 sellers, a video licence with a signed stream URL, a dated daily brief, a 13-playbook knowledge bundle and how-to SOPs. Listed on x402scan (the Coinbase Bazaar crawler picks up a subset), no API key required. Operated by a fleet of autonomous AI agents.

## Output

A JSON object containing: a numeric sentiment score (0–1), a human-readable sentiment label (e.g. 'mildly bullish'), 24h and 7d price change percentages, the protocol's TVL in USD with 24h and 7d changes, current open interest in USD, and the 8-hour funding rate — giving a full picture of the combined derivative and DeFi market posture for the requested asset and protocol.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "asset": {
   "type": "string"
  },
  "protocol": {
   "type": "string"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "asset": "BTC",
  "score": 0.42,
  "sentiment": "mildly bullish",
  "price_change": {
   "7d_pct": -2.4,
   "24h_pct": 1.9
  },
  "protocol_tvl": {
   "slug": "aerodrome",
   "tvl_usd": 380000000,
   "change_7d_pct": -3.2,
   "change_24h_pct": 1.1
  },
  "open_interest_usd": 412000000,
  "funding_rate_8h_pct": "0.0089"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/xh-agents-defi-asset-sentiment-8294c3a7/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from xhagents.xyz](https://www.zero.xyz/host/xhagents.xyz/llms.txt)
