@vike-io/cli 0.16.0 → 0.16.1

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,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.16.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 537b522: Skills for four new live stream channels (the server serves them from stream.vike.io; the CLI keeps no channel list, so `stream`, `stream check` and `stream events` take them as they are): `hl.top_positions` and `hl.closed_trades` (path `hl`), `hl.cohort_leverage` (path `hl-cohorts`) and `pm.positions` (path `polymarket`), and the new `leverage`, `liquidation_px` and `labels.tags` of `hl.positions` with its `min_leverage` and `tag` filters.
8
+
9
+ - `vike-stream`: the channel table, what each new channel sends, its filters and volume, examples, and when each starts sending.
10
+ - `vike-hl-trader-profile` (`hl.closed_trades` by wallet), `vike-hl-cohort-positioning` (`hl.cohort_leverage`, `hl.top_positions`), `vike-hl-liquidation-radar` (`hl.positions` with `min_leverage`), `vike-pm-market-diligence`, `vike-polymarket-trader` and `vike-polymarket-smart-money` (`pm.positions` by market or wallet), the umbrella routing and the README.
11
+ - Fix: `vike-data stream ... --filter min_leverage=20` sent a list (`["20"]`), which the server refuses; it is a number now, like `min_usd`.
12
+
3
13
  ## 0.16.0
4
14
 
5
15
  ### 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 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) |
57
57
  | **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) |
58
58
  | **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
- | **Event streams** `wss://stream.vike.io/v1/stream/<path>` | Live events with a resume cursor on four paths: `hl` (fills, liquidations, positions, liquidation risk, order walls, candles, TWAPs, ledger, leverage changes, funding), `hl-cohorts` (cohort flow, indices, cohort bias), `onchain` (transfers on eth, bsc, base, hyperevm), `polymarket` (trades, 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) |
59
+ | **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) |
60
60
  | **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) |
61
61
 
62
62
  Direct links that need no key:
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.16.0",
6
+ "version": "0.16.1",
7
7
  "description": "CLI, agent skills and MCP client for the free Vike Data API: a Polymarket full-L2 order-book archive in Parquet (CC BY 4.0), Hyperliquid positions, fills and cohorts, and labelled Ethereum/BNB wallets",
8
8
  "type": "module",
9
9
  "main": "src/index.js",
@@ -123,7 +123,7 @@ Pick by the question, then read the named skill for the recipe and the traps. If
123
123
  | Find Polymarket markets by slug, or one by condition_id | `vike-data polymarket markets --view search --query btc-updown` / `--view market --condition-id 0x...` | this skill |
124
124
  | Alerts: create / list / edit / delete / events (transfer and Hyperliquid) | `vike-data alerts ...` / `alerts_*` | `vike-alerts-setup` |
125
125
  | Alert delivery to an HTTPS webhook | `vike-data alerts register-webhook`, `test-webhook`, `rotate-secret` | `vike-alerts-webhook` |
126
- | Live events: HL fills, liquidations, positions, candles, TWAPs, ledger, leverage, funding, cohort flow and bias; on-chain transfers; Polymarket trades and new markets | `vike-data stream <hl\|hl-cohorts\|onchain\|polymarket> --channel ...`; `stream info`, `check`, `events`, `connections` | `vike-stream` |
126
+ | Live events: HL fills, liquidations, positions, top-10 positions, closed trades, candles, TWAPs, ledger, leverage, funding, cohort flow, bias and leverage; on-chain transfers; Polymarket trades, position changes and new markets | `vike-data stream <hl\|hl-cohorts\|onchain\|polymarket> --channel ...`; `stream info`, `check`, `events`, `connections` | `vike-stream` |
127
127
  | A tool with no command of its own | `vike-data call <tool> --args '{...}'` | this skill |
128
128
  | Install, auth, errors, conventions | — | `vike-core` |
