{"uid":"cap_Q0UZtQjNszazkkU6v6S_Z","slug":"kg-dyor-network-4821866a","name":"DYOR Knowledge Graph Time-Series Data Query","description":"Query historical crypto time-series data: token prices, market caps, TVL, protocol revenue, fees, DeFi pool APY, lending rates, stablecoin supply, and treasury balances. Data from CoinGecko, DefiLlama, TokenTerminal, and CryptoRank updated daily. Free schema at GET /api/schema lists all tables and columns | ZWING Intelligence (https://zwing.bot) — contact: v@zwing.bot, Telegram: @valery_zzz","url":"https://kg.dyor.network/api/timeseries?utm_source=zero.xyz","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":{"request":{"input":{"type":"http","method":"GET","queryParams":{"sql_query":"SELECT table_name FROM information_schema.tables WHERE table_name LIKE 'ts_%' LIMIT 20"}}},"response":{"data":[{"column_name":"entity_id"},{"column_name":"entity_uri"},{"column_name":"date"},{"column_name":"defiDominance"},{"column_name":"defiMarketCap"},{"column_name":"defiToEthRatio"},{"column_name":"ethMarketCap"},{"column_name":"topCoinDefiDominance"},{"column_name":"tradingVolume24h"},{"column_name":"activeCryptocurrencies"},{"column_name":"activeMarkets"},{"column_name":"btcDominance"},{"column_name":"ethDominance"},{"column_name":"marketCapChangePct24h"},{"column_name":"totalMarketCap"},{"column_name":"totalVolume"}],"count":16,"status":"success","headers":["column_name"]}},"exampleRequest":{"sql_query":"SELECT table_name FROM information_schema.tables WHERE table_name LIKE 'ts_%' LIMIT 20"},"tags":["x402"],"displayCostAmount":"0.050000","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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.050000/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__wrJ94_4a7uoNCTrhpXfE","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":"Query historical crypto time-series data including token prices, market caps, TVL, protocol revenue, fees, DeFi pool APY, lending rates, stablecoin supply, and treasury balances via SQL","exampleAgentPrompt":"Can you pull the daily TVL and protocol revenue for Aave from January 1, 2024 to today — run a SQL query like SELECT date, tvl, revenue FROM ts_protocols WHERE protocol = 'aave' ORDER BY date DESC against the DYOR time-series database?","exampleUseCases":[{"title":"Compare stablecoin supply trends","prompt":"Can you query the historical supply data for USDC, USDT, and DAI over the past two years? I want to see how their supplies have diverged, especially after the FTX collapse. Run a SQL query against the time-series database and show me the monthly trends."},{"title":"Analyze DeFi lending rate movements","prompt":"Pull the historical lending rates for Aave and Compound across major assets like ETH and USDC over the last six months. I'm trying to understand how rate volatility correlates with market movements. Can you query the time-series data and show me the trends?"},{"title":"Track protocol revenue declines","prompt":"I need to investigate why Uniswap's daily fees and protocol revenue dropped so sharply in the last quarter. Can you run a SQL query to get the daily fee and revenue data for the past year, and help me identify when the decline started and how steep it was?"}],"resultDescription":"Returns a JSON object with status, count, headers array, and data array of rows matching the SQL query — each row contains time-stamped metric values (prices, TVL, APY, revenue, fees, etc.) for the queried crypto entities and date range.","failureModes":["Invalid or non-SELECT SQL query returns an error (only read-only SELECT queries are allowed)","Referencing unknown table names returns a schema error — use GET /api/schema to discover valid ts_* tables","Payment not included or insufficient funds returns HTTP 402","Query returns empty data array if no matching records exist for the specified filters","Malformed SQL syntax causes a PostgreSQL parse error"],"whenToPreferThis":"Use this endpoint when you need structured historical time-series data for crypto assets and DeFi protocols — especially when you want to write precise SQL queries over specific metrics like TVL, APY, fees, or market cap over a date range. Prefer this over the SPARQL endpoint when you need numerical/quantitative historical data rather than entity relationships, and over the semantic search endpoint when you already know exactly which tokens or protocols you want to query.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-13T06:39:59.158Z","isFirstParty":false,"canonicalSlug":"kg-dyor-network-4821866a"}