MarketDeck docs
snapshot
Build a market snapshot for one coin or a batch of coins from Hyperliquid.
marketdeck snapshot is the canonical "what does the market look like for this coin right now" call. Every agent run, every analysis, every paper-trading entry signal eventually goes through this same builder so the data is consistent across surfaces.
Usage#
marketdeck snapshot <coin> [flags]
marketdeck snapshot batch <c1,c2,…> [flags]
Flags#
| Flag | What it does |
|---|---|
--no-cache | Force a fresh fetch. Skips the per-coin TTL cache so every HTTP round-trip happens for real. |
--compact | Omit candles, l2Book, and fundingHistory from the JSON output. Use when you only want the headline metrics. |
--meta-only | Return just the metaAndAssetCtxs entry — mark price, prev-day, funding, OI, … — and skip the heavy build. |
What you get#
The full payload includes (subject to flags):
meta— asset id, decimals, max leverage, dex (for HIP-3 builder coins).mid,markPrice,oraclePrice,dayBaseVlm,openInterest.candles— recent klines for several intervals.l2Book— top-of-book on the spot side.fundingHistory— recent funding payments.
Examples#
marketdeck snapshot BTC --format text
marketdeck snapshot ETH --no-cache --format json | jq .markPrice
marketdeck snapshot BTC --meta-only
marketdeck snapshot batch BTC,ETH,SOL --compact
Batch mode#
snapshot batch runs the per-dex metaAndAssetCtxs prefetch once per dex and then builds all per-coin snapshots in parallel. The result is a single envelope:
{ "items": [
{ "coin": "BTC", "snapshot": { … } },
{ "coin": "ETH", "snapshot": { … } },
{ "coin": "ZZZ", "error": "unknown coin" }
] }
Failures are surfaced per-coin; a single bad ticker does not abort the whole batch.
Caching#
Snapshots are cached on disk for a short TTL (typically 30 seconds) under ~/.cache/marketdeck/snapshots/. Pass --no-cache to bypass. The cache is keyed by (coin, dex); agent runs share the cache within a single tick so simultaneous agents on the same coin do not each pay a full set of HTTP round-trips.