# DEX TWAP Price Feed (1h/24h) by agentfeeds.jp

> DEX TWAP Price Feed (1h/24h) by agentfeeds.jp is a paid API for AI agents from api.agentfeeds.jp, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Returns time-weighted average price (TWAP) for a DEX venue pair over a 1-hour or 24-hour window, computed from 1-minute observation buckets with coverage and methodology metadata.

## Facts

- Endpoint: GET https://api.agentfeeds.jp/v1/dex/twap
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dex-twap-price-feed-1h-24h-by-agentfeeds-jp-83239998
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rEKKQTlN7FoDgkKEotdr4

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 dex-twap-price-feed-1h-24h-by-agentfeeds-jp-83239998
```

Example prompt: What's the time-weighted average price of ETH/USDC on the DEX over the last 24 hours — I need the coverage percentage and methodology notes too so I can verify the data quality.

## When to prefer this

Use this endpoint when you need a verifiable, statistically sound time-weighted average price for a DEX trading pair rather than a spot price, especially when data quality transparency (coverage_pct, method notes) matters. Prefer this over raw tick data endpoints when you need pre-aggregated TWAP in 1h or 24h granularity without doing the averaging yourself. Best for DeFi analytics, reference pricing, and on-chain financial workflows where methodology auditability is important.

## Known failure modes

- Missing required 'pair' query parameter returns a 400 error
- Invalid window value (not '1h' or '24h') results in a validation error
- Unknown or unsupported trading pair returns empty or 404 response
- Insufficient observation data within the window results in low coverage_pct with possibly unreliable TWAP
- Payment not provided or insufficient triggers x402 payment-required response
- Rate limiting or upstream data gaps may cause partial data returns

## How this service works

Time-weighted average price (1h/24h) per venue pair, computed from our own 1-minute observation buckets. Includes coverage_pct and method notes for verifiability. Descriptive statistics only; not investment advice.

## Output

Returns the TWAP for the requested pair and window (1h or 24h), derived from 1-minute observation buckets. Includes the computed average price, coverage_pct indicating what fraction of the window had data, and method notes explaining how the average was calculated for verifiability.

## 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": [
      "pair"
     ],
     "properties": {
      "pair": {
       "type": "string"
      },
      "window": {
       "type": "string",
       "description": "'1h' or '24h'"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dex-twap-price-feed-1h-24h-by-agentfeeds-jp-83239998/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.agentfeeds.jp](https://www.zero.xyz/host/api.agentfeeds.jp/llms.txt)