129
129
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: vike-hl-cohort-positioning
3
- description: Are whales, profitable wallets or losing wallets net long or short a Hyperliquid symbol right now - long/short notional per wallet cohort on the size and pnl ladders, the smart-money and whale indices, and the biggest individual positions, plus a live feed of the cohort lean. Use when the user asks "are whales long or short BTC" / "what are profitable Hyperliquid wallets doing on ETH" / "who is long SOL on Hyperliquid" / "Hyperliquid positioning" / "net long or short by wallet size".
3
+ description: Are whales, profitable wallets or losing wallets net long or short a Hyperliquid symbol right now - long/short notional per wallet cohort on the size and pnl ladders, the smart-money and whale indices, and the biggest individual positions, plus live feeds of the cohort lean, cohort leverage and the top-10 positions per coin. Use when the user asks "are whales long or short BTC" / "what are profitable Hyperliquid wallets doing on ETH" / "who is long SOL on Hyperliquid" / "Hyperliquid positioning" / "net long or short by wallet size".
4
4
  allowed-tools: Bash(vike-data:*)
5
5
  ---
6
6
 
@@ -41,7 +41,18 @@ vike-data stream hl-cohorts --channel hl.cohort_bias --filter coin=BTC --filter
41
41
  vike-data stream hl-cohorts --channel hl.indices --filter coin=BTC,ETH --filter index=smi,wsi # only when an index crosses -0.10 / +0.10
