Run SQL query
run_queryAnything the other tools do not answer: runs one read-only ClickHouse SELECT over Ironflow's Hyperliquid tables (hl.fills, hl.trades, hl.wallet_fills, hl.wallet_daily, hl.wallet_behavior, hl.market_hourly, hl.funding, hl.funding_payments, hl.mark_prices, hl.oracle_prices, hl.open_interest, hl.liquidations, hl.builder_fills, hl.transfers, hl.vault_operations). For volume, taker flow or liquidation totals per market over hours to months read hl.market_hourly, not hl.fills; call describe_data for columns. Aggregate in SQL: results are capped (1,000 rows keyless). Each query costs 10 credits. Keyless: last 24 hours, 5 s per query, 60 query seconds per hour per IP; a free key from https://ironflow.sh/key gives 30 days of history.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"sql": "<sql>"
},
"name": "run_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sql | Yes | One ClickHouse SELECT (or WITH ... SELECT) over hl.* tables, without a FORMAT clause | |
| max_rows | No | Most rows to return (default 200, capped by your tier) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rows | No | Rows as positional arrays | |
| stats | No | elapsed_ms, rows_read, bytes_read | |
| limits | No | Your tier's limits | |
| notice | No | A note from the API: how a market name was read, why data starts later than asked, or a next step such as a free key | |
| columns | No | Column names in row order | |
| row_count | No | Rows returned | |
| truncated | No | true when more rows existed than were returned | |
| column_types | No | ClickHouse types in row order | |
| budget_remaining_seconds | No | Query seconds left this hour |