Skip to main content

Getting Started with SQL Explorer

Updated on
Jun 25, 2026

Overview

SQL Explorer gives you direct SQL access to billions of rows of indexed blockchain data, without managing infrastructure. Query trades, orders, positions, liquidations, and more using standard SQL, all within the same platform you already use for RPC and Streams.

SQL Explorer is currently in Beta. We are actively expanding dataset coverage and adding new features based on user feedback.


Using AI Agents?

Install the Quicknode Skill to equip your agent with full knowledge of SQL Explorer and the broader Quicknode platform:

npx skills add quiknode-labs/blockchain-skills

For SQL query generation, download the machine-readable schema and include in your agent's context. See the Schema Reference for full details.

Why SQL Explorer

SQL Explorer enables flexible querying of indexed blockchain data using standard SQL. Instead of relying on predefined API endpoints, you can write custom queries directly against the underlying datasets.

Key characteristics:

  • No infrastructure to manage: Query blockchain data through SQL without running nodes, databases, or indexers
  • Full query flexibility: Write SQL queries with standard syntax including functions, subqueries, window functions, and joins
  • Built for scale: Queries execute against billions of rows using columnar storage with partition-aware optimization
  • Fully Integrated: Available alongside RPC, Streams, and other Quicknode products in the same platform

Features of SQL Explorer

SQL Explorer includes tools for querying, analyzing, and integrating blockchain data:


  • SQL Editor: In-browser editor with syntax highlighting and support for standard SQL, including subqueries, window functions, GROUP BY, and JOIN
  • Schema Browser: View table metadata including row counts, column names, data types, sort keys (⚡), and partition strategies. See the Schema Reference for full documentation
  • Pre-built Queries: Ready-to-use queries for common use cases across supported chains
  • Visualization: Generate charts with configurable axes, multi-series overlays, and hover tooltips
  • REST API Access: Execute queries programmatically via POST to https://api.quicknode.com/sql/rest/v1/query with API key authentication
  • Query Builder: Generate REST API calls (cURL) from the UI for any query
  • Saved Query Library: Save your frequently used queries for quick access
  • Execution Metrics:: View query time, rows returned, rows scanned, and bytes processed for each query

How to Access SQL Explorer

SQL Explorer is available through multiple access methods:

  • Dashboard: Interactive queries with visualization in your browser
  • REST API: Direct HTTP requests for programmatic access
  • SDK: Typed client for Node.js, Python, Rust, and Ruby applications
  • CLI: Terminal commands for scripts and quick queries

Using the Dashboard

The Quicknode Dashboard provides an interactive environment for building, testing, and visualizing SQL queries:

  1. Open SQL Explorer in your Quicknode dashboard
  2. Browse the Tables tab to explore available datasets, view schema details, or select a pre-built query from the Queries tab
  3. Write a new query or modify a pre-built query in the editor
  4. Click Run to execute your query
  5. View results in the Results tab or switch to Charts for visualization
  6. Click Save to store the query, or API to generate the corresponding REST request

Using the REST API

The REST API allows you to execute SQL queries programmatically.

SQL queries are executed via HTTP POST request to https://api.quicknode.com/sql/rest/v1/query using your Quicknode API key. Results are returned as JSON with query execution statistics.

Get the API Call from Dashboard:

After running a query in the SQL Explorer Dashboard, click API in the top to generate a ready-to-use cURL request with your query included.

Example Request:

curl -X POST 'https://api.quicknode.com/sql/rest/v1/query' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY' \
-d '{
"query": "SELECT time, validator, reward, block_number FROM hyperliquid_validator_rewards ORDER BY block_number DESC LIMIT 100",
"clusterId": "hyperliquid-core-mainnet"
}'

Example Response:

{
"meta": [
{
"name": "time",
"type": "DateTime64(6, 'UTC')"
}
],
"data": [
{
"time": "2026-03-30 16:24:00.058516",
"validator": "0xf8efb4cb844a8458114994203d7b0bfe2422a288",
"reward": 0.18548686,
"block_number": 940269912
},
{
"time": "2026-03-30 16:24:00.058516",
"validator": "0xeeee86f718f9da3e7250624a460f6ea710e9c006",
"reward": 0.50774076,
"block_number": 940269912
}
],
"rows": 100,
"rows_before_limit_at_least": 120,
"statistics": {
"elapsed": 0.073805665,
"rows_read": 71918,
"bytes_read": 5322148
}
}

Understanding the Response:

The API response contains the following fields:

  • meta: Array of column metadata with name and type for each column in the result set
  • data: Array of objects containing the actual query results, with each object representing one row
  • rows: Number of rows returned in this response
  • rows_before_limit_at_least: Total number of rows that matched the query before applying LIMIT (useful for pagination)
  • statistics: Performance metrics for query optimization:
    • elapsed: Total query execution time in seconds
    • rows_read: Total number of rows scanned during execution (may be more than returned rows due to filtering)
    • bytes_read: Total data scanned in bytes (helpful for understanding query cost and optimization opportunities)

Use the statistics fields to understand query performance and optimize scans. Lower rows_read and bytes_read generally indicate more efficient queries.

See the REST API Overview guide for detailed instructions, authentication setup, and examples.

Using the SDK

The Quicknode SDK provides typed access to SQL Explorer from Node.js, Python, Rust, and Ruby. Use the sql client to run queries and retrieve schemas.

Example (Node.js):

import { QuicknodeSdk } from "@quicknode/sdk";

const qn = new QuicknodeSdk();

// Run a SQL query
const resp = await qn.sql.query(
"SELECT action_type, user FROM hyperliquid_system_actions LIMIT 3",
"hyperliquid-core-mainnet"
);
console.log(`${resp.rows} rows, ${resp.credits} credits`);