42
42
  ```
43
43
 
44
- `hl.cohort_bias` covers the 50 coins with the most open value; a `cohort` belongs to one axis (`3x smart` with `axis=size` matches nothing). For a stored rule: `vike-data alerts create --type hl_cohort_bias --index smi ...` (see `vike-alerts-setup`).
44
+ `hl.cohort_bias` covers the 50 coins with the most open value; a `cohort` belongs to one axis (`3x smart` with `axis=size` matches nothing).
45
+
46
+ ```bash
47
+ vike-data stream hl-cohorts --channel hl.cohort_leverage --filter axis=size --filter cohort=whale,shark # leverage per cohort, once an hour
48
+ vike-data stream hl --channel hl.top_positions --filter coin=BTC --filter event=entered # who enters the BTC top 10
49
+ ```
50
+
51
+ - **`hl.cohort_leverage`** is the hourly leverage of each cohort on its own money: `perp_bias` = (long - short) / account value, `equity_exposure` = (long + short) / account value (`null` when no wallet of the cohort has a positive account value), with `equity_covered_share` saying how much of the cohort's notional the counted wallets hold. Main-dex positions of native perp accounts, no coin and no wallet; the newest hour arrives at once, then one an hour (hour 08:00 at about 09:03). The same numbers as history: `hl segments --view history --axis size --cohort whale --include leverage`.
52
+ - **`hl.top_positions`**: per coin of the top 50, a position that `entered`, `left` or `moved` within the top 10, at each capture (about 12 minutes), with `rank`, `prev_rank`, `direction`, `size_usd`, `leverage`, `liquidation_price`. The first capture sends the whole top 10 of every coin as `entered` (with a `coin` filter: 10 events). The ranking is that of `hl market --view positions --sort size`, live.
53
+ - The three `stream hl-cohorts` lines above are alternatives: one key holds one connection per path, so a second `stream hl-cohorts` replaces the first (`4410`). Put channels in one command only when each takes every `--filter` key (`hl.cohort_leverage` has no `coin`), or give each its own key.
54
+
55
+ For a stored rule: `vike-data alerts create --type hl_cohort_bias --index smi ...` (see `vike-alerts-setup`).
45
56
 
46
57
  ## Answer template
47
58
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: vike-hl-liquidation-radar
3
- description: Where Hyperliquid liquidations are likely - which liquid symbols have the most open interest near liquidation, where one symbol's liquidation clusters sit around the mark, which liquidations just happened, and a live feed of positions entering the liquidation zone and of liquidations as they print. Use when the user asks "which coins are closest to a liquidation cascade" / "where are ETH liquidations clustered" / "liquidation heatmap" / "who just got liquidated on Hyperliquid" / "alert me to big liquidations".
3
+ description: Where Hyperliquid liquidations are likely - which liquid symbols have the most open interest near liquidation, where one symbol's liquidation clusters sit around the mark, which liquidations just happened, and a live feed of positions entering the liquidation zone, of liquidations as they print and of leveraged position changes. Use when the user asks "which coins are closest to a liquidation cascade" / "where are ETH liquidations clustered" / "liquidation heatmap" / "who just got liquidated on Hyperliquid" / "alert me to big liquidations".
4
4
  allowed-tools: Bash(vike-data:*)
5
5
  ---
6
6
 
@@ -33,6 +33,12 @@ vike-data stream hl --channel hl.liq_risk hl.liquidations --filter coin=BTC,ETH,
33
33
  - **`hl.liq_risk`**: a position of $100,000 or more announced once as its `liq_ratio` reaches 0.80 (0 = at entry, 1 = at the liquidation price), not again until it drops below 0.70 or closes. It comes with each position capture, about every 12 minutes. The first capture after the channel starts sends every position already in the zone with `prev: null` (about 300 on 2026-11-02); after that `prev: "out"` = just entered. `data` has `direction`, `liq_ratio`, `mark_price`, `entry_price`, `liquidation_price`, `size_usd`, `leverage`.
34
34
  - **`hl.liquidations`**: each liquidation from the account's own fill, typically within a minute or two, `data.direction` the closed side, `size_usd`, `mark_price`; no size floor of its own.
35
35
  - `min_usd` is the position size on `hl.liq_risk` and the liquidation size on `hl.liquidations`. A stored rule for one wallet: `vike-data alerts create --type hl_liq_proximity --wallet 0x... ...` (see `vike-alerts-setup`).
36
+ - **`hl.positions`**: the fills that change a big position (a wallet of $250,000 or more, or a position that size before or after the fill), each with `data.leverage` and `data.liquidation_px` of the wallet's position BEFORE the fill (the last capture, up to about 25 minutes old; `null` for an `open`; a `liquidation_px` of 0 means none) and `labels.tags`. `min_leverage=20` keeps the fills of positions at 20x or more (a `null` never matches); `tag` filters the wallet's trader tags; `min_usd` is the FILL's size (a floor of $1,000 you cannot lower). `hl.liq_risk` and `hl.liquidations` refuse `min_leverage` and `tag`, so it cannot share the command above:
37
+
38
+ ```bash
39
+ # instead of the line above (one connection per key and path: a second `stream hl` replaces the first with 4410), or under its own key
40
+ vike-data stream hl --channel hl.positions --filter coin=BTC,ETH,HYPE --filter min_leverage=20
41
+ ```
36
42
 
37
43
  ## Answer template
38
44
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: vike-hl-trader-profile
3
- description: Full profile of one Hyperliquid wallet - equity, open positions, cohort labels, lifetime PnL against deposits, win rate and risk metrics, per-symbol record, closed trades, funding paid, deposits and withdrawals, orders, TWAPs, leverage changes, liquidations, builder routing, and a live feed of its fills. Use when the user gives a Hyperliquid address and asks "is this trader any good" / "profile this HL wallet" / "what is this wallet's track record" / "show the fills, funding or deposits of 0x..." / "watch this trader".
3
+ description: Full profile of one Hyperliquid wallet - equity, open positions, cohort labels, lifetime PnL against deposits, win rate and risk metrics, per-symbol record, closed trades, funding paid, deposits and withdrawals, orders, TWAPs, leverage changes, liquidations, builder routing, and a live feed of its fills and closed trades. Use when the user gives a Hyperliquid address and asks "is this trader any good" / "profile this HL wallet" / "what is this wallet's track record" / "show the fills, funding or deposits of 0x..." / "watch this trader".
4
4
  allowed-tools: Bash(vike-data:*)
5
5
  ---
6
6
 
@@ -38,10 +38,10 @@ Optional, by question: `hl wallet-activity $W --view fills --symbol BTC` (raw fi
38
38
  ## Watch it live
39
39
 
40
40
  ```bash
