{ "opencollection": "1.0.0", "info": { "name": "Hermod DEX Onchain API", "version": "sha-80d3407" }, "items": [ { "info": { "name": "Onchain", "type": "folder" }, "items": [ { "info": { "name": "Bridge Protocol Ranking", "type": "http" }, "http": { "method": "GET", "url": "/gateway/v1/onchain/bridge/ranking", "params": [ { "name": "time_range", "value": "", "type": "query", "description": "Window to aggregate bridge volume over: `7d`, `30d`, `90d`, `180d`, `1y`, or `all`. Returns a single ranked snapshot (not a time-series). This endpoint uses `time_range` only — it does NOT accept `interval`." }, { "name": "limit", "value": "", "type": "query", "description": "Results per page" }, { "name": "offset", "value": "", "type": "query", "description": "Pagination offset" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "List bridge protocols ranked by USD volume over a time range. Example: use this when you need bridge leaderboard data instead of raw SQL." }, { "info": { "name": "DEX Protocol Activity", "type": "http" }, "http": { "method": "GET", "url": "/gateway/v1/onchain/dex/activity", "params": [ { "name": "chain", "value": "", "type": "query", "description": "Chain to query." }, { "name": "project", "value": "", "type": "query", "description": "DEX project name (e.g. `uniswap`, `pancakeswap`, `aerodrome`). Exactly one of `project` / `address` is required." }, { "name": "address", "value": "", "type": "query", "description": "A specific router/contract measured as `tx_to`. Exactly one of `project` / `address` is required." }, { "name": "time_range", "value": "", "type": "query", "description": "Look-back window (hard 90d cap). Overridden by `from`/`to` when set." }, { "name": "from", "value": "", "type": "query", "description": "Start of range — Unix seconds or YYYY-MM-DD. With `to`, the range may span at most 90 days." }, { "name": "to", "value": "", "type": "query", "description": "End of range — Unix seconds or YYYY-MM-DD. Without `from`, the window is `time_range` ending at `to`." }, { "name": "group_by", "value": "", "type": "query", "description": "`total` = single aggregate; `day` = daily series (newest first)." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Active traders, trade count, and USD volume for a DEX **protocol** (or a specific router contract), as a single aggregate or a daily series (`group_by=day`).\n\n**Lookup:** `chain` + exactly one of `project` (e.g. `uniswap`, `pancakeswap`) or `address` (a router measured as `tx_to`).\n\n**Related:** per-swap rows for a single token → `/v1/token/dex-trades`.\n\n**Chains:** Ethereum, Base, BSC, Arbitrum, Tron · **Refresh:** ~24h · USD volume lags ~3 days (see `enriched_ratio`)." }, { "info": { "name": "Current Gas Price", "type": "http" }, "http": { "method": "GET", "url": "/gateway/v1/onchain/gas-price", "params": [ { "name": "chain", "value": "", "type": "query", "description": "Chain. Can be `ethereum`, `polygon`, `bsc`, `arbitrum`, `optimism`, `base`, `avalanche`, `fantom`, `linea`, or `cyber`." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Look up the current gas price for one EVM chain. Example: `chain=ethereum`.\n\nThis endpoint uses `eth_gasPrice` JSON-RPC and returns gas price in both wei and Gwei.\n\nSupported chains: `ethereum`, `polygon`, `bsc`, `arbitrum`, `optimism`, `base`, `avalanche`, `fantom`, `linea`, `cyber`." }, { "info": { "name": "Blockchain Structured Query", "type": "http" }, "http": { "method": "POST", "url": "/gateway/v1/onchain/query", "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Send a JSON object describing the query. Example: `{\"source\":\"agent.ethereum_dex_trades\",\"fields\":[\"block_time\"],\"filters\":[{\"field\":\"block_date\",\"op\":\"gte\",\"value\":\"2025-03-01\"}],\"limit\":1}`.\n\nUse this endpoint when you want structured filtering without writing raw SQL. Discover tables and columns first with `GET /v1/onchain/schema`.\n\nKey rules:\n- Source format: `agent.`\n- Max 10,000 rows (default 20), 30s timeout\n- Always filter on `block_date` for large tables\n- **Never filter by*" }, { "info": { "name": "On-Chain Table Schema", "type": "http" }, "http": { "method": "GET", "url": "/gateway/v1/onchain/schema", "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Discover tables and columns before writing SQL or structured queries. Example: call this endpoint first, then use `agent.ethereum_dex_trades` in `/v1/onchain/query` or `/v1/onchain/sql`.\n\nThe response includes database name, table name, column names, types, and comments.\n\nFor transfer tables, `amount` is decimal-adjusted display units and `amount_raw` is the original base-unit value." }, { "info": { "name": "Blockchain SQL Query", "type": "http" }, "http": { "method": "POST", "url": "/gateway/v1/onchain/sql", "body": { "type": "json", "data": "{}" }, "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Run a raw ClickHouse `SELECT` query against blockchain data.\n\nAll tables live in the **agent** database. Discover tables and columns first with `GET /v1/onchain/schema`.\n\nSend a JSON object, not raw SQL text. Example: `{\"sql\":\"SELECT ...\",\"max_rows\":1000}`.\n\nRules\n- Only SELECT/WITH statements allowed (read-only)\n- All table references must be database-qualified: `agent.`\n- Max 10,000 rows (default 1,000), 30s timeout\n- **Always filter on block_date or block_number** — partition key," }, { "info": { "name": "Transaction Details by Hash", "type": "http" }, "http": { "method": "GET", "url": "/gateway/v1/onchain/tx", "params": [ { "name": "hash", "value": "", "type": "query", "description": "Transaction hash (0x-prefixed hex)" }, { "name": "chain", "value": "", "type": "query", "description": "Chain. Can be `ethereum`, `polygon`, `bsc`, `arbitrum`, `optimism`, `base`, `avalanche`, `fantom`, `linea`, or `cyber`." }, { "name": "include", "value": "", "type": "query", "description": "Comma-separated enrichments to attach. Currently valid: `labels` — adds `from_label` and `to_label` fields with entity information for the from/to addresses." } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "Look up one transaction by hash. Example: `chain=ethereum` with a 0x-prefixed 64-character hash.\n\nAll numeric fields are hex-encoded. Convert them with `parseInt(hex, 16)`.\n\nSupported chains: `ethereum`, `polygon`, `bsc`, `arbitrum`, `optimism`, `base`, `avalanche`, `fantom`, `linea`, `cyber`." }, { "info": { "name": "Yield Pool Ranking", "type": "http" }, "http": { "method": "GET", "url": "/gateway/v1/onchain/yield/ranking", "params": [ { "name": "project", "value": "", "type": "query", "description": "Filter by protocol name like `lido`, `aave`, or `uniswap`" }, { "name": "sort_by", "value": "", "type": "query", "description": "Ranking metric: `apy` or `tvl_usd`. When sorted by `apy`, only pools with TVL >= $100k are included" }, { "name": "order", "value": "", "type": "query", "description": "Sort direction" }, { "name": "limit", "value": "", "type": "query", "description": "Results per page" }, { "name": "offset", "value": "", "type": "query", "description": "Pagination offset" } ], "auth": { "type": "bearer", "token": "{{bearerToken}}" } }, "docs": "List individual DeFi yield pools ranked by APY or TVL. Example: filter by protocol like `lido` or `aave` for pool-level yield data." } ] } ], "bundled": true }