// Get the schema for a cluster
const schema = await qn.sql.getSchema("hyperliquid-core-mainnet");

See the SDK documentation for installation and authentication setup.

Using the CLI

The Quicknode CLI provides terminal commands for SQL queries and schema retrieval.

Run a query:

qn sql query "SELECT * FROM hyperliquid_trades LIMIT 10" --cluster hyperliquid-core-mainnet

Get the schema:

qn sql schema --cluster hyperliquid-core-mainnet

See the CLI documentation for installation and authentication setup.


Result Limit & Pagination

Query results are limited to 1000 rows per request. For larger result sets, use LIMIT and OFFSET clauses to paginate through results. See the Pagination guide for complete examples and best practices.


Get Started with Queries

Explore the SQL Explorer Cookbook for 40+ pre-built queries covering wallet activity, validator rewards, liquidations, and more. Each example includes customizable parameters and ready-to-use code in SQL, cURL, TypeScript, and Python.

Billing

SQL Explorer uses API credits from your existing Quicknode account. Credit usage is calculated server-side based on the resources consumed by each query:

  • Query execution time: longer-running queries cost more, with a progressive rate for queries exceeding 250ms and 2 seconds
  • Data scanned: queries that scan more bytes from disk are charged accordingly
  • Base fee: every query has a minimum credit charge to cover fixed infrastructure costs

Each API response includes the credit cost in the X-Credits response header, along with execution statistics (elapsed, rows_read, bytes_read) in the response body so you can monitor and optimize query costs.

Tips to reduce credit usage:

  • Filter on user when possible - this leverages pre-sorted projections for fast lookups
  • Use LIMIT to cap result size
  • Run EXPLAIN to preview the query plan before executing expensive queries

You can view your credit usage in the Quicknode Dashboard.

Supported Networks

SQL Explorer currently supports the following chains with additional chains coming soon:

ChainNetworkTablesTotal RowsCoverage
HyperliquidMainnetView SchemaBillions+Trades, orders, fills, funding, order book diffs, perpetual markets, spot markets, blocks, transactions, system actions, builder activity, staking, ledger, clearinghouse states, oracle prices, sub-accounts, vault equities, agents, bridge events, display names, asset transfers, TWAP statuses, referrals, validator rewards, delegator rewards, summaries, metrics, and more

Available Schema

SQL Explorer provides comprehensive coverage of Hyperliquid HyperCore with billions of rows of indexed data across multiple tables including trades, orders, fills, funding, market data, and more.


View Complete Schema

Browse the complete schema reference for column definitions, data types, sort keys, and partitioning details. The schema is continuously updated and optimized for querying.

Frequently Asked Questions

What is Quicknode SQL Explorer?
SQL Explorer provides direct SQL access to indexed blockchain data without requiring any infrastructure. You can query billions of rows of on-chain data using standard SQL syntax and receive results in seconds.
How do I access SQL Explorer?
You can access SQL Explorer through the Quicknode Dashboard for interactive queries, the REST API for programmatic access, the Quicknode SDK for typed client access from Node.js, Python, Rust, and Ruby, or the Quicknode CLI for terminal commands.
Which chains are supported?
SQL Explorer currently supports Hyperliquid Mainnet with billions of rows of indexed data. Additional chains are coming soon.
What data tables are available?
For Hyperliquid, SQL Explorer provides 37 tables covering trading data (trades, orders, fills, order book diffs), market data (perpetual/spot markets, market contexts), funding, infrastructure (blocks, transactions, system actions), builder activity, staking, ledger updates, clearinghouse states, oracle prices, referrals, sub-accounts, vault equities, agents, bridge events, display names, hourly metrics, daily metrics, and more.
Can I create my own queries?
Yes. SQL Explorer supports standard SQL syntax including functions, subqueries, window functions, GROUP BY, and JOINs. You can write any SQL query to access the data you need.
How does programmatic access work?
SQL queries can be executed programmatically via the REST API (HTTP POST to https://api.quicknode.com/sql/rest/v1/query), the Quicknode SDK (typed clients for Node.js, Python, Rust, Ruby), or the Quicknode CLI (qn sql query command). All methods use your Quicknode API key for authentication and return structured results with query statistics.
How do I retrieve more than 1000 rows?
Query results are limited to 1000 rows per request. To retrieve larger result sets, use LIMIT and OFFSET clauses in your SQL queries to paginate through results. For example, use LIMIT 100 OFFSET 0 for rows 1-100, then LIMIT 100 OFFSET 100 for rows 101-200. The rows_before_limit_at_least field in the response tells you the total number of matching rows. See the Pagination guide for complete examples and best practices.
How does billing work?
SQL Explorer uses API credits from your existing Quicknode account. Credits are calculated server-side based on query execution time, data scanned, and a base fee per query. The exact credit cost is returned in the X-Credits response header with each query. The statistics object in each API response shows execution time, rows read, and bytes scanned so you can optimize queries and reduce costs. Use time-range filters and user filters to minimize data scanned.
Is SQL Explorer production ready?
SQL Explorer is currently in Beta and available to all Quicknode users. We are actively expanding dataset coverage and adding new features based on user feedback.
How do I optimize my queries?
Use the schema browser to identify sort keys (marked ⚡) and partition strategies. Write partition-aware queries that filter on time ranges to skip irrelevant partitions. Hyperliquid tables partition monthly by toYYYYMM(block_time). Every query returns execution stats (query time, result rows, rows read, bytes read) so you can optimize iteratively.

We ❤️ Feedback!

If you have any feedback or questions about this documentation, let us know. We'd love to hear from you!

Share this doc