41
- vike-data stream hl --channel hl.fills hl.liquidations hl.ledger --filter wallet=$W --filter min_usd=0
41
+ vike-data stream hl --channel hl.fills hl.liquidations hl.ledger hl.closed_trades --filter wallet=$W --filter min_usd=0
42
42
  ```
43
43
 
44
- `hl.fills` alone defaults to fills of $1,000 or more; `min_usd=0` is every fill. A stored rule instead: `vike-data alerts create --type hl_wallet --wallet $W ...` (see `vike-alerts-setup`).
44
+ `hl.fills` alone defaults to fills of $1,000 or more; `min_usd=0` is every fill. `hl.closed_trades` sends each round trip once, when it is written as closed, in batches every 30 minutes (a trade that closed at 08:12 arrives around 08:35); its `data` is the item of `hl wallet-trades` (`realized_pnl`, `entry_price`, `exit_price`, `duration_seconds`, `max_size_usd`) and `min_usd` on it is the trade's largest size. A close shows at once as an `hl.fills` event whose `data.action` is `close`. One key holds one `stream hl` connection: add channels to this command, never start a second one. A stored rule instead: `vike-data alerts create --type hl_wallet --wallet $W ...` (see `vike-alerts-setup`).
45
45
 
46
46
  ## Verdict rubric (rules of thumb, not tool output)
47
47
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: vike-pm-market-diligence
3
- description: Full due diligence on one Polymarket market - finding it, spread and depth from the order book, recorded activity, large recent prints, who traded and who holds each side, on-chain resolution status and smart-money context, then a live feed of its trades and price moves. Handles the condition id versus token id split. Use when the user asks "is this Polymarket market liquid" / "who is on each side of this market" / "has this market resolved on-chain" / "check this prediction market before I trade" / "diligence on this Polymarket market".
3
+ description: Full due diligence on one Polymarket market - finding it, spread and depth from the order book, recorded activity, large recent prints, who traded and who holds each side, on-chain resolution status and smart-money context, then a live feed of its trades, position changes and price moves. Handles the condition id versus token id split. Use when the user asks "is this Polymarket market liquid" / "who is on each side of this market" / "has this market resolved on-chain" / "check this prediction market before I trade" / "diligence on this Polymarket market".
4
4
  allowed-tools: Bash(vike-data:*)
5
5
  ---
6
6
 
@@ -40,10 +40,10 @@ vike-data polymarket smart-money --mode flows --hours 24 --json # 2 is t
40
40
  ## Watch it live
41
41
 
42
42
  ```bash
