@vike-io/cli 0.16.0 → 0.17.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,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 17d2b82: `alerts create` / `alerts edit` take the four Polymarket alert types (`--type pm_wallet_trade | pm_market_trade | pm_price_move | pm_resolution`) and the market with `--condition-id`; `--direction` also applies to `pm_price_move`. Every alert type can now be e-mailed (`--channel email`). The `vike-alerts-setup` skill documents the Polymarket alerts, e-mail for Hyperliquid and Polymarket alerts, and the server's cap of 200 active alerts per account.
8
+
9
+ ## 0.16.1
10
+
11
+ ### Patch Changes
12
+
13
+ - 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.
14
+
15
+ - `vike-stream`: the channel table, what each new channel sends, its filters and volume, examples, and when each starts sending.
16
+ - `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.
17
+ - Fix: `vike-data stream ... --filter min_leverage=20` sent a list (`["20"]`), which the server refuses; it is a number now, like `min_usd`.
18
+
3
19
  ## 0.16.0
4
20
 
5
21
  ### 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:
@@ -145,7 +145,7 @@ Every data command is one `tools/call` to the MCP server. `vike-data <group> --h
145
145
  | `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` |
146
146
  | `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` |
147
147
  | `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`, `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_archive` |
148
- | `vike-data alerts` | `list`, `channels`, `create`, `edit`, `delete`, `events`, `resend`, `register-webhook`, `test-webhook`, `rotate-secret`: transfer alerts (a token or one wallet, on eth, bsc, base, hyperevm) and Hyperliquid alerts (`--type hl_wallet`, `hl_cohort_fill`, `hl_liquidation`, `hl_cohort_bias`, `hl_liq_proximity`), by email or an HTTPS webhook, HMAC-signed | `alerts_*` |
148
+ | `vike-data alerts` | `list`, `channels`, `create`, `edit`, `delete`, `events`, `resend`, `register-webhook`, `test-webhook`, `rotate-secret`: transfer alerts (a token or one wallet, on eth, bsc, base, hyperevm) Hyperliquid alerts (`--type hl_wallet`, `hl_cohort_fill`, `hl_liquidation`, `hl_cohort_bias`, `hl_liq_proximity`) and Polymarket alerts (`--type pm_wallet_trade`, `pm_market_trade`, `pm_price_move`, `pm_resolution`), by email or an HTTPS webhook, HMAC-signed; at most 200 active alerts per account | `alerts_*` |
149
149
  | `vike-data stream <path>` | live events from `wss://stream.vike.io/v1/stream/<path>` (`hl`, `hl-cohorts`, `onchain`, `polymarket`) as NDJSON: `--channel` (one or more), `--filter key=value`, `--cursor` | WebSocket, not MCP |
