メインコンテンツへスキップ

Quicknode CLI Examples

更新日:
Jul 13, 2026

概要

These examples assume you installed qn and authenticated with qn auth login. If you have not set up the CLI yet, start with the CLI Overview. For install options, authentication order, output formats, and confirmation behavior, see the CLI Overview.

使用方法 --format json when command output will be read by a script. See Output for all supported formats.

Copy the commands below into your terminal and replace example IDs, labels, URLs, and addresses with values from your account.

Auth

For API key setup and credential precedence, see Authenticate.

qn auth login
qn auth whoami
qn auth status
qn auth logout

Tooling Access and RPC

You can use qn rpc call to send JSON-RPC requests to the account's Tooling Access endpoint; the CLI mints the required session JWT automatically. Enable Tooling Access first with qn tooling-access enable (requires an admin role); the first qn rpc call prompts to enable it when it is off.

qn tooling-access status
qn tooling-access enable # idempotent; requires an admin role
qn tooling-access disable

Pass params as a positional JSON array, a named JSON object, from a file (--params-file/-f), or from stdin (-):

# No params
qn rpc call eth_blockNumber

# Positional params (JSON array)
qn rpc call eth_getBalance '["0xabc...", "latest"]'

# Named params (JSON object)
qn rpc call eth_call '{"to":"0x...","data":"0x..."}'

# Params from a file
qn rpc call eth_call --params-file params.json
qn rpc call eth_call -f params.json

# Params from stdin
echo '["0xabc...", "latest"]' | qn rpc call eth_getBalance -
cat params.json | qn rpc call eth_call -f -

Select a network, list the supported networks, or route a call to a custom endpoint URL:

qn rpc call eth_getBlockByNumber '["latest", false]' --network base-mainnet
qn rpc list-networks
qn rpc call eth_blockNumber --endpoint-url https://my-endpoint.quicknode.pro/token

Set a default endpoint URL for RPC calls in your config file:

[rpc]
endpoint_url = "https://my-endpoint.example/rpc"

エンドポイント

qn endpoint list --limit 20
qn endpoint list --network ethereum-mainnet --status active
qn endpoint show 123
qn endpoint urls 123
qn endpoint logs 123 --from 1h --to now --limit 50
qn endpoint metrics 123 --metric method_calls_over_time --period day

Create and lifecycle commands change endpoint state:

These commands prompt before acting when confirmation is required. See Confirmations for prompt-safe usage.

qn endpoint create --chain ethereum --network mainnet
qn endpoint pause 123
qn endpoint resume 123
qn endpoint archive 123

Endpoint tags

Tag add, rename, remove, and delete commands change endpoint metadata.

qn endpoint tag list
qn endpoint tag add 123 --label production
qn endpoint tag remove 123 12
qn endpoint tag rename 12 --label mainnet-production
qn endpoint tag delete 12

Endpoint security

Token, referrer, IP allowlist, and request filter commands can change endpoint access rules. Review Authenticate before using these in scripts.

qn endpoint security show 123
qn endpoint security options 123
qn endpoint security token create 123
qn endpoint security token delete 123 9
qn endpoint security referrer add 123 --referrer https://example.com
qn endpoint security referrer remove 123 9
qn endpoint security ip add 123 --ip 203.0.113.10
qn endpoint security ip remove 123 9
qn endpoint security request-filter add 123 --method eth_getBalance --method eth_blockNumber
qn endpoint security request-filter remove 123 9

Endpoint rate limits

Rate limit set and delete commands change endpoint traffic controls.

qn endpoint rate-limit get 123
qn endpoint rate-limit set 123 --rps 100 --rpm 5000
qn endpoint rate-limit delete-override 123 9
qn endpoint rate-limit method-list 123
qn endpoint rate-limit method-create 123 --interval minute --method eth_getLogs --rate 120
qn endpoint rate-limit method-delete 123 9

Bulk endpoint operations

Bulk operations can change multiple endpoints in one command.

qn endpoint bulk pause 123 456 789
qn endpoint bulk resume 123 456 789
qn endpoint bulk tag add --label production 123 456
qn endpoint bulk tag remove --tag-id 12 123 456

チーム

Team create, membership, endpoint assignment, and delete commands change account configuration.

qn team list
qn team show 7
qn team endpoints 7
qn team create --name "Data Platform"
qn team set-endpoints 7 123 456
qn team member invite 7 --email teammate@example.com --role viewer
qn team member remove 7 42
qn team delete 7

Usage, metrics, chains, and billing

qn usage summary --from 7d
qn usage by-endpoint --from 7d
qn usage by-chain --from 7d
qn usage by-tag --from 7d
qn metrics account --period day --metric credits_over_time
qn metrics endpoint 123 --period day --metric method_calls_over_time
qn chain list
qn chain credits ethereum
qn billing invoices
qn billing payments

ストリーム

qn stream list --limit 20
qn stream show 123
qn stream enabled-count
qn stream test-filter \
--network ethereum-mainnet \
--dataset block \
--block 17811625 \
--filter-file filter.js

Create and lifecycle commands change Stream state:

These commands prompt before acting when confirmation is required. See Confirmations.

qn stream create \
--name blocks \
--network ethereum-mainnet \
--dataset block \
--start 17811625 \
--end=-1 \
--region usa-east \
--webhook https://example.com/webhook

qn stream pause 123
qn stream activate 123
qn stream delete 123

Webhook

qn webhook list --limit 20
qn webhook show 123
qn webhook enabled-count

Create and lifecycle commands change Webhook state:

These commands prompt before acting when confirmation is required. See Confirmations.

qn webhook create \
--name "wallet alerts" \
--network ethereum-mainnet \
--url https://example.com/webhook \
--template evm-wallet \
--wallet 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

qn webhook pause 123
qn webhook activate 123 --start-from latest
qn webhook delete 123

キーバリューストア

Sets store a single value by key:

Write and delete commands change KV data.

qn kv set put mykey myvalue
qn kv set get mykey
qn kv set ls
qn kv set delete mykey

Lists store ordered values under a key:

qn kv list create allowlist 0xabc 0xdef
qn kv list append allowlist 0x123
qn kv list contains allowlist 0xabc
qn kv list get allowlist
qn kv list delete allowlist

SQL Explorer

Run SQL queries against indexed blockchain data:

qn sql query "SELECT * FROM hyperliquid_trades LIMIT 10" --cluster hyperliquid-core-mainnet
qn sql query "SELECT action_type, user FROM hyperliquid_system_actions LIMIT 5" --cluster hyperliquid-core-mainnet
qn sql query "SELECT * FROM hyperliquid_trades LIMIT 100" --cluster hyperliquid-core-mainnet --format json

Retrieve table schemas:

qn sql schema --cluster hyperliquid-core-mainnet
qn sql schema --cluster hyperliquid-core-mainnet --format json

Global flags

For credentials in CI, use --config-file or pass --api-key from a secret store. See Authenticate.

qn endpoint list --format json
qn endpoint list --wide
qn endpoint list --no-color
qn endpoint list --verbose
qn --config-file ./qn.toml endpoint list
qn --api-key YOUR_API_KEY endpoint list
qn completions zsh
このドキュメントを共有する