43
- vike-data stream polymarket --channel pm.trades pm.price_moves pm.resolutions --filter market=$CID
43
+ vike-data stream polymarket --channel pm.trades pm.positions pm.price_moves pm.resolutions --filter market=$CID
44
44
  ```
45
45
 
46
- `--filter` applies to every `--channel` of the command, and `market` is the only key all three take: a `role` filter here is refused (`bad_subscription`, exit 1). To count each match once, keep the taker rows of `pm.trades` with jq: `... | jq -c 'select(.type=="event" and .event.source=="pm.trades" and .event.data.role=="taker")'`. Don't start a second `stream polymarket` for it: one key holds one connection per path, and the second replaces the first (`4410`). `pm.trades` carries the trader's wallet; `pm.price_moves` is a move of 0.05 or more within five minutes; `pm.resolutions` the on-chain resolution.
46
+ `--filter` applies to every `--channel` of the command, and `market` is the only key all four take: a `role` filter here is refused (`bad_subscription`, exit 1). To count each match once, keep the taker rows of `pm.trades` with jq: `... | jq -c 'select(.type=="event" and .event.source=="pm.trades" and .event.data.role=="taker")'`. Don't start a second `stream polymarket` for it: one key holds one connection per path, and the second replaces the first (`4410`). `pm.trades` carries the trader's wallet; `pm.positions` is each of those trades again as what it did to the wallet's position (`data.action` `open`, `increase`, `reduce`, `close` or `flip`, `shares_before`, `shares`, `avg_price`: who is entering or leaving this market), so drop `pm.trades` from the list if you only want position changes; `pm.price_moves` is a move of 0.05 or more within five minutes; `pm.resolutions` the on-chain resolution. `shares` count trades only: shares a wallet got from a split, merge or transfer are not on the tape, so a wallet that sells them shows a negative `shares`.
47
47
 
48
48
  ## Answer template
49
49
 
@@ -69,6 +69,14 @@ Trim aggressively if the user asked a narrower question. About 5 credits for the
69
69
  - **Short-dated markets dominate.** Five-minute "up or down" markets resolve fast and show huge deltas: pass `--category` (or skip those slugs) when you want slower markets. Very short `--hours` windows (an hour or two) are noisy for the mispricing read.
70
70
  - The category also scopes the cohort. An unknown category spelling returns an empty list, not an error.
71
71
 
72
+ ## Live
73
+
74
+ ```bash
75
+ vike-data stream polymarket --channel pm.positions --filter market=<condition_id> --filter min_usd=1000 # who opens, adds to, reduces or closes in a flagged market
76
+ ```
77
+
78
+ `min_usd` is the size of the trade. Each event names the wallet (`subject.wallet`), `data.action`, `shares` and `avg_price`, and carries that wallet's `labels.pnl_tier` and `volume_tier` (its Polymarket tier, not membership of the cohort above). To follow chosen wallets instead, `--filter wallet=0x...` (see `vike-polymarket-trader`). Unfiltered it is 60,000 to 150,000 events an hour (measured 2026-11-02): always filter by `market` or `wallet`. Fields, timing and the one-connection rule: `vike-stream`.
79
+
72
80
  ## Anti-patterns
73
81
 
74
82
  - Don't treat "smart-money cohort" as omniscient. They're filtered for past performance — survivorship bias applies, especially in fast-moving political markets.
@@ -45,6 +45,14 @@ There is no `hit_rate_pct`, `volume_<window>_usd` or `trades_<window>` field.
45
45
  | Negative PnL with high volume | **Volume trader / MM-style** — pays the spread |
46
46
  | One category dominates >80% of `category_breakdown` | **Specialist** — only trust their reads in that category |
47
47
 
48
+ ## Watch it live
49
+
50
+ ```bash
51
+ vike-data stream polymarket --channel pm.positions --filter wallet=<address> --filter action=open,close
52
+ ```
53
+
54
+ Each trade of the wallet as what it did to its position in that outcome: `data.action` (`open`, `increase`, `reduce`, `close`, `flip`), `shares_before`, `shares`, `avg_price` (its average BUY price in that outcome after the trade), and the market in `subject` (`title`, `outcome`, `condition_id`). Drop `--filter action=...` for every change; `wallet` takes up to 1,000 comma-separated addresses. It runs about four minutes behind the chain and the first events come one to three minutes after you start. `shares` count trades only (shares from a split, merge or transfer are not on the tape, so a wallet that sells them goes negative). One key holds one `stream polymarket` connection: see `vike-stream`.
55
+
48
56
  ## Anti-patterns
49
57
 
50
58
  - Don't claim "this trader is good at predictions" from <10 resolved markets. Below that, `hit_rate` is noise.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: vike-stream
3
- description: Live events over WebSocket with `vike-data stream` - Hyperliquid fills, liquidations, positions, liquidation risk, order walls, closed candles, TWAPs, ledger, leverage changes and funding; HL cohort flow, indices and cohort bias; on-chain transfers on eth, bsc, base and hyperevm; Polymarket trades, resolutions, price moves and new markets - printed as NDJSON, resumed by cursor after any drop. Use when the user wants to "watch", "tail", "follow live", "stream" or "be notified as it happens" rather than query history.
3
+ description: Live events over WebSocket with `vike-data stream` - Hyperliquid fills, liquidations, positions (with leverage and liquidation price), top-10 positions per coin, closed trades, liquidation risk, order walls, closed candles, TWAPs, ledger, leverage changes and funding; HL cohort flow, indices, cohort bias and cohort leverage; on-chain transfers on eth, bsc, base and hyperevm; Polymarket trades, wallet position changes, resolutions, price moves and new markets - printed as NDJSON, resumed by cursor after any drop. Use when the user wants to "watch", "tail", "follow live", "stream" or "be notified as it happens" rather than query history.
4
4
  allowed-tools: Bash(vike-data:*)
5
5
  ---
6
6
 
@@ -16,10 +16,10 @@ server sent them. Status lines (subscribed, reconnecting, errors) go to stderr.
16
16
 
17
17
  | Path | Channels |
18
18
  |---|---|
19
- | `hl` | `hl.fills`, `hl.liquidations`, `hl.positions`, `hl.liq_risk`, `hl.order_walls`, `hl.candles`, `hl.twaps`, `hl.ledger`, `hl.leverage`, `hl.funding` |
20
- | `hl-cohorts` | `hl.cohort_flow`, `hl.indices`, `hl.cohort_bias` |
19
+ | `hl` | `hl.fills`, `hl.liquidations`, `hl.positions`, `hl.liq_risk`, `hl.order_walls`, `hl.candles`, `hl.twaps`, `hl.ledger`, `hl.leverage`, `hl.funding`, `hl.top_positions`, `hl.closed_trades` |
20
+ | `hl-cohorts` | `hl.cohort_flow`, `hl.indices`, `hl.cohort_bias`, `hl.cohort_leverage` |
21
21
  | `onchain` | `chain.transfers` |
22
- | `polymarket` | `pm.trades`, `pm.resolutions`, `pm.price_moves`, `pm.new_markets` |
22
+ | `polymarket` | `pm.trades`, `pm.positions`, `pm.resolutions`, `pm.price_moves`, `pm.new_markets` |
23
23
 
24
24
  The server decides what each path serves: `vike-data stream info` prints the current channels and filter keys, and a
25
25
  channel the path does not serve is refused with `unknown_channel` and the list. The CLI has no channel list of its own.
@@ -27,6 +27,19 @@ channel the path does not serve is refused with `unknown_channel` and the list.
27
27
  `hl.candles` is the Hyperliquid candle stream: closed bars, filtered by `coin`, `interval` (`1m 5m 15m 30m 1h 4h 1d`),
28
28
  `market` (`perp` or `spot`) and `dex` (`HL` or a HIP-3 dex). The old `wss://data.vike.io/v1/stream` is closed (410).
