@vike-io/cli 0.16.1 → 0.17.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,17 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.17.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 35213ce: `hl market --view funding_rates`: every perp's latest funding rate, or with `--symbol` one perp's hourly history, HIP-3 markets such as `xyz:CL` included. The view is now listed in the help, `--order desc|asc` is new, and `--sort` takes `oi`, `rate` or `abs_rate` on this view.
8
+
9
+ ## 0.17.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 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.
14
+
3
15
  ## 0.16.1
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -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.1",
6
+ "version": "0.17.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",
@@ -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>`
@@ -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
 
@@ -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) => {
@@ -108,15 +108,16 @@ export function registerHl(program) {
108
108
 
109
109
  addTool(hl, 'market', {
110
110
  tool: 'hl_market',
111
- desc: 'Open interest per symbol, one symbol\'s hourly series, size breakdown, positions, indices or large fills',
111
+ desc: 'Open interest per symbol, one symbol\'s hourly series, size breakdown, positions, indices, large fills or funding rates',
112
112
  options: [
113
- view(['open_interest', 'symbol_metrics', 'size_breakdown', 'positions', 'indices', 'large_fills', 'hourly']),
114
- ['--symbol <s>', 'One symbol (required by every view but open_interest, positions and hourly)'],
113
+ view(['open_interest', 'symbol_metrics', 'size_breakdown', 'positions', 'indices', 'large_fills', 'hourly', 'funding_rates']),
114
+ ['--symbol <s>', 'One symbol (required by every view but open_interest, positions, hourly and funding_rates; on funding_rates it switches the board of every perp to that perp\'s hourly history)'],
115
115
  ['--symbols <list>', 'hourly: comma-separated perps, at most 64 (close, open interest, funding, premium)'],
116
116
  ['--days <n>', 'hourly: days back from --end, 1-400 (default 120)'],
117
117
  WALLET, AXIS, COHORT, OPENED, START, END,
118
118
  ['--open-only <bool>', 'positions: true (default) = latest open; false needs --start'],
119
- ['--sort <s>', 'positions: size = biggest positions of one --symbol first'],
119
+ ['--sort <s>', 'positions: size = biggest positions of one --symbol first; funding_rates (the board): oi (default) | rate | abs_rate'],
120
+ ['--order <o>', 'funding_rates: desc (default: the board largest first, a history newest hour first) | asc'],
120
121
  ['--resolution <r>', 'positions history: 5m | 1h'],
121
122
  ['--label-basis <b>', 'symbol_metrics: current'],
122
123
  ['--hours <n>', 'indices: window in hours; large_fills: look-back, max 24'],