{"uid":"cap_S8t8tnRrMo0EJIg7xzXpu","slug":"dyor-network-time-series-sql-query-8924ad30","name":"DYOR Network Time-Series SQL Query","description":"Time-series query via GET — pass ?sql_query=... parameter | ZWING Intelligence (https://zwing.finance) — contact: v@zwing.finance, Telegram: @valery_zzz","url":"https://api.dyor.network/api/timeseries","method":"GET","headers":{},"bodySchema":{"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"}}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.1","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.1/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.1","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_0o7wTJYAjFY6iBdri0xt3","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.1","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Execute read-only PostgreSQL SELECT queries against crypto time-series tables (ts_*) and return structured row data","exampleAgentPrompt":"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.","exampleUseCases":[{"title":"Monitor DeFi protocol TVL trends","prompt":"Show me how Aave's total value locked has changed over the last three months. Query the time-series database and give me daily TVL snapshots so I can see the trend."},{"title":"Analyze token volatility patterns","prompt":"Pull Bitcoin's historical prices from the past six months and calculate the daily percentage changes. I want to understand how volatile BTC has been in different market conditions."},{"title":"Compare trading volume across tokens","prompt":"Get me the daily trading volumes for Ethereum, Solana, and Polygon for the last 60 days. I need to see which one has been most actively traded recently."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:35:38.735Z","isFirstParty":false}