29
29
 
30
+ - `hl.positions`: the fills that change a big position. `data.leverage` and `data.liquidation_px` are the wallet's own
31
+ at the last position capture, i.e. BEFORE that fill (`null` for an `open`; a `liquidation_px` of 0 is "none"),
32
+ `labels.tags` its trader tags. Filters `min_leverage` (a number) and `tag` (a list) exist on this channel only.
33
+ - `hl.top_positions`: per coin of the top 50, the position that `entered`, `left` or `moved` within the top 10 (filter
34
+ `event` takes ONE of those, `direction` one of `long` / `short`). The first capture sends all 10 of every coin as `entered`.
35
+ - `hl.closed_trades`: a finished round trip (entry and exit price, `realized_pnl`, `duration_seconds`), in batches
36
+ every 30 minutes; unfiltered up to ~32,000 an hour (measured 2026-11-02): filter by `wallet` or `min_usd`.
37
+ - `hl.cohort_leverage` (`hl-cohorts`): once an hour per cohort of one `axis`, `perp_bias` and `equity_exposure`
38
+ against account value; no wallet or coin, filters `axis` and `cohort` only.
39
+ - `pm.positions`: each `pm.trades` fill again as its effect on the wallet's position, `data.action` (`open`,
40
+ `increase`, `reduce`, `close`, `flip`), `shares_before`, `shares`, `avg_price`. Filters `wallet`, `market`, `min_usd`
41
+ (the trade's size), `action`; unfiltered 60,000 to 150,000 an hour (measured 2026-11-02): filter by `wallet` or `market`.
42
+
30
43
  ## Examples
31
44
 
32
45
  ```bash
@@ -42,14 +55,23 @@ vike-data stream hl --channel hl.liquidations hl.fills --filter wallet=0x1111111
42
55
  # USDC transfers on base of 1M USDC or more (min_amount is in tokens; min_usd would drop the unpriced events)
43
56
  vike-data stream onchain --channel chain.transfers --filter chain=base --filter token=0x833589fcd6edb6e08f4c7c32d4f71b54bda02913 --filter min_amount=1000000
44
57
 
58
+ # Position changes at 20x or more, BTC and ETH (the wallet's leverage and liquidation price before the fill are in data)
59
+ vike-data stream hl --channel hl.positions --filter coin=BTC,ETH --filter min_leverage=20
60
+
61
+ # Every round trip one wallet closes (a batch every 30 minutes)
62
+ vike-data stream hl --channel hl.closed_trades --filter wallet=0x1111111111111111111111111111111111111111
63
+
64
+ # One Polymarket wallet opening or closing a position
65
+ vike-data stream polymarket --channel pm.positions --filter wallet=0x1111111111111111111111111111111111111111 --filter action=open,close
66
+
45
67
  # Keep only the events, with jq
46
68
  vike-data stream polymarket --channel pm.trades --filter min_usd=10000 | jq -c 'select(.type == "event") | .event'
47
69
  ```
48
70
 
49
71
  `--filter` applies to every `--channel` of the command; a key the channel does not take is refused by the server
50
72
  with the key's name. List keys (`wallet`, `coin`, `token`, `market`, `chain`, cohorts, ...) take comma-separated
51
- 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`
52
- take a number. Channel fields and filter keys: https://vike.io/docs/data/reference/stream-channels
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`,
74
+ `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
53
75
 
54
76
  ## Without a socket
55
77
 
@@ -89,11 +111,12 @@ Exit 1 also on `HTTP 401` / `4401` (the key) and on a refused subscription (`bad
89
111
 
90
112
  - Don't run two `vike-data stream` processes on the same key and path: they replace each other.
91
113
  - Don't treat silence as "nothing happened" in the first minutes: an idle channel starts on demand (up to ~12 minutes
92
- for `hl.indices` and `hl.liq_risk`).
114
+ for `hl.indices`, `hl.liq_risk` and `hl.top_positions`, up to 30 for `hl.closed_trades`; `pm.positions` takes one to
115
+ three minutes like `pm.trades`; `hl.cohort_leverage` sends its newest hour at once, then one an hour).
93
116
  - Don't use the stream for history: it keeps 3 days. Use the query commands.
