@vike-io/cli 0.13.1 → 0.15.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 +28 -0
- package/README.md +33 -19
- package/package.json +4 -4
- package/skills/vike/SKILL.md +144 -192
- package/skills/vike-alerts-setup/SKILL.md +37 -6
- package/skills/vike-alerts-webhook/SKILL.md +15 -8
- package/skills/vike-candles/SKILL.md +9 -2
- package/skills/vike-core/SKILL.md +16 -12
- package/skills/vike-hl-position-match/SKILL.md +8 -8
- package/skills/vike-hl-top-traders/SKILL.md +46 -11
- package/skills/vike-perp-funding/SKILL.md +82 -0
- package/skills/vike-perp-overview/SKILL.md +69 -0
- package/skills/vike-polymarket-market-detail/SKILL.md +2 -1
- package/skills/vike-polymarket-markets/SKILL.md +12 -7
- package/skills/vike-polymarket-smart-money/SKILL.md +38 -13
- package/skills/vike-polymarket-trader/SKILL.md +23 -20
- package/skills/vike-smart-money-discovery/SKILL.md +26 -32
- package/skills/vike-stream/SKILL.md +98 -0
- package/skills/vike-token-holders/SKILL.md +2 -1
- package/skills/vike-token-research/SKILL.md +22 -14
- package/skills/vike-token-screener/SKILL.md +35 -28
- package/skills/vike-token-transfers/SKILL.md +21 -11
- package/skills/vike-wallet-balances/SKILL.md +19 -13
- package/skills/vike-wallet-batch/SKILL.md +18 -14
- package/skills/vike-wallet-compare/SKILL.md +2 -0
- package/skills/vike-wallet-counterparties/SKILL.md +5 -1
- package/skills/vike-wallet-discover/SKILL.md +17 -10
- package/skills/vike-wallet-ens/SKILL.md +8 -4
- package/skills/vike-wallet-label-provenance/SKILL.md +25 -16
- package/skills/vike-wallet-pnl-history/SKILL.md +4 -1
- package/skills/vike-wallet-portfolio/SKILL.md +23 -21
- package/skills/vike-wallet-summary/SKILL.md +22 -9
- package/skills/vike-wallet-trace/SKILL.md +15 -11
- package/skills/vike-wallet-transactions/SKILL.md +3 -1
- package/skills.sh.json +17 -15
- package/src/auth.js +1 -1
- package/src/commands/alerts.js +85 -15
- package/src/commands/call.js +32 -0
- package/src/commands/candles.js +11 -15
- package/src/commands/doctor.js +4 -4
- package/src/commands/hl.js +274 -0
- package/src/commands/init.js +1 -1
- package/src/commands/labels.js +1 -1
- package/src/commands/perp.js +10 -9
- package/src/commands/polymarket.js +105 -5
- package/src/commands/search.js +10 -0
- package/src/commands/stream.js +308 -0
- package/src/commands/token.js +2 -0
- package/src/commands/tool-command.js +27 -0
- package/src/commands/wallet.js +24 -3
- package/src/index.js +10 -1
- package/src/mcp-client.js +37 -16
- package/skills/vike-cross-venue-perps/SKILL.md +0 -52
- package/skills/vike-hl-trader-profile/SKILL.md +0 -65
- package/skills/vike-perp-funding-arb/SKILL.md +0 -53
- package/skills/vike-perp-screener/SKILL.md +0 -48
- package/skills/vike-perp-spread-arb/SKILL.md +0 -38
- package/skills/vike-polymarket-screener/SKILL.md +0 -59
- package/skills/vike-router/SKILL.md +0 -54
package/skills/vike/SKILL.md
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vike
|
|
3
|
-
description: "Use this skill whenever the user asks any question about on-chain crypto data, wallet behavior, token transfers, smart money, CEX perpetual futures, Hyperliquid perps, prediction markets (Polymarket), ENS, or on-chain flows — and live data from vike.io would improve the answer. This includes questions like \"who is buying X token\", \"what is wallet 0x... doing\", \"top wallets by PnL\", \"funding rate spread across Binance/Bybit/OKX\", \"largest HL perp traders this week\", \"who is winning on Polymarket\", \"
|
|
3
|
+
description: "Use this skill whenever the user asks any question about on-chain crypto data, wallet behavior, token transfers, smart money, CEX perpetual futures, Hyperliquid perps, prediction markets (Polymarket), ENS, or on-chain flows — and live data from vike.io would improve the answer. This includes questions like \"who is buying X token\", \"what is wallet 0x... doing\", \"top wallets by PnL\", \"funding rate spread across Binance/Bybit/OKX\", \"largest HL perp traders this week\", \"who is winning on Polymarket\", \"what is the ENS name of this address\", \"label this wallet\", \"trace this transfer\", \"top tokens by smart-money inflow\". It is also the entry point that decides which vike-* skill answers a question (tokens, wallets, labels, perps, Hyperliquid, Polymarket, candles, alerts). Always use this skill proactively when the user's query could benefit from real-time or historical on-chain data — don't wait for the user to explicitly ask to \"use vike\". If the user asks a general on-chain question that requires synthesis across wallets/tokens/venues, route to vike first."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# vike —
|
|
6
|
+
# vike — on-chain, perps and prediction-market data
|
|
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
|
-
|
|
10
|
+
What the platform has: wallet and token analytics on Ethereum and BSC, with Base for token transfers and labels (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.
|
|
11
11
|
|
|
12
|
-
**MCP endpoint for all calls:** `https://vike.io/mcp` (JSON-RPC 2.0)
|
|
13
|
-
**Or use the CLI:** `npm install -g @vike-io/cli` → `vike <command>`
|
|
12
|
+
**MCP endpoint for all calls:** `https://data.vike.io/mcp` (JSON-RPC 2.0)
|
|
13
|
+
**Or use the CLI:** `npm install -g @vike-io/cli` → `vike-data <command>`
|
|
14
14
|
|
|
15
15
|
## What it does and who it is for
|
|
16
16
|
|
|
@@ -23,13 +23,14 @@ It is for traders, researchers and developers who use an AI agent to look at cry
|
|
|
23
23
|
Hard rules — agents that violate these produce wrong answers. Read once, apply always.
|
|
24
24
|
|
|
25
25
|
1. **Addresses are always full 0x-hex (42 chars).** Never truncate when querying. Never display truncated when the user asks for the address — they'll copy-paste it.
|
|
26
|
-
2. **
|
|
27
|
-
3. **
|
|
28
|
-
4. **
|
|
29
|
-
5. **Refresh
|
|
26
|
+
2. **Perp and Hyperliquid symbols are upper-cased by the server.** Echo back what the user wrote.
|
|
27
|
+
3. **Windows are counted in UTC calendar days, not a rolling 24 hours.** On the token screener `24h` spans yesterday and today; on Hyperliquid `30d` is today plus the previous 30 days.
|
|
28
|
+
4. **Page sizes are small and differ per tool; these have no paging.** Max 20: `wallet_discover` (`size`), `polymarket_smart_money`. Max 30: `polymarket_markets`. Max 50: `token_holders`, `wallet_counterparties`, `wallet_compare`. Max 100: `token_screener`, `hl_perp_top_traders` (`size`), and 100 addresses for `wallet_batch_labels`. Max 500: `wallet_transactions`, `hl_position_match`. `token_transfers` has no limit: it always returns 10 rows. To go deeper, narrow the filter or the window instead of asking for more rows. The `hl` commands, `polymarket market-trades`, `tape`, `settlements` and `alerts events` DO page: pass the answer's next cursor back with `--cursor`.
|
|
29
|
+
5. **Refresh differs per tool; never promise "minutes".** `wallet_discover` and `wallet_summary` are rebuilt nightly, so a wallet active an hour ago may not show. Transfers are synced block by block. `hl_position_match` only matches positions seen within 15 minutes of the newest snapshot batch. For events as they happen use `vike-data stream` (`vike-stream`).
|
|
30
30
|
6. **USD amounts are floats in dollars.** `--min-usd 10000` = ten thousand dollars, not micro-USD.
|
|
31
|
-
7. **`--json`
|
|
32
|
-
8. **Resolve a token before asking transfer/holder questions.** `token_search` → take the canonical address → pass to `token_transfers` / `token_holders`. Symbol-only queries lose precision on tickers that collide across chains (e.g. FUN, BEAM, USDC).
|
|
31
|
+
7. **`--json` is always available** on CLI commands and gives stable machine-readable output. The default (human) format may change; `--json` will not.
|
|
32
|
+
8. **Resolve a token before asking transfer/holder questions.** `token_search` → take the canonical address → pass it to `token_transfers` / `token_holders`. Symbol-only queries lose precision on tickers that collide across chains (e.g. FUN, BEAM, USDC).
|
|
33
|
+
9. **`bought` in `token_transfers` is every inbound transfer**, flash-loan round trips included. Read `net_tokens` (bought − sold) before calling a wallet a buyer.
|
|
33
34
|
|
|
34
35
|
---
|
|
35
36
|
|
|
@@ -38,7 +39,7 @@ Hard rules — agents that violate these produce wrong answers. Read once, apply
|
|
|
38
39
|
Follow this decision tree **before every session**. Do not skip to Step 2 until auth is confirmed.
|
|
39
40
|
|
|
40
41
|
```
|
|
41
|
-
1. Is the
|
|
42
|
+
1. Is the CLI installed? (`vike-data --version`)
|
|
42
43
|
├── YES → continue
|
|
43
44
|
└── NO → `npm install -g @vike-io/cli`
|
|
44
45
|
|
|
@@ -57,7 +58,7 @@ If the user has no API key yet, tell them:
|
|
|
57
58
|
> 2. Save it: `vike-data login --api-key vk_...` (or `export VIKE_API_KEY=vk_...`).
|
|
58
59
|
> 3. Verify: `vike-data doctor`.
|
|
59
60
|
>
|
|
60
|
-
>
|
|
61
|
+
> One key gets 20,000 requests per rolling hour, shared by the MCP server and the REST API.
|
|
61
62
|
|
|
62
63
|
If using the MCP server directly (without the CLI), authenticate with the key in this header:
|
|
63
64
|
```
|
|
@@ -66,50 +67,69 @@ X-API-KEY: vk_...
|
|
|
66
67
|
|
|
67
68
|
---
|
|
68
69
|
|
|
69
|
-
## Step 2: Route
|
|
70
|
+
## Step 2: Route the question
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
Pick by the question, then read the named skill for the recipe and the traps. If two rows fit, prefer the task skill (a multi-call workflow) over the per-tool skill.
|
|
73
|
+
|
|
74
|
+
| User is asking about... | CLI / MCP tool | Skill |
|
|
72
75
|
|---|---|---|
|
|
73
|
-
| Token
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
99
|
-
|
|
76
|
+
| Token symbol/name → address | `vike-data token search` / `token_search` | `vike-token-search` |
|
|
77
|
+
| Who bought / sold a token (top 10, one side per call) | `vike-data token transfers` / `token_transfers` | `vike-token-transfers` |
|
|
78
|
+
| "Research token X" end to end | search → transfers (both tabs) | `vike-token-research` |
|
|
79
|
+
| Top holders of a token (ranked by net inflow, not balance) | `vike-data token holders` / `token_holders` | `vike-token-holders` |
|
|
80
|
+
| Tokens trending / with the biggest inflow / smart-money inflow | `vike-data token screener` / `token_screener` | `vike-token-screener` |
|
|
81
|
+
| "Is smart money buying X?" / alpha wallets | screener `--smart-money-only` → transfers | `vike-smart-money-discovery` |
|
|
82
|
+
| One wallet's volume / inflow / outflow / tx count by window | `vike-data wallet summary` / `wallet_summary` | `vike-wallet-summary` |
|
|
83
|
+
| Full picture of one wallet ("who is this", "everything about it") | several calls | `vike-wallet-portfolio` |
|
|
84
|
+
| Top wallets by volume / flow / tx count | `vike-data wallet discover` / `wallet_discover` | `vike-wallet-discover` |
|
|
85
|
+
| Individual transfers of a wallet | `vike-data wallet transactions` / `wallet_transactions` | `vike-wallet-transactions` |
|
|
86
|
+
| Who a wallet trades with | `vike-data wallet counterparties` / `wallet_counterparties` | `vike-wallet-counterparties` |
|
|
87
|
+
| Follow funds N hops out | `vike-data wallet trace` / `wallet_trace` | `vike-wallet-trace` |
|
|
88
|
+
| Are wallets A and B related (exactly two) | `vike-data wallet compare` / `wallet_compare` | `vike-wallet-compare` |
|
|
89
|
+
| Daily net-flow series (not PnL) | `vike-data wallet pnl-history` / `wallet_pnl_history` | `vike-wallet-pnl-history` |
|
|
90
|
+
| What a wallet holds right now | `vike-data wallet balances` / `wallet_token_balances` | `vike-wallet-balances` |
|
|
91
|
+
| ENS name of an address (reverse only) | `vike-data wallet ens` / `wallet_ens` | `vike-wallet-ens` |
|
|
92
|
+
| Label many addresses (up to 100) | `vike-data wallet batch` / `wallet_batch_labels` | `vike-wallet-batch` |
|
|
93
|
+
| Why is this wallet labelled X (sources) | `vike-data labels <address>` / `wallet_label_provenance` | `vike-wallet-label-provenance` |
|
|
94
|
+
| Funding rates, funding arb, one symbol across venues | `vike-data perp funding` / `perp_funding` | `vike-perp-funding` |
|
|
95
|
+
| Cross-venue price spread, "perp market overview" | `vike-data perp spreads` + `perp funding` + `perp top-traders` | `vike-perp-overview` |
|
|
96
|
+
| Top Hyperliquid traders; "is this HL address any good" | `vike-data perp top-traders` / `hl_perp_top_traders` | `vike-hl-top-traders` |
|
|
97
|
+
| HL share card → which wallet holds it | `vike-data perp find-position` / `hl_position_match` | `vike-hl-position-match` |
|
|
98
|
+
| One HL wallet: equity, positions, cohorts, risk; its fills / funding / ledger | `vike-data hl wallet`, `hl wallet-activity` / `hl_wallet`, `hl_wallet_activity` | this skill |
|
|
99
|
+
| Are whales / smart money long or short X (HL cohorts) | `vike-data hl cohort-metrics <symbol>`, `hl segments`, `hl market --view indices` | this skill |
|
|
100
|
+
| HL leaderboard with the full risk set, liquidations, open interest, builders, vaults | `vike-data hl leaderboard`, `hl liquidations`, `hl market`, `hl builders`, `hl vaults`, `hl vault` | this skill |
|
|
101
|
+
| HL orders and order clusters, TWAPs, the ledger, leverage changes, closed trades, venue stats, HYPE holders, the Parquet archive | `vike-data hl orders`, `hl twaps`, `hl ledger`, `hl leverage-changes`, `hl wallet-trades`, `hl stats`, `hl hype-holders`, `hl archive` | this skill |
|
|
102
|
+
| A name, symbol, address, ENS name or polymarket.com link → what it is | `vike-data search <q>` / `search` | this skill |
|
|
103
|
+
| Candles: Hyperliquid perp/spot (history, or the newest bar of every symbol), Polymarket outcome token; live HL bars | `vike-data candles hl` (`--view latest`), `candles polymarket`; `stream hl --channel hl.candles` | `vike-candles` |
|
|
104
|
+
| Trending Polymarket markets (by 24h volume) | `vike-data polymarket markets` / `polymarket_markets` | `vike-polymarket-markets` |
|
|
105
|
+
| One Polymarket market | `vike-data polymarket market <condition_id>` / `polymarket_market_detail` | `vike-polymarket-market-detail` |
|
|
106
|
+
| One Polymarket trader | `vike-data polymarket wallet` / `polymarket_wallet` | `vike-polymarket-trader` |
|
|
107
|
+
| Polymarket smart-money flows / mispricings / overview | `vike-data polymarket smart-money` / `polymarket_smart_money` | `vike-polymarket-smart-money` |
|
|
108
|
+
| Polymarket wallet leaderboard | `vike-data polymarket leaderboard` / `polymarket_leaderboard` | this skill |
|
|
109
|
+
| One market's trades with wallets; raw tape; order book; tape stats | `vike-data polymarket market-trades`, `tape`, `orderbook`, `market-stats` | this skill |
|
|
110
|
+
| Polymarket resolutions; the Parquet archive | `vike-data polymarket settlement`, `settlements`, `archive` | this skill |
|
|
111
|
+
| Who funded a wallet; which exchanges it uses | `vike-data wallet first-funder`, `wallet exchange-usage` | this skill |
|
|
112
|
+
| 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 |
|
|
113
|
+
| Alerts: create / list / edit / delete / events (transfer and Hyperliquid) | `vike-data alerts ...` / `alerts_*` | `vike-alerts-setup` |
|
|
114
|
+
| Alert delivery to an HTTPS webhook | `vike-data alerts register-webhook`, `test-webhook`, `rotate-secret` | `vike-alerts-webhook` |
|
|
115
|
+
| 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` |
|
|
116
|
+
| A tool with no command of its own | `vike-data call <tool> --args '{...}'` | this skill |
|
|
117
|
+
| Install, auth, errors, conventions | — | `vike-core` |
|
|
118
|
+
|
|
119
|
+
**When in doubt, start with `vike-data token search` or `vike-data wallet summary`.** Both are cheap and disambiguate what the user actually meant.
|
|
100
120
|
|
|
101
121
|
### Example query routing
|
|
102
122
|
```
|
|
103
|
-
"
|
|
104
|
-
"What is 0xd8dA6BF...AbA96 holding?" →
|
|
105
|
-
"Funding rate for BTC across all perp venues" → perp_funding
|
|
106
|
-
"
|
|
107
|
-
"Biggest HL perp PnL last week" → hl_perp_top_traders
|
|
108
|
-
"
|
|
109
|
-
"Why is 0x28C6... labeled 'Binance hot wallet'?" → wallet_label_provenance
|
|
110
|
-
"
|
|
111
|
-
"Alert me
|
|
112
|
-
"Trace funds from 0xHACKER 3 hops out" → wallet_trace
|
|
123
|
+
"Who bought the most PEPE in the last 24h?" → token_search, then token_transfers (tab=bought, period=24h; 10 rows; rank by net_tokens)
|
|
124
|
+
"What is 0xd8dA6BF...AbA96 holding?" → wallet_token_balances (+ wallet_summary for flows)
|
|
125
|
+
"Funding rate for BTC across all perp venues" → perp_funding (symbol=BTC; raw per-interval rates)
|
|
126
|
+
"Which venue pays the most funding on ETH?" → perp_funding (symbol=ETH, normalise to daily yourself)
|
|
127
|
+
"Biggest HL perp PnL last week" → hl_perp_top_traders (window=7d, sort=pnl)
|
|
128
|
+
"What are the hottest crypto prediction markets?" → polymarket_markets (category=Crypto) → polymarket_market_detail
|
|
129
|
+
"Why is 0x28C6... labeled 'Binance hot wallet'?" → wallet_label_provenance (address=0x28C6...)
|
|
130
|
+
"What is the ENS name of 0xd8dA6BF...?" → wallet_ens (address=0xd8dA...; name → address is NOT supported)
|
|
131
|
+
"Alert me on WBTC transfers over $1M" → alerts_create (token_symbol=WBTC, min_value_usd=1000000; fires on ANY such transfer)
|
|
132
|
+
"Trace funds from 0xHACKER 3 hops out" → wallet_trace (address=0xHACKER, depth=3)
|
|
113
133
|
```
|
|
114
134
|
|
|
115
135
|
---
|
|
@@ -121,182 +141,114 @@ X-API-KEY: vk_...
|
|
|
121
141
|
**A) Via CLI (recommended for shell-bound agents).** All commands accept `--json` for machine-readable output:
|
|
122
142
|
```bash
|
|
123
143
|
vike-data wallet summary 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 --json
|
|
124
|
-
vike-data perp funding --symbol BTC --
|
|
144
|
+
vike-data perp funding --symbol BTC --json
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Any MCP tool, including one with no command of its own, is one `call` away; it prints the tool's raw JSON and exits 1 when the tool refuses the input:
|
|
148
|
+
```bash
|
|
149
|
+
vike-data call hl_wallet --args '{"address":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","view":"summary"}'
|
|
125
150
|
```
|
|
126
151
|
|
|
127
|
-
**B) Via an MCP connector (recommended when your client has one).** All
|
|
152
|
+
**B) Via an MCP connector (recommended when your client has one).** All 70 tools live at `https://data.vike.io/mcp`. Connect the client to that address with the `X-API-KEY` header above, then call a tool by name with its arguments, for example `wallet_summary` with `address` set to a full 0x address.
|
|
128
153
|
|
|
129
154
|
Run `vike-data schema --pretty` (or call MCP `tools/list`) to see the live arg shape for every tool. Always read the schema before constructing arguments — defaults and enum values change.
|
|
130
155
|
|
|
131
156
|
---
|
|
132
157
|
|
|
133
|
-
##
|
|
134
|
-
|
|
135
|
-
For deeper per-tool workflows (multi-step recipes, common pitfalls, output schemas), see the `skills/` directory in this repo. The router lives at `vike-router`.
|
|
158
|
+
## What each tool really returns
|
|
136
159
|
|
|
137
160
|
### Tokens
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
| Tool | Description | Skill |
|
|
161
|
+
| Tool | Returns | Not |
|
|
141
162
|
|---|---|---|
|
|
142
|
-
| `token_search` |
|
|
143
|
-
| `token_transfers` |
|
|
144
|
-
| `token_holders` |
|
|
145
|
-
| `token_screener` |
|
|
146
|
-
|
|
147
|
-
**Key chains:** `ethereum`, `bsc`, `base`, `arbitrum`, `hyperevm` (EVM); `bitcoin`, `solana`, `tron`, `xmr`, `zec`, `dash` (non-EVM, limited tool support).
|
|
148
|
-
|
|
149
|
-
---
|
|
163
|
+
| `token_search` | symbol, name, address, logo for a query | no market cap |
|
|
164
|
+
| `token_transfers` | 10 wallets, one side (`tab` = `bought` or `sold`) per call, period 1h/24h/7d/30d: `address, bought, sold, net_tokens, usd_spent, usd_received, net_usd, chains` | no `--min-usd`; window ends at the token's newest priced row; a net seller has `net_usd > 0` |
|
|
165
|
+
| `token_holders` | wallets ranked by cumulative net inflow USD, with entity/type | not balances, no concentration metric |
|
|
166
|
+
| `token_screener` | per-token volume, net/in/out USD, `unique_holders` (wallets ACTIVE in the window, not growth), tx count | no age, liquidity or sector filter; no ascending sort; native coin shows as `0x000…000`; `symbol` is often blank |
|
|
150
167
|
|
|
151
168
|
### Wallets
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
| Tool | Description | Skill |
|
|
169
|
+
| Tool | Returns | Not |
|
|
155
170
|
|---|---|---|
|
|
156
|
-
| `wallet_summary` |
|
|
157
|
-
| `wallet_discover` |
|
|
158
|
-
| `wallet_transactions` |
|
|
159
|
-
| `wallet_compare` |
|
|
160
|
-
| `wallet_trace` |
|
|
161
|
-
| `wallet_counterparties` |
|
|
162
|
-
| `wallet_pnl_history` |
|
|
163
|
-
| `wallet_token_balances` |
|
|
164
|
-
| `wallet_ens` |
|
|
165
|
-
| `wallet_batch_labels` |
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
---
|
|
171
|
+
| `wallet_summary` | a dict keyed `all, 90d, 30d, 7d, 24h`, each with `total_volume, total_inflow, total_outflow, net_flow, tx_count, tokens_traded, first_seen, last_active`, for ONE chain (the most recently active; never summed) | no PnL, holdings or labels |
|
|
172
|
+
| `wallet_discover` | `{wallets, total}` ranked by volume / inflow / outflow / net_flow / tx_count / pnl (`size` ≤ 20; ethereum, bsc) | `realized_pnl` is a ranking key only, not a dollar figure; no labels column |
|
|
173
|
+
| `wallet_transactions` | single transfers, newest first | no aggregates |
|
|
174
|
+
| `wallet_compare` | shared counterparties + shared tokens of exactly two wallets | not 3+ wallets |
|
|
175
|
+
| `wallet_trace` | nodes + edges; direction lives in each edge's `out_usd` / `in_usd` | `from` is the side expanded first, not the sender |
|
|
176
|
+
| `wallet_counterparties` | top partners with sent/received USD and labels | |
|
|
177
|
+
| `wallet_pnl_history` | daily net inflow USD (a proxy) | not realized PnL |
|
|
178
|
+
| `wallet_token_balances` | holdings read from the chain at request time (ethereum, bsc); native coin is a row with `usd_value: null` | not a DeFi-position view |
|
|
179
|
+
| `wallet_ens` | name for an address, or `null` | no name → address |
|
|
180
|
+
| `wallet_batch_labels` | entity, type, risk flag + 30-day flow fields per address, in input order | on `bsc` the 30-day fields are `null` |
|
|
181
|
+
|
|
182
|
+
Chains: most token and wallet tools accept `chain` = `ethereum` | `bsc` | `base`, but Base coverage is narrower: it is documented for token transfers and `wallet_batch_labels`, while the per-wallet transfer tools (`wallet_transactions`, `wallet_counterparties`, `wallet_trace`, `wallet_compare`, `wallet_pnl_history`) are documented for Ethereum and BSC. `wallet_discover` takes `ethereum` | `bsc`, `wallet_token_balances` serves `ethereum` | `bsc` (anything else lands in `chain_errors`) and alerts take `eth` | `bsc`. `token_screener` smart-money mode and `smart_inflow` sort are `ethereum` only (a 400 elsewhere). `wallet_label_provenance` is for Ethereum wallets. Arbitrum, Bitcoin, Solana, Tron and other non-EVM chains are not served. When a chain is not covered, say so; an empty Base result means "not covered", not "no activity".
|
|
170
183
|
|
|
171
184
|
### Labels
|
|
172
|
-
|
|
185
|
+
`wallet_label_provenance` returns the raw source labels (at most 6 sources plus our heuristic classifier) and a consensus entity/type. When an answer hinges on "is this really a CEX hot wallet?", call it rather than trusting one source. `found: false` means the wallet is missing from our labelled-wallet table and no source is consulted at all, so it is not proof that nobody labels it, and it is not proof the wallet is clean.
|
|
173
186
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
---
|
|
181
|
-
|
|
182
|
-
### CEX Perps
|
|
183
|
-
5 venues: Binance, Bybit, OKX, Aster, Hyperliquid.
|
|
184
|
-
|
|
185
|
-
| Tool | Description | Skill |
|
|
186
|
-
|---|---|---|
|
|
187
|
-
| `perp_funding` | Funding rates per symbol per venue + 24h/7d averages | `vike-perp-funding-arb` |
|
|
188
|
-
| `perp_spreads` | Mark-price spreads of the same symbol across venues | `vike-perp-spread-arb`, `vike-cross-venue-perps` |
|
|
189
|
-
|
|
190
|
-
---
|
|
191
|
-
|
|
192
|
-
### Hyperliquid Perps
|
|
193
|
-
On-chain perps data: snapshots, fills, ledger, funding, attribution.
|
|
194
|
-
|
|
195
|
-
| Tool | Description | Skill |
|
|
196
|
-
|---|---|---|
|
|
197
|
-
| `hl_perp_top_traders` | Top HL traders by PnL/volume over a window | `vike-hl-top-traders`, `vike-hl-trader-profile` |
|
|
198
|
-
| `hl_position_match` | Reverse-lookup: share-card details (coin/side/lev/entry) → wallet holding that open position | `vike-hl-position-match` |
|
|
187
|
+
### CEX perps
|
|
188
|
+
| Tool | Returns |
|
|
189
|
+
|---|---|
|
|
190
|
+
| `perp_funding` | with `symbol`: raw per-venue `funding_rate` + `interval_h` (daily % = rate × 24 / interval_h × 100); without: up to 5 pre-ranked arb rows (`long_exchange`, `short_exchange`, `spread_daily_pct`) |
|
|
191
|
+
| `perp_spreads` | up to 10 cross-venue price-gap rows (≥ 0.5%); `symbol` only filters that global top 10, so it is often empty |
|
|
199
192
|
|
|
200
|
-
|
|
193
|
+
Neither returns mark prices or bid/ask per venue. "Spread" here is perp vs perp across venues, not spot vs perp.
|
|
201
194
|
|
|
202
|
-
|
|
195
|
+
### Hyperliquid
|
|
196
|
+
| Tool | Returns |
|
|
197
|
+
|---|---|
|
|
198
|
+
| `hl_perp_top_traders` | up to 20 wallets: `total_realized_pnl`, `roi_pct`, `win_rate_pct`, `max_drawdown_pct` (all percents; 12.5 = 12.5%), `trade_count`, `total_volume`. ROI = window realized PnL / CURRENT account value; drawdown is account-level and all-time |
|
|
199
|
+
| `hl_position_match` | wallets whose open position matches a share card (`symbol`, side, leverage, entry) |
|
|
200
|
+
| `hl_ohlcv` | perp or spot candles |
|
|
201
|
+
| `hl_wallet` (`vike-data hl wallet`) | one wallet: equity, open positions, cohort labels, risk metrics, lifetime flow; `--view trades_summary` for closed-trade stats |
|
|
202
|
+
| `hl_wallet_activity` (`hl wallet-activity`) | one wallet's fills, funding, ledger or builder routing, newest first, paged with `--cursor` |
|
|
203
|
+
| `hl_cohort_metrics` (`hl cohort-metrics <symbol>`) | hourly long/short notional per cohort of one symbol; `bias` is a fraction -1..+1. For a backtest pass `--label-basis point_in_time` |
|
|
204
|
+
| `hl_segments` (`hl segments`) | the cohort labels (`--view cohorts`), one cohort now (`summary`), the symbol x cohort board (`heatmap`), one cohort hour by hour (`history`) |
|
|
205
|
+
| `hl_leaderboard` (`hl leaderboard`) | traders on 20 metrics; `--min-win-rate` is a FRACTION here (0.6), a percent in `perp top-traders` |
|
|
206
|
+
| `hl_liquidations`, `hl_market`, `hl_builders`, `hl_vaults`, `hl_vault` | liquidations / risk / heatmap; open interest, symbol series, positions, indices, large fills, an hourly panel of up to 64 symbols; builder codes; vaults |
|
|
207
|
+
| `hl_orders`, `hl_twaps`, `hl_ledger`, `hl_leverage_changes` | resting orders at one instant, one wallet's orders, order clusters; the cross-wallet feeds (follow one with `--order asc` and each `nextCursor`, stop on an empty page) |
|
|
208
|
+
| `hl_wallet_trades`, `hl_stats`, `hl_hype_holders`, `hl_archive` | one wallet's closed trades; hourly venue equity / open interest / volume; HYPE holders; the daily fills and positions Parquet files (`--view url` = a 7-day link) |
|
|
209
|
+
|
|
210
|
+
Every `hl` command takes `--view` (the first view is the default) and only the flags that view uses: a flag the view does not take is refused by name, not ignored.
|
|
203
211
|
|
|
204
212
|
### Candles
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
| Tool | Description | Skill |
|
|
208
|
-
|---|---|---|
|
|
209
|
-
| `hl_ohlcv` | Hyperliquid perp or spot candles, 1m–1d, built from HL's own executed fills (also HIP-3 builder DEXs) | `vike-candles` |
|
|
210
|
-
| `polymarket_ohlcv` | Candles for ONE Polymarket outcome token (price = probability, 0–1); needs `token_id`, not a condition_id | `vike-candles` |
|
|
211
|
-
|
|
212
|
-
---
|
|
213
|
+
`hl_ohlcv` (Hyperliquid perp or spot, 1m–1d, built from HL's own fills, also HIP-3 builder DEXs) and `polymarket_ohlcv` (ONE outcome token, price = probability 0–1, needs a `token_id`, not a condition_id). `candles hl --view latest` is the newest 1-minute bar of every symbol; live closed bars come from `vike-data stream hl --channel hl.candles --filter coin=BTC --filter interval=1m`. There is no candle source for CEX tickers or an arbitrary ERC-20.
|
|
213
214
|
|
|
214
215
|
### Polymarket
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
|
218
|
-
|
|
219
|
-
| `
|
|
220
|
-
| `
|
|
221
|
-
| `polymarket_wallet` | One trader's positions, PnL, win rate | `vike-polymarket-trader` |
|
|
222
|
-
| `polymarket_smart_money` | Top-PnL Polymarket traders + their current open positions | `vike-polymarket-smart-money` |
|
|
223
|
-
|
|
224
|
-
---
|
|
216
|
+
| Tool | Returns |
|
|
217
|
+
|---|---|
|
|
218
|
+
| `polymarket_markets` | markets ranked by 24h volume only (`volume_24h`, `liquidity`, `ended`, `outcomes[]` with `token_id`, `mid`, `bid`, `ask`) |
|
|
219
|
+
| `polymarket_market_detail` | one market: quotes, smart-money cohort flows, top wallets, resolution status |
|
|
220
|
+
| `polymarket_wallet` | one trader: realized PnL, volume-weighted `hit_rate`, `resolved_markets`, positions |
|
|
221
|
+
| `polymarket_smart_money` | MARKETS where the profitable-wallet cohort is flowing (`flows`) or bought below the mid (`mispricings`); not a list of top traders |
|
|
225
222
|
|
|
226
223
|
### Alerts
|
|
227
|
-
Create + manage alerts
|
|
228
|
-
|
|
229
|
-
| Tool | Description | Skill |
|
|
230
|
-
|---|---|---|
|
|
231
|
-
| `alerts_list` | List user's existing alerts | `vike-alerts-setup` |
|
|
232
|
-
| `alerts_create` | Create a new price/transfer/funding alert | `vike-alerts-setup` |
|
|
233
|
-
| `alerts_edit` | Edit an existing alert | `vike-alerts-setup` |
|
|
234
|
-
| `alerts_delete` | Delete an alert | `vike-alerts-setup` |
|
|
235
|
-
| `alerts_list_channels` | List user's registered delivery channels | `vike-alerts-setup` |
|
|
236
|
-
| `alerts_register_webhook` | Register an HTTPS webhook (HMAC-signed deliveries) | `vike-alerts-webhook` |
|
|
224
|
+
Create + manage on-chain transfer alerts and Hyperliquid alerts, delivered by email or an HTTPS webhook.
|
|
237
225
|
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
## Historical data availability
|
|
241
|
-
|
|
242
|
-
Coverage windows per dataset. Don't ask for data older than the window — the tool will return empty or 503.
|
|
243
|
-
|
|
244
|
-
### Transfers & on-chain (per chain)
|
|
245
|
-
|
|
246
|
-
| Chain | Earliest block / date | Notes |
|
|
247
|
-
|---|---|---|
|
|
248
|
-
| Ethereum | 2018-01 (block ~4.85M) | Full history; ETH + ERC-20 |
|
|
249
|
-
| BSC | 2021-01 | Full history; BNB + BEP-20 |
|
|
250
|
-
| Base | 2023-08 (chain launch) | Full history |
|
|
251
|
-
| Arbitrum | 2024-Q3 onward | Backfill in progress; pre-2024 sparse |
|
|
252
|
-
| HyperEVM | 2025-Q1 (chain launch) | Full history |
|
|
253
|
-
| Bitcoin | 2024-01 | Recent windows only — full-history backfill not active |
|
|
254
|
-
| Solana | 2026-Q1 onward | Recent only — see `vike-cli` chain-coverage notes |
|
|
255
|
-
| Tron/XMR/ZEC/Dash | 2024 onward | Recent only |
|
|
256
|
-
|
|
257
|
-
### Hyperliquid perps (hl_perps DB)
|
|
258
|
-
|
|
259
|
-
| Dataset | Window | Notes |
|
|
260
|
-
|---|---|---|
|
|
261
|
-
| Snapshots (positions / equity) | 30 days | TTL — older snapshots dropped |
|
|
262
|
-
| Fills | 30 days | TTL |
|
|
263
|
-
| Ledger (deposits/withdrawals) | 30 days | TTL |
|
|
264
|
-
| Funding payments | 90 days | API-backed since 2026-04-22 |
|
|
265
|
-
| Daily attributed PnL | All-time | `wallet_pnl_attributed_daily` is the long-history view |
|
|
266
|
-
| Daily flows | All-time | `wallet_flows_daily` |
|
|
267
|
-
| Top-trader leaderboards | rolling 24h / 7d / 30d | derived on-the-fly |
|
|
268
|
-
|
|
269
|
-
### CEX perps (data_perp DB)
|
|
270
|
-
|
|
271
|
-
| Dataset | Window |
|
|
226
|
+
| Tool | Does |
|
|
272
227
|
|---|---|
|
|
273
|
-
| `
|
|
274
|
-
|
|
|
275
|
-
|
|
|
276
|
-
|
|
277
|
-
### Polymarket
|
|
278
|
-
|
|
279
|
-
| Dataset | Window | Notes |
|
|
280
|
-
|---|---|---|
|
|
281
|
-
| Active markets | live | scraper paused 2026-05-24 (CF block); historical snapshots still queryable |
|
|
282
|
-
| Wallet positions | last known snapshot | not real-time until scraper resumes |
|
|
228
|
+
| `alerts_list`, `alerts_list_channels` | list rules / enabled channels |
|
|
229
|
+
| `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`) |
|
|
230
|
+
| `alerts_events`, `alerts_resend_delivery` | what fired and each delivery's status (15 days); send one again |
|
|
231
|
+
| `alerts_register_webhook`, `alerts_test_webhook`, `alerts_rotate_webhook_secret` | an HTTPS webhook (HMAC-signed deliveries): register, test, rotate its secret |
|
|
283
232
|
|
|
284
|
-
|
|
233
|
+
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. Hyperliquid alerts go to a webhook or are read with `alerts events` (no 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`.
|
|
285
234
|
|
|
286
235
|
---
|
|
287
236
|
|
|
288
|
-
## Cost & rate
|
|
237
|
+
## Cost & rate limits
|
|
289
238
|
|
|
290
|
-
|
|
291
|
-
- **Standard (1-3 credits):** most tools.
|
|
292
|
-
- **Heavy (5+ credits):** `wallet_discover` with large pages, `wallet_trace` with deep `--depth`, `token_screener` with no filters, `hl_perp_top_traders` with `--limit > 100`.
|
|
239
|
+
Credits are an accounting figure only; they never block a call. The one limit is 20,000 requests per rolling hour per key, shared by MCP and REST.
|
|
293
240
|
|
|
294
|
-
|
|
241
|
+
- **0 credits:** `token_search`, `alerts_list`, `alerts_list_channels`.
|
|
242
|
+
- **1:** `wallet_ens`, `wallet_label_provenance`, `perp_funding`, `perp_spreads`, `hl_ohlcv`, `polymarket_markets`, `polymarket_ohlcv`.
|
|
243
|
+
- **2:** most others, `wallet_summary` among them.
|
|
244
|
+
- **3:** `token_screener`, `wallet_compare`, `wallet_token_balances`, `alerts_create`.
|
|
245
|
+
- **4:** `wallet_trace`.
|
|
295
246
|
|
|
296
247
|
## What vike does NOT do
|
|
297
248
|
|
|
298
249
|
- **No NFT data** — out of scope by design.
|
|
299
250
|
- **No on-chain trading / signing** — read-only platform, no execution.
|
|
300
|
-
- **No
|
|
251
|
+
- **No ENS name → address**, no candles for CEX tickers or arbitrary ERC-20 contracts.
|
|
252
|
+
- **No non-EVM chains** (Bitcoin, Solana, Tron, Monero, Zcash, Dash) and no Arbitrum.
|
|
301
253
|
|
|
302
254
|
If the user asks for any of the above, say so directly rather than proposing a workaround.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vike-alerts-setup
|
|
3
|
-
description: Create, list, edit, and delete on-chain transfer alerts
|
|
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".
|
|
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 +
|
|
15
|
+
Returns enabled email + webhook channels. **If a user creates an alert with a channel they haven't verified, the alert is saved but won't fire notifications.** Always check first. A Hyperliquid alert is delivered only by a webhook (`vike-alerts-webhook`), or read with `vike-data alerts events`.
|
|
16
16
|
|
|
17
17
|
## CRUD
|
|
18
18
|
|
|
@@ -35,14 +35,44 @@ vike-data alerts create \
|
|
|
35
35
|
--cooldown 60
|
|
36
36
|
```
|
|
37
37
|
|
|
38
|
-
Required: `--label`.
|
|
38
|
+
Required: `--label`. Transfer alerts: `--token`, `--chain eth|bsc|base|hyperevm` (default eth), `--min-usd`, `--max-usd`, `--address 0x...` with `--address-role any|from|to` to watch ONE wallet, `--channel email webhook`.
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
# One wallet: every transfer it receives on base (no cooldown, no daily cap)
|
|
42
|
+
vike-data alerts create --label "Treasury in" --chain base \
|
|
43
|
+
--address 0x1111111111111111111111111111111111111111 --address-role to --channel email
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Hyperliquid alerts (`--type`; leave out `--chain`, `--address`, `--max-usd`; delivered by `--channel webhook`, or with no channel read them with `vike-data alerts events`):
|
|
47
|
+
|
|
48
|
+
| `--type` | Fires on | Flags |
|
|
49
|
+
|---|---|---|
|
|
50
|
+
| `hl_wallet` | every fill of one wallet | `--wallet` (required), `--actions open close flip increase reduce`, `--token`, `--min-usd` |
|
|
51
|
+
| `hl_cohort_fill` | fills by wallets in cohorts | `--pnl-cohorts "3x smart" ...` and/or `--size-cohorts "4x whale" ...` (one required), `--min-usd` >= 10000 (required) |
|
|
52
|
+
| `hl_liquidation` | liquidations | optional `--wallet`, cohorts, `--token`, `--min-usd` |
|
|
53
|
+
| `hl_cohort_bias` | a cohort index crossing a level | `--token` and `--index smi\|wsi\|smart_bias\|whale_bias\|smi_wsi_gap` (required), `--threshold`, `--band`, `--direction up\|down\|both` |
|
|
54
|
+
| `hl_liq_proximity` | a wallet getting close to liquidation | `--wallet` (required), `--threshold` (0-1, default 0.8), `--band` |
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
vike-data alerts create --label "BTC smart money flips" --type hl_cohort_bias \
|
|
58
|
+
--token BTC --index smi --threshold 0 --band 0.1 --channel webhook
|
|
59
|
+
```
|
|
39
60
|
|
|
40
61
|
### Edit (partial update — only fields you pass are changed)
|
|
41
62
|
|
|
42
63
|
```bash
|
|
43
64
|
vike-data alerts edit 42 --min-usd 5000000 # raise threshold
|
|
44
65
|
vike-data alerts edit 42 --active false # pause
|
|
45
|
-
vike-data alerts edit 42 --channel email
|
|
66
|
+
vike-data alerts edit 42 --channel email webhook # both channels
|
|
67
|
+
vike-data alerts edit 42 --address '' # drop the wallet condition
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Events (what fired, and each delivery's status, kept 15 days)
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
vike-data alerts events --limit 50 --json # page on with --cursor <next_cursor>
|
|
74
|
+
vike-data alerts events --rule-id 42 --json
|
|
75
|
+
vike-data alerts resend <delivery_id> # send one delivery again
|
|
46
76
|
```
|
|
47
77
|
|
|
48
78
|
### Delete
|
|
@@ -54,9 +84,10 @@ vike-data alerts delete 42 --hard # permanently remove
|
|
|
54
84
|
|
|
55
85
|
## Notes + gotchas
|
|
56
86
|
|
|
57
|
-
-
|
|
87
|
+
- Transfer chains: **eth**, **bsc**, **base**, **hyperevm**, one per alert. For several, create several alerts.
|
|
88
|
+
- **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).
|
|
58
89
|
- Thresholds are in **USD value** of the transfer at fire time, not token quantity.
|
|
59
|
-
- `--cooldown` is
|
|
90
|
+
- `--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.
|
|
60
91
|
- Tokens are matched by symbol (UPPERCASE). For cross-chain symbols like `USDC` that exist on multiple chains, be explicit with `--chain`.
|
|
61
92
|
- Alerts created without a verified channel will be **silently inactive at fire time** — there is no automatic warning. Use `vike-data alerts channels` first.
|
|
62
93
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: vike-alerts-webhook
|
|
3
|
-
description: Register an HTTPS webhook as an alert delivery channel — get HMAC-signed POST notifications when alerts fire. Use when the user has a server / bot / Slack integration and wants programmatic alert delivery instead of email
|
|
3
|
+
description: Register an HTTPS webhook as an alert delivery channel — get HMAC-signed POST notifications when alerts fire (the only channel for Hyperliquid alerts); test it, rotate its secret, resend a delivery. Use when the user has a server / bot / Slack integration and wants programmatic alert delivery instead of email.
|
|
4
4
|
allowed-tools: Bash(vike-data:*)
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -29,7 +29,14 @@ vike-data alerts register-webhook https://api.mycoolbot.com/vike-alert \
|
|
|
29
29
|
# → { "ok": true, "channel_id": 42, "url_preview": "https://api.myc...", "signed": true }
|
|
30
30
|
```
|
|
31
31
|
|
|
32
|
-
Then create an alert
|
|
32
|
+
Then create an alert with `--channel webhook` (alongside `email` if wanted; a Hyperliquid alert takes the webhook only). Registration sends one signed `test` event at once; the channel id is in `vike-data alerts channels`.
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
vike-data alerts test-webhook <channel_id> # send the signed test event again
|
|
36
|
+
vike-data alerts rotate-secret <channel_id> # new secret; the old one keeps signing for 24 hours
|
|
37
|
+
vike-data alerts events --json # what fired, with each delivery's status
|
|
38
|
+
vike-data alerts resend <delivery_id> # send one delivery again (up to 15 days)
|
|
39
|
+
```
|
|
33
40
|
|
|
34
41
|
## What we POST to your URL
|
|
35
42
|
|
|
@@ -49,10 +56,10 @@ X-Vike-Signature: t=1716658923,sig=a3f8b2c...
|
|
|
49
56
|
import hmac, hashlib, time
|
|
50
57
|
|
|
51
58
|
def verify(secret, headers, body):
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
if not ts or not
|
|
59
|
+
ts = headers.get("X-Vike-Timestamp", "")
|
|
60
|
+
# During a secret rotation the header carries TWO sig= values: accept if ANY matches.
|
|
61
|
+
sigs = [p.split("=", 1)[1] for p in headers.get("X-Vike-Signature", "").split(",") if p.startswith("sig=")]
|
|
62
|
+
if not ts or not sigs:
|
|
56
63
|
return False
|
|
57
64
|
# Reject replays older than 5 min
|
|
58
65
|
if abs(time.time() - int(ts)) > 300:
|
|
@@ -60,7 +67,7 @@ def verify(secret, headers, body):
|
|
|
60
67
|
expected = hmac.new(
|
|
61
68
|
secret.encode(), f"{ts}.{body.decode()}".encode(), hashlib.sha256
|
|
62
69
|
).hexdigest()
|
|
63
|
-
return hmac.compare_digest(expected,
|
|
70
|
+
return any(hmac.compare_digest(expected, s) for s in sigs)
|
|
64
71
|
```
|
|
65
72
|
|
|
66
73
|
## Anti-patterns
|
|
@@ -76,7 +83,7 @@ def verify(secret, headers, body):
|
|
|
76
83
|
2. Reject if `X-Vike-Timestamp` is more than ~5 min old (replay protection)
|
|
77
84
|
3. Return `200` quickly; queue work async
|
|
78
85
|
4. Log full body for unsigned-but-suspicious requests
|
|
79
|
-
5. Rotate the secret if you suspect compromise —
|
|
86
|
+
5. Rotate the secret if you suspect compromise — `vike-data alerts rotate-secret <channel_id>`
|
|
80
87
|
|
|
81
88
|
## Pairs well with
|
|
82
89
|
|