Skip to content
OnchainQueries

OQ — A00 · APIs & CLI

There is no privileged internal path. The CLI submits SQL, polls status, attaches to running queries and cancels them over the public control API — so anything the CLI can do, your code can do.

Commands
5
Parameter types
13
Transports
2
Request limit
2 MiB
OQ — A01Lifecycle

OnchainQueries assigns every query an ID. Keep it and you can walk away — the server-side query keeps running whether or not your shell does.

a full session
query login query sql \  --file trades.sql \  --param 'start_time:timestamp=2026-08-01 00:00:00' \  --engine auto \  --transport parquet \  --output ./results query status 8f31c2query attach 8f31c2 --output ./resultsquery cancel 8f31c2
queued
Accepted and waiting to run
running
Executing
complete
Results are ready
failed
Execution ended with an error
cancelling
Cancellation was requested
cancelled
Execution was cancelled
expired
Query or result no longer available

Typed parameters, checksum-verified parts, and a manifest you can assert on in CI.