94
117
 
95
118
  ## Pairs well with
96
119
 
97
120
  - `vike-alerts-setup`: a stored rule that notifies by webhook without a running process.
98
121
  - `vike-hl-top-traders`: pick the wallets to put in a `wallet` filter.
99
- - Playbooks with a live section: `vike-hl-liquidation-radar` (`hl.liq_risk`, `hl.liquidations`), `vike-follow-the-money` (`chain.transfers`), `vike-hl-cohort-positioning` (`hl.cohort_bias`, `hl.indices`), `vike-hl-trader-profile`, `vike-pm-market-diligence`.
122
+ - Playbooks with a live section: `vike-hl-liquidation-radar` (`hl.liq_risk`, `hl.liquidations`, `hl.positions`), `vike-follow-the-money` (`chain.transfers`), `vike-hl-cohort-positioning` (`hl.cohort_bias`, `hl.indices`, `hl.cohort_leverage`, `hl.top_positions`), `vike-hl-trader-profile` (`hl.closed_trades`), `vike-pm-market-diligence` and `vike-polymarket-trader` (`pm.positions`).
@@ -9,7 +9,7 @@ import { addTool } from './tool-command.js';
9
9
  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
- const NUMBER_KEYS = new Set(['min_usd', 'min_amount', 'min_move']);
12
+ const NUMBER_KEYS = new Set(['min_usd', 'min_amount', 'min_move', 'min_leverage']);
13
13
  const ONE_VALUE_KEYS = new Set(['side', 'direction', 'event', 'axis', 'move', 'role']); // 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`.