@vike-io/cli 0.20.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.21.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 80498fd: `hl orders --view book`: one Hyperliquid symbol's order book at one instant, price levels best first (`--symbol`, `--at`, `--side both|bid|ask`, `--levels`, default 100, max 1000). `--market perp|spot` on the `open`, `clusters` and `book` views (a spot symbol is a pair, `HYPE/USDC`); `--cohort-axis` and `--cohort` on `open` too, whose rows now carry the owner's `sizeCohort`, `pnlCohort` and `pnlCumUsd`. `stream --filter kind=resting|trigger` is sent as one value (the `hl.order_walls` filter); the `vike-stream` skill names the walls' new fields (`kind`, `dex`, `source`, `trigger_type` / `trigger_px`, and on `disappeared` the `outcome` and `filled_usd`).
8
+
3
9
  ## 0.20.0
4
10
 
5
11
  ### Minor Changes
package/README.md CHANGED
@@ -56,7 +56,7 @@ The key is read from `VIKE_API_KEY` first, then from `~/.vike/config.json`
56
56
  | **Polymarket up/down families** (archive) | The same archive cut per market family, `asset=btc/tenor=5m` and so on, with an `asset=other/tenor=other` catch-all | free key | [polymarket-updown-markets](https://vike.io/data/polymarket-updown-markets) |
57
57
  | **Polymarket API** `/v1/polymarket` | Markets, the raw event and trade tape (about 30 days back), order-book snapshots, candles, on-chain settlements | free key | [polymarket](https://vike.io/data/polymarket) |
58
58
  | **Hyperliquid cohorts** `/v1/hyperliquid/coins/{coin}/cohort-metrics` | Long vs short per cohort, hourly, up to 8,760 hours in one request. Axes: `size` (account value, shrimp to 4x whale), `tier` (position notional), `pnl` (realized-PnL percentile), `pnl_abs` (PnL in dollars). `labelBasis=point_in_time` grades each hour with the label it had then (from 2026-04-07). | free key | [hl-cohorts](https://vike.io/data/hl-cohorts) |
59
- | **Hyperliquid API** `/v1/hyperliquid` | Trader rankings and leaderboards, 5-minute position snapshots kept for a year, wallet fills, funding and ledger, liquidations (inferred from snapshots), builders, candles since the start of 2026; closed bars also stream live as the `hl.candles` channel of `wss://stream.vike.io/v1/stream/hl` | free key | [hyperliquid](https://vike.io/data/hyperliquid) |
59
+ | **Hyperliquid API** `/v1/hyperliquid` | Trader rankings and leaderboards, 5-minute position snapshots kept for a year, wallet fills, funding and ledger, standing orders and the order book (perp and spot), liquidations (inferred from snapshots), builders, candles since the start of 2026; closed bars also stream live as the `hl.candles` channel of `wss://stream.vike.io/v1/stream/hl` | free key | [hyperliquid](https://vike.io/data/hyperliquid) |
60
60
  | **Predict.fun API** `/v1/predictfun` | Prediction markets on BNB Chain: a venue overview, the market catalog with 24h volume, one market's outcomes and stats, the newest recorded order book (the ~1,000 most active open markets), every on-chain fill with the wallet behind it, per-wallet positions and P&L, and a leaderboard of every wallet by realized and unrealized P&L, volume and fills | free key | [predictfun](https://vike.io/predictfun) |
61
61
  | **Event streams** `wss://stream.vike.io/v1/stream/<path>` | Live events with a resume cursor on four paths: `hl` (fills, liquidations, positions, top-10 positions per coin, closed trades, liquidation risk, order walls, candles, TWAPs, ledger, leverage changes, funding), `hl-cohorts` (cohort flow, indices, cohort bias, cohort leverage), `onchain` (transfers on eth, bsc, base, hyperevm), `polymarket` (trades, wallet position changes, resolutions, price moves, new markets). `vike-data stream` reads them; `vike-data stream info` lists every channel and filter. Connections are not counted against the hourly limit. | free key | [stream channels](https://vike.io/docs/data/reference/stream-channels) |
62
62
  | **On-chain API** `/v1/onchain` | Wallet summaries, transactions, counterparties, PnL, address labels with per-source provenance, token holders and transfers. Ethereum on every route, BNB Chain on the wallet and token-flow routes, Base on token transfers. | free key | [onchain](https://vike.io/data/onchain) |
@@ -144,7 +144,7 @@ Every data command is one `tools/call` to the MCP server. `vike-data <group> --h
144
144
  | `vike-data wallet` | `summary`, `transactions` (`txs`), `compare`, `trace`, `batch`, `counterparties`, `pnl-history`, `balances`, `ens`, `discover`, `first-funder`, `exchange-usage` | `wallet_summary`, `wallet_transactions`, `wallet_compare`, `wallet_trace`, `wallet_batch_labels`, `wallet_counterparties`, `wallet_pnl_history`, `wallet_token_balances`, `wallet_ens`, `wallet_discover`, `wallet_first_funder`, `wallet_exchange_usage` |
145
145
  | `vike-data labels <address>` | multi-source label provenance for one wallet | `wallet_label_provenance` |
146
146
  | `vike-data perp` | `top-traders`, `find-position` (Hyperliquid); `funding`, `spreads` (cross-venue funding rates and perp-vs-perp price gaps) | `hl_perp_top_traders`, `hl_position_match`, `perp_funding`, `perp_spreads` |
147
- | `vike-data hl` | `cohort-metrics <symbol>`, `segments`, `wallet <address>`, `wallet-activity <address>`, `wallet-trades <address>`, `leaderboard`, `liquidations`, `market`, `orders`, `twaps`, `ledger`, `leverage-changes`, `stats`, `hype-holders`, `builders`, `vaults`, `vault <vault>`, `archive`; a tool with several views takes `--view` | `hl_cohort_metrics`, `hl_segments`, `hl_wallet`, `hl_wallet_activity`, `hl_wallet_trades`, `hl_leaderboard`, `hl_liquidations`, `hl_market`, `hl_orders`, `hl_twaps`, `hl_ledger`, `hl_leverage_changes`, `hl_stats`, `hl_hype_holders`, `hl_builders`, `hl_vaults`, `hl_vault`, `hl_archive` |
147
+ | `vike-data hl` | `cohort-metrics <symbol>`, `segments`, `wallet <address>`, `wallet-activity <address>`, `wallet-trades <address>`, `leaderboard`, `liquidations`, `market`, `orders` (`--view open`: resting orders with each owner's size and PnL cohort; `wallet`; `clusters`; `book`: the order book at one instant; `--market spot` for a spot pair such as `HYPE/USDC`), `twaps`, `ledger`, `leverage-changes`, `stats`, `hype-holders`, `builders`, `vaults`, `vault <vault>`, `archive`; a tool with several views takes `--view` | `hl_cohort_metrics`, `hl_segments`, `hl_wallet`, `hl_wallet_activity`, `hl_wallet_trades`, `hl_leaderboard`, `hl_liquidations`, `hl_market`, `hl_orders`, `hl_twaps`, `hl_ledger`, `hl_leverage_changes`, `hl_stats`, `hl_hype_holders`, `hl_builders`, `hl_vaults`, `hl_vault`, `hl_archive` |
148
148
  | `vike-data candles` | `hl <symbol>` (Hyperliquid perp or spot, from executed fills; `--view export`, or `--view latest` for the newest bar of every symbol), `polymarket <token_id>` (one outcome token); live bars: `stream hl --channel hl.candles` | `hl_ohlcv`, `polymarket_ohlcv` |
149
149
  | `vike-data polymarket` (`pm`) | `markets`, `market <condition_id>`, `wallet <address>`, `smart-money`, `leaderboard`, `market-trades <condition_id>`, `tape`, `orderbook <token_id>`, `market-stats <token_id>`, `settlement <condition_id>`, `settlements`, `chainlink-prices <symbol>` (the Chainlink prices the crypto up/down markets resolve on), `archive` | `polymarket_markets`, `polymarket_market_detail`, `polymarket_wallet`, `polymarket_smart_money`, `polymarket_leaderboard`, `polymarket_market_trades`, `polymarket_tape`, `polymarket_orderbook`, `polymarket_market_stats`, `polymarket_settlement`, `polymarket_settlements_bulk`, `polymarket_chainlink_prices`, `polymarket_archive` |
150
150
  | `vike-data predictfun` (`pf`) | `overview`, `markets`, `market <market_id>`, `orderbook <market_id>`, `market-trades <market_id>`, `wallet <address>` (positions and P&L), `wallet-trades <address>`, `wallet-flows <address>` (USDT deposits and withdrawals), `leaderboard` | `predictfun_overview`, `predictfun_markets`, `predictfun_market_detail`, `predictfun_market_book`, `predictfun_market_trades`, `predictfun_wallet_positions`, `predictfun_wallet_trades`, `predictfun_leaderboard` |
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.20.0",
6
+ "version": "0.21.0",
7
7
  "description": "CLI, agent skills and MCP client for the free Vike Data API: a Polymarket full-L2 order-book archive in Parquet, Hyperliquid positions, fills and cohorts, and labelled Ethereum/BNB wallets",
8
8
  "type": "module",
9
9
  "main": "src/index.js",
@@ -108,7 +108,7 @@ Pick by the question, then read the named skill for the recipe and the traps. If
108
108
  | Liquidation risk by symbol, liquidation heatmap, recent or live liquidations | `vike-data hl liquidations`; `stream hl --channel hl.liq_risk hl.liquidations` | `vike-hl-liquidation-radar` |
109
109
  | Builder codes: fees, users, routed share | `vike-data hl builders` | `vike-hl-builder-intel` |
110
110
  | HL open interest, vaults | `vike-data hl market`, `hl vaults`, `hl vault` | this skill |
111
- | HL orders and order clusters, TWAPs, the ledger, leverage changes, closed trades, venue stats, HYPE holders, the Parquet archive | `vike-data hl orders`, `hl twaps`, `hl ledger`, `hl leverage-changes`, `hl wallet-trades`, `hl stats`, `hl hype-holders`, `hl archive` | this skill |
111
+ | HL orders, order clusters and the order book (perp, or spot with `--market spot`), TWAPs, the ledger, leverage changes, closed trades, venue stats, HYPE holders, the Parquet archive | `vike-data hl orders`, `hl twaps`, `hl ledger`, `hl leverage-changes`, `hl wallet-trades`, `hl stats`, `hl hype-holders`, `hl archive` | this skill |
112
112
  | A name, symbol, address, ENS name or polymarket.com link → what it is | `vike-data search <q>` / `search` | this skill |
113
113
  | Candles: Hyperliquid perp/spot (history, or the newest bar of every symbol), Polymarket outcome token; live HL bars | `vike-data candles hl` (`--view latest`), `candles polymarket`; `stream hl --channel hl.candles` | `vike-candles` |
114
114
  | Trending Polymarket markets (by 24h volume) | `vike-data polymarket markets` / `polymarket_markets` | `vike-polymarket-markets` |
@@ -223,7 +223,7 @@ These two have no command: `vike-data call perp_open_interest --args '{"symbol":
223
223
  | `hl_segments` (`hl segments`) | the cohort labels (`--view cohorts`), one cohort now (`summary`), the symbol x cohort board (`heatmap`), one cohort hour by hour (`history`) |
224
224
  | `hl_leaderboard` (`hl leaderboard`) | traders on 20 metrics; `--min-win-rate` is a FRACTION here (0.6), a percent in `perp top-traders` |
225
225
  | `hl_liquidations`, `hl_market`, `hl_builders`, `hl_vaults`, `hl_vault` | liquidations / risk / heatmap; open interest, symbol series, positions, indices, large fills, an hourly panel of up to 64 symbols; builder codes; vaults |
226
- | `hl_orders`, `hl_twaps`, `hl_ledger`, `hl_leverage_changes` | resting orders at one instant, one wallet's orders, order clusters; the cross-wallet feeds (follow one with `--order asc` and each `nextCursor`, stop on an empty page) |
226
+ | `hl_orders`, `hl_twaps`, `hl_ledger`, `hl_leverage_changes` | resting orders at one instant (each with its owner's `sizeCohort`, `pnlCohort`, `pnlCumUsd`; `--cohort-axis` + `--cohort` keep one cohort's), one wallet's orders, order clusters, the order book (`--view book`: price levels best first, `--side`, `--levels`); `open`, `clusters` and `book` read the perp books unless `--market spot` (a pair, `HYPE/USDC`); the cross-wallet feeds (follow one with `--order asc` and each `nextCursor`, stop on an empty page) |
227
227
  | `hl_wallet_trades`, `hl_stats`, `hl_hype_holders`, `hl_archive` | one wallet's closed trades; hourly venue equity / open interest / volume; HYPE holders; the daily Parquet files: `fills`, `positions`, and from 2026-05-01 `positions_hourly`, `cohorts_hourly`, `wallets_hourly` (`--view url` = a 7-day link) |
228
228
 
229
229
  Every `hl` command takes `--view` (the first view is the default) and only the flags that view uses: a flag the view does not take is refused by name, not ignored.
@@ -22,7 +22,7 @@ vike-data hl liquidations --view heatmap --symbol $S --bins 20 --json # where
22
22
  vike-data hl market --view large_fills --symbol $S --json # the newest fills of $50k+ (at most 200)
23
23
  ```
24
24
 
25
- Optional: `hl orders --view clusters --symbol $S` (standing orders bucketed around the mid, `--range-pct`, `--step-bps`), `hl market --view size_breakdown --symbol $S` (position-size tiers with `value_close_to_liquidation`), `hl liquidations --view fills --symbol $S --limit 20` (the latest liquidations).
25
+ Optional: `hl orders --view clusters --symbol $S` (standing orders bucketed around the mid, `--range-pct`, `--step-bps`; `--cohort-axis size --cohort whale` for one cohort's), `hl orders --view book --symbol $S --levels 20` (the order book, price levels best first; the spot book with `--market spot --symbol HYPE/USDC`), `hl market --view size_breakdown --symbol $S` (position-size tiers with `value_close_to_liquidation`), `hl liquidations --view fills --symbol $S --limit 20` (the latest liquidations).
26
26
 
27
27
  ## Reading each section
28
28
 
@@ -20,7 +20,7 @@ vike-data hl wallet-activity $W --view ledger --limit 50 --json # deposits, w
20
20
  vike-data hl liquidations --wallet $W --json # has it been liquidated
21
21
  ```
22
22
 
23
- Optional, by question: `hl wallet-activity $W --view fills --symbol BTC` (raw fills), `--view builders` (which front-ends it routes through), `hl orders --view wallet --address $W` (what became of its orders, 7 days by default, at most 30), `hl twaps --wallet $W`, `hl leverage-changes --wallet $W`, `hl market --view positions --wallet $W` (open positions with liquidation price). `--window` is `1d|7d|30d|all` (default `all`); page with `nextCursor` -> `--cursor`.
23
+ Optional, by question: `hl wallet-activity $W --view fills --symbol BTC` (raw fills), `--view builders` (which front-ends it routes through), `hl orders --view wallet --address $W` (what became of its orders, 7 days by default, at most 30), `hl orders --view open --wallet $W` (its orders resting now; `--market spot` for its spot orders), `hl twaps --wallet $W`, `hl leverage-changes --wallet $W`, `hl market --view positions --wallet $W` (open positions with liquidation price). `--window` is `1d|7d|30d|all` (default `all`); page with `nextCursor` -> `--cursor`.
24
24
 
25
25
  ## Reading
26
26
 
@@ -32,6 +32,12 @@ channel the path does not serve is refused with `unknown_channel` and the list.
32
32
  `labels.tags` its trader tags. Filters `min_leverage` (a number) and `tag` (a list) exist on this channel only.
33
33
  - `hl.top_positions`: per coin of the top 50, the position that `entered`, `left` or `moved` within the top 10 (filter
34
34
  `event` takes ONE of those, `direction` one of `long` / `short`). The first capture sends all 10 of every coin as `entered`.
35
+ - `hl.order_walls`: perp orders of $1M or more that `appeared` in or `disappeared` from the 5-minute order snapshots.
36
+ `data.kind` is `resting` (a limit order) or `trigger` (a stop or take-profit not yet fired, with `trigger_type`
37
+ `sl` / `tp` / `trailing` and `trigger_px`); `dex` is `HL` or the HIP-3 dex, `source` the snapshot feed. A
38
+ `disappeared` says what happened: `outcome` (`filled`, `partially_filled`, `canceled`, `unknown`) and `filled_usd`;
39
+ it waits for the order's fills, up to ~12 minutes after the snapshot that found the order gone. Filters `side`,
40
+ `event` and `kind` take one value each.
35
41
  - `hl.closed_trades`: a finished round trip (entry and exit price, `realized_pnl`, `duration_seconds`), in batches
36
42
  every 30 minutes; unfiltered up to ~32,000 an hour (measured 2026-11-02): filter by `wallet` or `min_usd`.
37
43
  - `hl.cohort_leverage` (`hl-cohorts`): once an hour per cohort of one `axis`, `perp_bias` and `equity_exposure`
@@ -58,6 +64,9 @@ vike-data stream onchain --channel chain.transfers --filter chain=base --filter
58
64
  # Position changes at 20x or more, BTC and ETH (the wallet's leverage and liquidation price before the fill are in data)
59
65
  vike-data stream hl --channel hl.positions --filter coin=BTC,ETH --filter min_leverage=20
60
66
 
67
+ # BTC and ETH stops and take-profits of $1M+ that left the book, with whether they filled
68
+ vike-data stream hl --channel hl.order_walls --filter coin=BTC,ETH --filter kind=trigger --filter event=disappeared
69
+
61
70
  # Every round trip one wallet closes (a batch every 30 minutes)
62
71
  vike-data stream hl --channel hl.closed_trades --filter wallet=0x1111111111111111111111111111111111111111
63
72
 
@@ -70,7 +79,7 @@ vike-data stream polymarket --channel pm.trades --filter min_usd=10000 | jq -c '
70
79
 
71
80
  `--filter` applies to every `--channel` of the command; a key the channel does not take is refused by the server
72
81
  with the key's name. List keys (`wallet`, `coin`, `token`, `market`, `chain`, cohorts, ...) take comma-separated
73
- values and repeat; `side`, `direction`, `event`, `axis`, `move`, `role` take one value; `true` / `false` is sent as a yes/no (`contract=false`); `min_usd`, `min_amount`, `min_move`,
82
+ values and repeat; `side`, `direction`, `event`, `axis`, `move`, `role`, `kind` take one value; `true` / `false` is sent as a yes/no (`contract=false`); `min_usd`, `min_amount`, `min_move`,
74
83
  `min_leverage` take a number. Channels in one command must all take every key you pass (`min_leverage` and `tag` are `hl.positions` only). Channel fields and filter keys: https://vike.io/docs/data/reference/stream-channels
75
84
 
76
85
  ## Without a socket
@@ -184,13 +184,14 @@ export function registerHl(program) {
184
184
 
185
185
  addTool(hl, 'orders', {
186
186
  tool: 'hl_orders',
187
- desc: 'Standing orders: resting at one instant, one wallet\'s orders over a window, or one symbol\'s order clusters',
187
+ desc: 'Standing orders: resting at one instant (with the owner\'s cohorts), one wallet\'s orders over a window, one symbol\'s order clusters or its order book',
188
188
  options: [
189
- view(['open', 'wallet', 'clusters']),
190
- ['--symbol <s>', 'open: symbol and/or --wallet required; clusters: required'],
189
+ view(['open', 'wallet', 'clusters', 'book']),
190
+ ['--symbol <s>', 'open: symbol and/or --wallet required; clusters, book: required. With --market spot a pair, e.g. HYPE/USDC'],
191
+ ['--market <m>', 'open, clusters, book: perp (default) | spot'],
191
192
  ['--wallet <a>', 'open: one wallet\'s resting orders'],
192
193
  ['--address <a>', 'wallet: the wallet (required)'],
193
- ['--at <t>', 'open, clusters: ISO-8601 UTC instant (default the newest snapshot)'],
194
+ ['--at <t>', 'open, clusters, book: ISO-8601 UTC instant (default the newest snapshot)'],
194
195
  ['--oid <n>', 'open: one order id'],
195
196
  ['--order-type <t>', 'open: Limit | Stop Market | Stop Limit | Take Profit Market | Take Profit Limit | Trailing Stop Market'],
196
197
  ['--created-from <t>', 'open: placed at or after (ISO-8601 UTC)'],
@@ -200,8 +201,10 @@ export function registerHl(program) {
200
201
  ['--status <s>', 'wallet: open | filled | partially_filled | canceled_or_expired'],
201
202
  ['--step-bps <n>', 'clusters: bucket width in basis points (default 10)'],
202
203
  ['--range-pct <n>', 'clusters: half-width around the mid in percent (default 10)'],
203
- ['--cohort-axis <a>', 'clusters: size | pnl | pnl_abs'],
204
- ['--cohort <c>', 'clusters: one cohort label (current labels; not with --at)'],
204
+ ['--cohort-axis <a>', 'open, clusters: size | pnl | pnl_abs (default size)'],
205
+ ['--cohort <c>', 'open, clusters: one cohort label (with --at, the labels of the hour before that snapshot)'],
206
+ ['--side <s>', 'book: both (default) | bid | ask'],
207
+ ['--levels <n>', 'book: price levels per side, best first (default 100, max 1000)'],
205
208
  LIMIT, CURSOR,
206
209
  ],
207
210
  });
@@ -10,7 +10,7 @@ export const STREAM_PATHS = ['hl', 'hl-cohorts', 'onchain', 'polymarket'];
10
10
  const MAX_SUBSCRIPTIONS = 100; // per connection, the server's cap
11
11
  const IDLE_MS = 60_000; // the server pings every 15 s: a minute of silence is a dead connection
12
12
  const NUMBER_KEYS = new Set(['min_usd', 'min_amount', 'min_move', 'min_leverage']);
13
- const ONE_VALUE_KEYS = new Set(['side', 'direction', 'event', 'axis', 'move', 'role']); // every other key is a list
13
+ const ONE_VALUE_KEYS = new Set(['side', 'direction', 'event', 'axis', 'move', 'role', 'kind']); // every other key is a list
14
14
  // No channel list here: the server decides which channels a path serves (`stream info` lists them) and refuses
15
15
  // an unknown one with `unknown_channel`.
16
16
  const FATAL_ERRORS = new Set(['bad_subscription', 'unknown_channel', 'rate_limited']);