# DYOR Network Time-Series SQL Query

> DYOR Network Time-Series SQL Query is a paid API for AI agents from api.dyor.network, paid per call via x402, $0.1/call, status unknown (last checked 2026-09-15).

Execute read-only PostgreSQL SELECT queries against crypto time-series tables (ts_*) and return structured row data

## Facts

- Endpoint: GET https://api.dyor.network/api/timeseries
- Price: $0.1/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/dyor-network-time-series-sql-query-8924ad30
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_S8t8tnRrMo0EJIg7xzXpu

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 dyor-network-time-series-sql-query-8924ad30
```

Example prompt: Query the DYOR/ZWING time-series database with this SQL: SELECT date, price_usd FROM ts_token_prices WHERE token_symbol = 'ETH' AND date >= '2024-01-01' ORDER BY date DESC LIMIT 30 — give me Ethereum's daily price for the past 30 days.

## When to prefer this

Choose this endpoint when you need raw time-series data from the ZWING crypto knowledge graph via flexible SQL, especially when you know the ts_* table schema and want precise control over filtering, aggregation, and time ranges. Prefer this over the semantic search or SPARQL endpoints when you have structured query needs on historical metric data rather than entity exploration or graph traversal.

## Known failure modes

- Invalid or malformed SQL query returns an error status
- Query against non-existent table names (must use ts_* tables) returns an error
- Write operations (INSERT, UPDATE, DELETE) rejected — only SELECT allowed
- Missing sql_query parameter returns a 400-level error
- Payment not processed or insufficient USDC balance causes 402 response
- Query times out for overly complex or large-range queries

## How this service works

Time-series query via GET — pass ?sql_query=... parameter | ZWING Intelligence (https://zwing.finance) — contact: v@zwing.finance, Telegram: @valery_zzz

## Output

Returns a JSON object with a 'data' array of row objects matching the query, a 'count' integer indicating total rows returned, a 'status' string, and a 'headers' array listing column names from the query result.

## 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": [
      "sql_query"
     ],
     "properties": {
      "sql_query": {
       "type": "string",
       "description": "Read-only PostgreSQL SELECT query over ts_* tables"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "data": {
       "type": "array",
       "items": {
        "type": "object"
       }
      },
      "count": {
       "type": "integer"
      },
      "status": {
       "type": "string"
      },
      "headers": {
       "type": "array",
       "items": {
        "type": "string"
       }
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/dyor-network-time-series-sql-query-8924ad30/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.dyor.network](https://www.zero.xyz/host/api.dyor.network/llms.txt)