150
150
  | `vike-data stream` | `info`, `check <channel>` (the server's validator), `events <channel>` (stored events, 3 days), `connections` (yours) | `stream_info`, `stream_check_filter`, `stream_events`, `stream_connections` |
151
151
  | `vike-data search <q>` | tokens, wallets and entities, HL traders, vaults, builders, Polymarket wallets and markets by name, symbol, address or ENS name | `search` |
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.17.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 (CC BY 4.0), Hyperliquid positions, fills and cohorts, and labelled Ethereum/BNB wallets",
8
8
  "type": "module",
9
9
  "main": "src/index.js",
@@ -7,7 +7,7 @@ description: "Use this skill whenever the user asks any question about on-chain
7
7
 
8
8
  This skill is for anyone who asks an AI agent about crypto data: who is buying a token, what a wallet holds, what Hyperliquid or Polymarket traders are doing right now. It tells the agent which vike tool answers which question and how to read the result, so it does not guess or invent numbers. It reads its data from vike.io and needs a free vike API key.
9
9
 
10
- What the platform has: wallet and token analytics on Ethereum, BSC, Base and HyperEVM (each tool's chain list is under "What each tool really returns"), multi-source wallet labels, CEX perpetual funding and cross-venue spreads, Hyperliquid wallets, cohorts, leaderboards, liquidations, markets, builders, vaults and candles, Polymarket markets, traders, tape, order books, settlements and the Parquet archive, transfer and Hyperliquid alerts, and live event streams over WebSocket. 70 tools in one MCP server.
10
+ What the platform has: wallet and token analytics on Ethereum, BSC, Base and HyperEVM (each tool's chain list is under "What each tool really returns"), multi-source wallet labels, CEX perpetual funding and cross-venue spreads, Hyperliquid wallets, cohorts, leaderboards, liquidations, markets, builders, vaults and candles, Polymarket markets, traders, tape, order books, settlements and the Parquet archive, transfer, Hyperliquid and Polymarket alerts, and live event streams over WebSocket. 70 tools in one MCP server.
11
11
 
12
12
  **MCP endpoint for all calls:** `https://data.vike.io/mcp` (JSON-RPC 2.0)
13
13
  **Or use the CLI:** `npm install -g @vike-io/cli` → `vike-data <command>`
@@ -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
 
@@ -235,16 +235,16 @@ Every `hl` command takes `--view` (the first view is the default) and only the f
235
235
  | `polymarket_smart_money` | MARKETS where the profitable-wallet cohort is flowing (`flows`) or bought below the mid (`mispricings`); not a list of top traders |
236
236
 
237
237
  ### Alerts
238
- Create + manage on-chain transfer alerts and Hyperliquid alerts, delivered by email or an HTTPS webhook.
238
+ Create + manage on-chain transfer alerts, Hyperliquid alerts and Polymarket alerts, delivered by email or an HTTPS webhook.
239
239
 
240
240
  | Tool | Does |
241
241
  |---|---|
242
242
  | `alerts_list`, `alerts_list_channels` | list rules / enabled channels |
243
- | `alerts_create`, `alerts_edit`, `alerts_delete` | manage a rule: transfer (token and/or one `address`, chain `eth`/`bsc`/`base`/`hyperevm`, USD thresholds) or Hyperliquid (`--type hl_wallet`, `hl_cohort_fill`, `hl_liquidation`, `hl_cohort_bias`, `hl_liq_proximity`) |
243
+ | `alerts_create`, `alerts_edit`, `alerts_delete` | manage a rule: transfer (token and/or one `address`, chain `eth`/`bsc`/`base`/`hyperevm`, USD thresholds) or Hyperliquid (`--type hl_wallet`, `hl_cohort_fill`, `hl_liquidation`, `hl_cohort_bias`, `hl_liq_proximity`) or Polymarket (`--type pm_wallet_trade`, `pm_market_trade`, `pm_price_move`, `pm_resolution`) |
244
244
  | `alerts_events`, `alerts_resend_delivery` | what fired and each delivery's status (15 days); send one again |
245
245
  | `alerts_register_webhook`, `alerts_test_webhook`, `alerts_rotate_webhook_secret` | an HTTPS webhook (HMAC-signed deliveries): register, test, rotate its secret |
246
246
 
247
- A token-wide transfer alert fires on ANY transfer of the token above the USD threshold on that chain; an address alert on every transfer of that wallet. Every match is recorded in `alerts events` (15 days) whatever the channels; a transfer alert left with no enabled channel e-mails the account address. Hyperliquid alerts go to a webhook or are read with `alerts events`; only `hl_wallet` may also use email. There is no price or funding alert, no Discord (off) and no Telegram delivery. For a live feed without a rule, use `vike-data stream`.
247
+ A token-wide transfer alert fires on ANY transfer of the token above the USD threshold on that chain; an address alert on every transfer of that wallet. Every match is recorded in `alerts events` (15 days) whatever the channels; a transfer alert left with no enabled channel e-mails the account address. Hyperliquid and Polymarket alerts go to email (one mail per pass, at most 10 a day except `hl_wallet`), a webhook, or are read with `alerts events`. An account has at most 200 active alerts in all (any mix of on-chain, Hyperliquid, Polymarket); pausing frees a slot. There is no token price or funding alert (a Polymarket market's price moves: `pm_price_move`), no Discord (off) and no Telegram delivery. For a live feed without a rule, use `vike-data stream`.
248
248
 
249
249
  ---
250
250
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: vike-alerts-setup
3
- description: Create, list, edit, and delete alerts - on-chain transfer alerts (a token, one wallet, USD thresholds; eth, bsc, base, hyperevm) and Hyperliquid alerts (a wallet's fills, cohort fills, liquidations, cohort bias, liquidation proximity) - and read the events they produced. Delivered by email or an HTTPS webhook. Use when the user asks "alert me when X" / "watch for big transfers" / "notify on whale moves" / "tell me when this wallet trades".
3
+ description: Create, list, edit, and delete alerts - on-chain transfer alerts (a token, one wallet, USD thresholds; eth, bsc, base, hyperevm) Hyperliquid alerts (a wallet's fills, cohort fills, liquidations, cohort bias, liquidation proximity) and Polymarket alerts (a wallet's trades, big trades in a market, price moves, a market resolving) - and read the events they produced. Delivered by email or an HTTPS webhook. Use when the user asks "alert me when X" / "watch for big transfers" / "notify on whale moves" / "tell me when this wallet trades".
4
4
  allowed-tools: Bash(vike-data:*)
5
5
  ---
6
6
 
@@ -12,7 +12,7 @@ allowed-tools: Bash(vike-data:*)
12
12
  vike-data alerts channels --json
13
13
  ```
14
14
 
15
- Returns enabled email + webhook channels. **A channel kind the user has no enabled channel of is dropped from a transfer alert, and a transfer alert left with no channel e-mails the account address.** Whatever the channels, every match is recorded and read with `vike-data alerts events` (kept 15 days). A Hyperliquid alert is delivered by a registered webhook (`vike-alerts-webhook`; asking for one the user has not registered is an error) or only read with `alerts events`; `hl_wallet` alone may also use `--channel email`.
15
+ Returns enabled email + webhook channels. **A channel kind the user has no enabled channel of is dropped from a transfer alert, and a transfer alert left with no channel e-mails the account address.** Whatever the channels, every match is recorded and read with `vike-data alerts events` (kept 15 days). A Hyperliquid or Polymarket alert is delivered by `--channel email` (one mail per pass listing its events; after 10 events in a UTC day no more mail, except `hl_wallet`), by a registered webhook (`vike-alerts-webhook`; asking for one the user has not registered is an error), or only read with `alerts events`.
16
16
 
17
17
  ## CRUD
18
18
 
@@ -43,7 +43,7 @@ vike-data alerts create --label "Treasury in" --chain base \
43
43
  --address 0x1111111111111111111111111111111111111111 --address-role to --channel email
44
44
  ```
45
45
 
46
- Hyperliquid alerts (`--type`; leave out `--chain`, `--address`, `--max-usd`; delivered by `--channel webhook` (`hl_wallet` also `email`, at most one mail per pass), or with no channel read them with `vike-data alerts events`):
46
+ Hyperliquid alerts (`--type`; leave out `--chain`, `--address`, `--max-usd`; delivered by `--channel email` and/or `webhook`, or with no channel read them with `vike-data alerts events`):
47
47
 
48
48
  | `--type` | Fires on | Flags |
49
49
  |---|---|---|
@@ -58,6 +58,20 @@ vike-data alerts create --label "BTC smart money flips" --type hl_cohort_bias \
58
58
  --token BTC --index smi --threshold 0 --band 0.1 --channel webhook
59
59
  ```
60
60
 
61
+ Polymarket alerts (`--type`; leave out `--chain`, `--address`, `--max-usd`; the same channels). `--wallet` is the proxy wallet the site shows at `vike.io/polymarket/wallet/<address>`; `--condition-id` is the market (`0x` + 64 hex: the id in `vike.io/polymarket/market/<id>`, or find it with `vike-data polymarket markets --view search --query <slug>`):
62
+
63
+ | `--type` | Fires on | Flags |
64
+ |---|---|---|
65
+ | `pm_wallet_trade` | every trade of one wallet | `--wallet` (required), optional `--condition-id` (one market), `--min-usd` |
66
+ | `pm_market_trade` | big trades in one market | `--condition-id` and `--min-usd` >= 1000 (both required) |
67
+ | `pm_price_move` | the market's price moving sharply | `--condition-id` (required), `--direction up\|down\|both` |
68
+ | `pm_resolution` | the market resolving | `--condition-id` (required) |
69
+
70
+ ```bash
71
+ vike-data alerts create --label "Whale bets on this market" --type pm_market_trade \
72
+ --condition-id 0x... --min-usd 5000 --channel email
73
+ ```
74
+
61
75
  ### Edit (partial update — only fields you pass are changed)
62
76
 
63
77
  ```bash
@@ -87,9 +101,10 @@ Never delete or hard-delete an alert on your own initiative, to "clean up" or to
87
101
  ## Notes + gotchas
88
102
 
89
103
  - Transfer chains: **eth**, **bsc**, **base**, **hyperevm**, one per alert. For several, create several alerts.
90
- - **A transfer alert watches a token, one wallet, or both.** Without `--address` it fires on ANY transfer of that token on that chain whose USD value crosses the thresholds. With `--address` it fires on every transfer that wallet sent (`from`), received (`to`) or either (`any`); without `--min-usd` that includes dust and unpriced tokens. "Alert me when whale 0xABCD sells" is `--address 0xABCD --address-role from`; on Hyperliquid it is `--type hl_wallet --wallet 0xABCD --actions close reduce`. There are no price or funding alerts, and delivery is email or an HTTPS webhook (Discord is off; no Telegram).
104
+ - **A transfer alert watches a token, one wallet, or both.** Without `--address` it fires on ANY transfer of that token on that chain whose USD value crosses the thresholds. With `--address` it fires on every transfer that wallet sent (`from`), received (`to`) or either (`any`); without `--min-usd` that includes dust and unpriced tokens. "Alert me when whale 0xABCD sells" is `--address 0xABCD --address-role from`; on Hyperliquid it is `--type hl_wallet --wallet 0xABCD --actions close reduce`. There are no token price or funding alerts (a Polymarket market's price: `pm_price_move`), and delivery is email or an HTTPS webhook (Discord is off; no Telegram).
91
105
  - Thresholds are in **USD value** of the transfer at fire time, not token quantity.
92
- - `--cooldown` is the minimum gap between notifications of a token-wide transfer alert (default 60 min). Address alerts and Hyperliquid alerts notify on every event and ignore it.
106
+ - **At most 200 active alerts per account**, any mix of on-chain, Hyperliquid and Polymarket; the 201st is refused at create or resume. Pausing frees a slot.
107
+ - `--cooldown` is the minimum gap between notifications of a token-wide transfer alert (default 60 min). Address alerts, Hyperliquid and Polymarket alerts notify on every event and ignore it.
93
108
  - Tokens are matched by symbol (UPPERCASE). For cross-chain symbols like `USDC` that exist on multiple chains, be explicit with `--chain`.
94
109
  - A transfer alert whose channels are not set up is not silent: it falls back to e-mailing the account address, and every match is in `alerts events`. Run `vike-data alerts channels` first so the user gets the delivery they expect.
95
110
 
@@ -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`).
@@ -4,18 +4,19 @@ import { parseBool, parseInt10 } from '../util.js';
4
4
  import { addTool } from './tool-command.js';
5
5
 
6
6
  // What a rule watches beyond token and USD bounds: a transfer alert's address, and the Hyperliquid
7
- // parameters. Which alert type takes which is the server's to check; it names the fix.
7
+ // and Polymarket parameters. Which alert type takes which is the server's to check; it names the fix.
8
8
  const TARGET_OPTIONS = [
9
9
  ['--address <a>', 'transfer: one wallet to watch (0x + 40 hex), sent or received'],
10
10
  ['--address-role <r>', 'transfer: any | from | to (default any; needs --address)'],
11
- ['--wallet <a>', 'Hyperliquid account (0x + 40 hex): required by hl_wallet and hl_liq_proximity, optional for hl_liquidation'],
11
+ ['--wallet <a>', 'Hyperliquid account or Polymarket wallet (0x + 40 hex): required by hl_wallet, hl_liq_proximity and pm_wallet_trade, optional for hl_liquidation'],
12
+ ['--condition-id <id>', 'Polymarket market (0x + 64 hex): required by pm_market_trade, pm_price_move and pm_resolution, optional for pm_wallet_trade'],
12
13
  ['--actions <a...>', 'hl_wallet: open close flip increase reduce (default all but reduce)'],
13
14
  ['--pnl-cohorts <c...>', 'hl_cohort_fill, hl_liquidation: PnL cohorts, e.g. "3x smart" "2x smart"'],
14
15
  ['--size-cohorts <c...>', 'hl_cohort_fill, hl_liquidation: size cohorts, e.g. "4x whale" whale'],
15
16
  ['--index <i>', 'hl_cohort_bias (required): smi | wsi | smart_bias | whale_bias | smi_wsi_gap'],
16
17
  ['--threshold <n>', 'hl_cohort_bias: level to cross (default 0); hl_liq_proximity: share of the way to liquidation, 0-1 (default 0.8)'],
17
18
  ['--band <n>', 'hl_cohort_bias, hl_liq_proximity: hysteresis, > 0 (default 0.1)'],
18
- ['--direction <d>', 'hl_cohort_bias: up | down | both (default both)'],
19
+ ['--direction <d>', 'hl_cohort_bias, pm_price_move: up | down | both (default both)'],
19
20
  ];
20
21
 
21
22
  // `--pnl-cohorts ''` clears the list: send [] (the server refuses ['']).
@@ -33,13 +34,14 @@ function targetArgs(opts) {
33
34
  threshold: opts.threshold,
34
35
  band: opts.band,
35
36
  direction: opts.direction,
37
+ condition_id: opts.conditionId,
36
38
  };
37
39
  }
38
40
 
39
41
  export function registerAlerts(program) {
40
42
  const cmd = program
41
43
  .command('alerts')
42
- .description('Manage alerts: on-chain transfers and Hyperliquid fills, liquidations, cohort bias and liquidation proximity');
44
+ .description('Manage alerts: on-chain transfers, Hyperliquid fills, liquidations, cohort bias and liquidation proximity, and Polymarket trades, price moves and resolutions (at most 200 active per account)');
43
45
 
44
46
  cmd
45
47
  .command('list')
@@ -83,17 +85,17 @@ export function registerAlerts(program) {
83
85
 
84
86
  const create = cmd
85
87
  .command('create')
86
- .description('Create an alert: an on-chain transfer alert (default) or a Hyperliquid alert (--type)')
88
+ .description('Create an alert: an on-chain transfer alert (default), a Hyperliquid or a Polymarket alert (--type)')
87
89
  .requiredOption('--label <l>', 'Alert label (user-visible name)')
88
- .option('--type <t>', 'transfer | hl_wallet | hl_cohort_fill | hl_liquidation | hl_cohort_bias | hl_liq_proximity (default transfer)')
90
+ .option('--type <t>', 'transfer | hl_wallet | hl_cohort_fill | hl_liquidation | hl_cohort_bias | hl_liq_proximity | pm_wallet_trade | pm_market_trade | pm_price_move | pm_resolution (default transfer)')
89
91
  .option('--token <sym>', 'transfer: token ticker, UPPERCASE (e.g. USDC); Hyperliquid: the coin (BTC, kPEPE), required by hl_cohort_bias')
90
92
  // No default chain: a Hyperliquid alert refuses one.
91
93
  .option('--chain <c>', 'transfer only: eth | bsc | base | hyperevm (default eth)')
92
- .option('--min-usd <n>', 'transfer: minimum USD value; Hyperliquid: fill or liquidation floor (hl_cohort_fill: required, >= 10000)')
94
+ .option('--min-usd <n>', 'transfer: minimum USD value; Hyperliquid, Polymarket: fill, liquidation or trade floor (hl_cohort_fill: required, >= 10000; pm_market_trade: required, >= 1000)')
93
95
  .option('--max-usd <n>', 'transfer only: maximum USD value');
94
96
  for (const [flags, text] of TARGET_OPTIONS) create.option(flags, text);
95
97
  create
96
- .option('--channel <c...>', 'Notification channel(s): email, webhook (Hyperliquid: webhook, or none and read them with `alerts events`)')
98
+ .option('--channel <c...>', 'Notification channel(s): email, webhook, for every alert type (or none: read them with `alerts events`)')
97
99
  .option('--cooldown <min>', 'Token-wide transfer alerts: minimum gap between notifications (minutes)', '60')
98
100
  .option('--json', 'Emit JSON')
99
101
  .action(async (opts) => {
@@ -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`.