@vike-io/cli 0.5.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.
Files changed (56) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/LICENSE +21 -0
  3. package/README.md +98 -0
  4. package/package.json +73 -0
  5. package/scripts/postinstall.js +20 -0
  6. package/skills/vike-alerts-setup/SKILL.md +75 -0
  7. package/skills/vike-alerts-webhook/SKILL.md +84 -0
  8. package/skills/vike-core/SKILL.md +67 -0
  9. package/skills/vike-cross-venue-perps/SKILL.md +52 -0
  10. package/skills/vike-defi-positions/SKILL.md +59 -0
  11. package/skills/vike-fund-holdings/SKILL.md +53 -0
  12. package/skills/vike-hl-top-traders/SKILL.md +52 -0
  13. package/skills/vike-hl-trader-profile/SKILL.md +65 -0
  14. package/skills/vike-options-flow/SKILL.md +49 -0
  15. package/skills/vike-perp-funding-arb/SKILL.md +53 -0
  16. package/skills/vike-perp-screener/SKILL.md +49 -0
  17. package/skills/vike-perp-spread-arb/SKILL.md +38 -0
  18. package/skills/vike-polymarket-market-detail/SKILL.md +42 -0
  19. package/skills/vike-polymarket-markets/SKILL.md +44 -0
  20. package/skills/vike-polymarket-screener/SKILL.md +59 -0
  21. package/skills/vike-polymarket-smart-money/SKILL.md +58 -0
  22. package/skills/vike-polymarket-trader/SKILL.md +55 -0
  23. package/skills/vike-router/SKILL.md +53 -0
  24. package/skills/vike-smart-money-discovery/SKILL.md +74 -0
  25. package/skills/vike-token-holders/SKILL.md +45 -0
  26. package/skills/vike-token-research/SKILL.md +55 -0
  27. package/skills/vike-token-search/SKILL.md +40 -0
  28. package/skills/vike-token-transfers/SKILL.md +43 -0
  29. package/skills/vike-wallet-balances/SKILL.md +60 -0
  30. package/skills/vike-wallet-counterparties/SKILL.md +48 -0
  31. package/skills/vike-wallet-discover/SKILL.md +49 -0
  32. package/skills/vike-wallet-ens/SKILL.md +41 -0
  33. package/skills/vike-wallet-label-provenance/SKILL.md +65 -0
  34. package/skills/vike-wallet-pnl-history/SKILL.md +58 -0
  35. package/skills/vike-wallet-portfolio/SKILL.md +61 -0
  36. package/skills/vike-wallet-summary/SKILL.md +35 -0
  37. package/skills/vike-web-fetch/SKILL.md +55 -0
  38. package/skills/vike-web-research/SKILL.md +58 -0
  39. package/skills/vike-web-search/SKILL.md +60 -0
  40. package/src/auth.js +55 -0
  41. package/src/commands/alerts.js +118 -0
  42. package/src/commands/auth.js +43 -0
  43. package/src/commands/doctor.js +87 -0
  44. package/src/commands/init.js +50 -0
  45. package/src/commands/labels.js +48 -0
  46. package/src/commands/options.js +24 -0
  47. package/src/commands/perp.js +59 -0
  48. package/src/commands/polymarket.js +74 -0
  49. package/src/commands/schema.js +31 -0
  50. package/src/commands/token.js +77 -0
  51. package/src/commands/wallet.js +106 -0
  52. package/src/commands/web.js +41 -0
  53. package/src/format.js +83 -0
  54. package/src/index.js +44 -0
  55. package/src/mcp-client.js +94 -0
  56. package/src/util.js +25 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,23 @@
1
+ # Changelog
2
+
3
+ All notable changes are documented here. Entries follow [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
4
+
5
+ ## 0.5.0 — initial public release
6
+
7
+ AI-agent CLI for vike.io on-chain analytics, perpetuals, options flow, and prediction-market data across 11 chains.
8
+
9
+ **15 command groups, 29 backing MCP tools, 33 SKILL.md playbooks** for Claude Code, OpenClaw, Cursor, GitHub Copilot, and other agent runtimes.
10
+
11
+ ```
12
+ vike token search | transfers | chart | holders
13
+ vike wallet summary | discover | counterparties | pnl-history | balances | ens
14
+ vike perp funding | spreads | top-traders
15
+ vike options flow
16
+ vike polymarket markets | market | wallet | smart-money
17
+ vike funds | labels | defi
18
+ vike web search | fetch
19
+ vike alerts list | channels | create | edit | delete | register-webhook
20
+ vike init | doctor | schema | whoami | login | logout
21
+ ```
22
+
23
+ Skill discovery: agents auto-discover skills from the `skills/` folder. Manual install: `npx skills add vike-io/vike-cli`.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 vike.io
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # @vike-io/cli
2
+
3
+ > Repo + package: `@vike-io/cli` (npm) · `vike-io/vike-cli` (GitHub) · binary: `vike`
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@vike-io/cli.svg)](https://www.npmjs.com/package/@vike-io/cli)
6
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
7
+ [![Node](https://img.shields.io/badge/node-%3E%3D20-brightgreen.svg)](https://nodejs.org)
8
+
9
+ > **Command-line interface for the [vike.io](https://vike.io) API.** On-chain analytics, perpetuals, options flow, and prediction-market data across 11 chains — designed to be driven by AI agents (Claude Code, OpenClaw) as well as humans.
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install -g @vike-io/cli
15
+ ```
16
+
17
+ ## Quick start
18
+
19
+ ```bash
20
+ vike init # interactive: paste API key, verify connection
21
+ vike doctor # confirm everything works
22
+ vike token search BTC # your first query
23
+ ```
24
+
25
+ Get an API key at [vike.io/api/keys](https://vike.io/api/keys).
26
+
27
+ ## Commands at a glance
28
+
29
+ ```
30
+ vike token search | transfers | chart
31
+ vike wallet summary | discover
32
+ vike perp funding | spreads | top-traders
33
+ vike options flow
34
+ vike alerts list | channels | create | edit | delete
35
+ vike init | doctor | schema | whoami | login | logout
36
+ ```
37
+
38
+ Run `vike schema --pretty` for the full command + flag reference.
39
+
40
+ ## What it does
41
+
42
+ | Domain | What you can ask |
43
+ |---|---|
44
+ | **Tokens** | Resolve symbols → addresses, see top buyers/sellers, pull OHLCV |
45
+ | **Wallets** | Aggregate metrics per wallet, leaderboards by volume / PnL / netflow |
46
+ | **Perps** | Funding rates + cross-venue spreads across Binance / Bybit / OKX / Aster / Hyperliquid |
47
+ | **Hyperliquid** | Top-trader leaderboard with PnL / ROI / win-rate filters |
48
+ | **Options** | Deribit flow for BTC / ETH / SOL with put-call ratios |
49
+ | **Alerts** | Create transfer alerts; deliver to email or Discord |
50
+
51
+ ## For AI agents
52
+
53
+ This package ships **skill playbooks** under [`skills/`](skills/) — markdown files designed to be loaded by AI coding agents (Claude Code, OpenClaw, Cursor) so they know when and how to invoke each command.
54
+
55
+ Skill entry points:
56
+ - `vike-core` — install + auth + conventions (read first)
57
+ - `vike-router` — decide which skill applies
58
+ - `vike-token-research`, `vike-smart-money-discovery`, `vike-perp-funding-arb`, `vike-perp-screener`, `vike-hl-top-traders`, `vike-hl-trader-profile`, `vike-cross-venue-perps`, `vike-options-flow`, `vike-alerts-setup` — task playbooks
59
+ - Per-tool skills for each command
60
+
61
+ In Claude Code, the bundled skills are auto-discovered after `npm install -g @vike-io/cli`. In other harnesses, point the agent at the `skills/` folder of this package.
62
+
63
+ ## Auth
64
+
65
+ Three ways to provide your key, in order of precedence:
66
+
67
+ ```bash
68
+ export VIKE_API_KEY=vk_... # env (wins over everything)
69
+ vike login --api-key vk_... # saved to ~/.vike/config.json
70
+ vike init # interactive
71
+ ```
72
+
73
+ ## Environment
74
+
75
+ | Variable | Default | Purpose |
76
+ |---|---|---|
77
+ | `VIKE_API_KEY` | — | API key (overrides saved config) |
78
+ | `VIKE_MCP_URL` | `https://vike.io/mcp` | MCP endpoint (override for staging/local) |
79
+
80
+ ## Output formatting
81
+
82
+ By default, table output for humans (TTY) and JSON when piped:
83
+
84
+ ```bash
85
+ vike token search BTC # pretty table
86
+ vike token search BTC --json # JSON
87
+ vike token search BTC | jq '.' # auto-JSON when piped
88
+ ```
89
+
90
+ ## License
91
+
92
+ MIT — see [LICENSE](LICENSE).
93
+
94
+ ## Links
95
+
96
+ - Homepage: [vike.io](https://vike.io)
97
+ - Issues: [github.com/vike-io/vike-cli/issues](https://github.com/vike-io/vike-cli/issues)
98
+ - API docs: [vike.io/api](https://vike.io/api)
package/package.json ADDED
@@ -0,0 +1,73 @@
1
+ {
2
+ "name": "@vike-io/cli",
3
+ "publishConfig": {
4
+ "access": "public"
5
+ },
6
+ "version": "0.5.0",
7
+ "description": "AI-agent CLI for vike.io on-chain analytics, perps, options, and prediction markets across 11 chains",
8
+ "type": "module",
9
+ "main": "src/index.js",
10
+ "bin": {
11
+ "vike": "./src/index.js"
12
+ },
13
+ "files": [
14
+ "src/**/*.js",
15
+ "scripts/postinstall.js",
16
+ "skills/**",
17
+ "CHANGELOG.md"
18
+ ],
19
+ "scripts": {
20
+ "postinstall": "node scripts/postinstall.js",
21
+ "start": "node src/index.js",
22
+ "test": "vitest run --passWithNoTests",
23
+ "test:watch": "vitest",
24
+ "lint": "eslint .",
25
+ "lint:fix": "eslint . --fix",
26
+ "changeset": "changeset",
27
+ "changeset:version": "changeset version",
28
+ "changeset:publish": "changeset publish",
29
+ "sync-schema": "node scripts/sync-schema.js"
30
+ },
31
+ "keywords": [
32
+ "vike",
33
+ "crypto",
34
+ "blockchain",
35
+ "mcp",
36
+ "ai-agent",
37
+ "claude-code",
38
+ "openclaw",
39
+ "smart-money",
40
+ "onchain",
41
+ "perps",
42
+ "hyperliquid",
43
+ "options",
44
+ "deribit",
45
+ "polymarket",
46
+ "prediction-markets",
47
+ "defi",
48
+ "ethereum",
49
+ "bsc",
50
+ "base"
51
+ ],
52
+ "author": "vike.io",
53
+ "license": "MIT",
54
+ "repository": {
55
+ "type": "git",
56
+ "url": "git+https://github.com/vike-io/vike-cli.git"
57
+ },
58
+ "bugs": {
59
+ "url": "https://github.com/vike-io/vike-cli/issues"
60
+ },
61
+ "homepage": "https://vike.io",
62
+ "engines": {
63
+ "node": ">=20.0.0"
64
+ },
65
+ "dependencies": {
66
+ "commander": "^12.1.0"
67
+ },
68
+ "devDependencies": {
69
+ "@changesets/cli": "^2.27.9",
70
+ "eslint": "^9.15.0",
71
+ "vitest": "^2.1.5"
72
+ }
73
+ }
@@ -0,0 +1,20 @@
1
+ // Postinstall — print a friendly setup hint when the user installs vike-cli.
2
+ // Silent in CI environments to avoid log noise.
3
+
4
+ if (process.env.CI || process.env.npm_config_loglevel === 'silent') {
5
+ process.exit(0);
6
+ }
7
+
8
+ const lines = [
9
+ '',
10
+ ' @vike-io/cli installed.',
11
+ '',
12
+ ' Next steps:',
13
+ ' vike init — interactive setup',
14
+ ' vike doctor — verify your install',
15
+ ' vike token search BTC — your first query',
16
+ '',
17
+ ' Docs: https://vike.io/api',
18
+ '',
19
+ ];
20
+ process.stdout.write(lines.join('\n'));
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: vike-alerts-setup
3
+ description: Create, list, edit, and delete on-chain transfer alerts. Alerts fire when a token transfer crosses USD thresholds you set and deliver to email or Discord. Use when the user asks "alert me when X" / "watch for big transfers" / "notify on whale moves".
4
+ allowed-tools: Bash(vike:*)
5
+ ---
6
+
7
+ # vike-alerts-setup
8
+
9
+ ## Pre-check: what channels does the user have set up?
10
+
11
+ ```bash
12
+ vike alerts channels --json
13
+ ```
14
+
15
+ Returns enabled email + Discord 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.
16
+
17
+ ## CRUD
18
+
19
+ ### List
20
+
21
+ ```bash
22
+ vike alerts list --json # active alerts
23
+ vike alerts list --include-inactive --json # also paused/deleted
24
+ ```
25
+
26
+ ### Create
27
+
28
+ ```bash
29
+ vike alerts create \
30
+ --label "Big USDC moves" \
31
+ --token USDC \
32
+ --chain eth \
33
+ --min-usd 1000000 \
34
+ --channel email \
35
+ --cooldown 60
36
+ ```
37
+
38
+ Required: `--label`. Common: `--token`, `--chain eth|bsc`, `--min-usd`, `--channel email|discord` (can repeat).
39
+
40
+ ### Edit (partial update — only fields you pass are changed)
41
+
42
+ ```bash
43
+ vike alerts edit 42 --min-usd 5000000 # raise threshold
44
+ vike alerts edit 42 --active false # pause
45
+ vike alerts edit 42 --channel email --channel discord # add second channel
46
+ ```
47
+
48
+ ### Delete
49
+
50
+ ```bash
51
+ vike alerts delete 42 # soft-delete (pauses, keeps history)
52
+ vike alerts delete 42 --hard # permanently remove
53
+ ```
54
+
55
+ ## Notes + gotchas
56
+
57
+ - Currently chains supported: **eth** and **bsc** only. For both, create two alerts.
58
+ - Thresholds are in **USD value** of the transfer at fire time, not token quantity.
59
+ - `--cooldown` is per-alert minimum gap between triggers (default 60 min). Useful to avoid spam during high-volume hours.
60
+ - Tokens are matched by symbol (UPPERCASE). For cross-chain symbols like `USDC` that exist on multiple chains, be explicit with `--chain`.
61
+ - Alerts created without a verified channel will be **silently inactive at fire time** — there is no automatic warning. Use `vike alerts channels` first.
62
+
63
+ ## Confirmation flow with the user
64
+
65
+ Before creating an alert, summarize back what will be created:
66
+
67
+ > Creating alert "**Big USDC moves**": will fire when a USDC transfer on **eth** exceeds **$1M**, delivered via **email**, with a 60-minute cooldown. OK to proceed?
68
+
69
+ Wait for confirmation, then run `vike alerts create`.
70
+
71
+ ## Anti-patterns
72
+
73
+ - Don't create more than 5 alerts in one batch without confirmation — users almost always over-set on the first try.
74
+ - Don't quote thresholds as token amounts ("alert when 1000 ETH moves"). The system thresholds on USD only.
75
+ - If `min-usd` is < 10000, warn the user — they'll get spammed.
@@ -0,0 +1,84 @@
1
+ ---
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/Discord.
4
+ allowed-tools: Bash(vike:*)
5
+ ---
6
+
7
+ # vike-alerts-webhook
8
+
9
+ ## Registration
10
+
11
+ ```bash
12
+ vike alerts register-webhook <https://your-server.com/vike-hook>
13
+ [--secret <16+ char HMAC secret>]
14
+ [--json]
15
+ ```
16
+
17
+ The secret is **optional but strongly recommended** — without it we still POST, but the recipient has no way to verify it came from us.
18
+
19
+ ## Example
20
+
21
+ ```bash
22
+ # Generate a strong secret first
23
+ openssl rand -hex 32
24
+ # → 7f5c8b... (paste below)
25
+
26
+ vike alerts register-webhook https://api.mycoolbot.com/vike-alert \
27
+ --secret 7f5c8b... \
28
+ --json
29
+ # → { "ok": true, "channel_id": 42, "url_preview": "https://api.myc...", "signed": true }
30
+ ```
31
+
32
+ Then create an alert and reference the channel — webhooks fire alongside email/discord. (Currently the `alerts create` flow doesn't accept channel IDs directly; webhooks fire if they're the user's enabled channels.)
33
+
34
+ ## What we POST to your URL
35
+
36
+ ```http
37
+ POST /vike-hook HTTP/1.1
38
+ Content-Type: application/json
39
+ User-Agent: vike-alerts/1.0
40
+ X-Vike-Timestamp: 1716658923
41
+ X-Vike-Signature: t=1716658923,sig=a3f8b2c...
42
+
43
+ {"alert_id":42,"alert_label":"Big USDC moves","alert_type":"transfer","triggered_at":"2026-05-25T17:42:00+00:00","chain":"eth","token":"USDC","value_usd":1234567.89,"from_address":"0x...","to_address":"0x...","tx_hash":"0x..."}
44
+ ```
45
+
46
+ ## How to verify the signature (Python)
47
+
48
+ ```python
49
+ import hmac, hashlib, time
50
+
51
+ def verify(secret, headers, body):
52
+ sig_header = headers.get("X-Vike-Signature", "")
53
+ parts = dict(p.split("=", 1) for p in sig_header.split(","))
54
+ ts, sig = parts.get("t"), parts.get("sig")
55
+ if not ts or not sig:
56
+ return False
57
+ # Reject replays older than 5 min
58
+ if abs(time.time() - int(ts)) > 300:
59
+ return False
60
+ expected = hmac.new(
61
+ secret.encode(), f"{ts}.{body.decode()}".encode(), hashlib.sha256
62
+ ).hexdigest()
63
+ return hmac.compare_digest(expected, sig)
64
+ ```
65
+
66
+ ## Anti-patterns
67
+
68
+ - **Don't** skip the secret. Anyone who knows your webhook URL can spoof alerts without it.
69
+ - **Don't** trust the body without verifying the signature. The URL doesn't authenticate the sender; the HMAC does.
70
+ - **Don't** use HTTP (only HTTPS) in production — the body is sensitive.
71
+ - **Don't** respond slowly — we time out after 10s. If your handler does heavy work, queue it (push to a job queue, return 200 immediately).
72
+
73
+ ## Security checklist for your handler
74
+
75
+ 1. Verify the HMAC signature in constant time (`hmac.compare_digest`, not `==`)
76
+ 2. Reject if `X-Vike-Timestamp` is more than ~5 min old (replay protection)
77
+ 3. Return `200` quickly; queue work async
78
+ 4. Log full body for unsigned-but-suspicious requests
79
+ 5. Rotate the secret if you suspect compromise — re-register a new channel
80
+
81
+ ## Pairs well with
82
+
83
+ - `vike alerts create` — create the alert that fires to your webhook
84
+ - `vike alerts list` / `vike alerts channels` — confirm registration
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: vike-core
3
+ description: Install-first skill — authentication, setup, and CLI conventions for the vike toolkit. Use when you see any `vike <cmd>` reference or the user mentions on-chain analytics, Hyperliquid perps, options flow, or prediction markets.
4
+ metadata:
5
+ openclaw:
6
+ requires:
7
+ env: [VIKE_API_KEY]
8
+ bins: [vike]
9
+ primaryEnv: VIKE_API_KEY
10
+ install:
11
+ - kind: node
12
+ package: "@vike-io/cli"
13
+ bins: [vike]
14
+ allowed-tools: Bash(vike:*)
15
+ ---
16
+
17
+ # vike-core
18
+
19
+ Install + auth + conventions. Read this first; every other `vike-*` skill assumes it.
20
+
21
+ ## Install
22
+
23
+ ```bash
24
+ npm install -g @vike-io/cli
25
+ ```
26
+
27
+ ## Authenticate (one of these)
28
+
29
+ ```bash
30
+ vike init # interactive: prompt for API key + verify
31
+ vike login --api-key vk_... # non-interactive
32
+ export VIKE_API_KEY=vk_... # env (wins over saved config)
33
+ ```
34
+
35
+ Get an API key at https://vike.io/api/keys
36
+
37
+ ## Verify
38
+
39
+ ```bash
40
+ vike doctor # Node version + API key + endpoint reachability + tool count
41
+ vike whoami # which key is in use (masked)
42
+ vike schema --pretty # full command list with flags
43
+ ```
44
+
45
+ ## Conventions
46
+
47
+ - All commands accept `--json` for pipe-friendly output. Without it, you get a human-readable table.
48
+ - Addresses: pass full 0x-prefixed hex (42 chars). Never truncate when reporting back to the user.
49
+ - USD amounts: integers/decimals (e.g. `--min-usd 10000`).
50
+ - Chain identifiers: `eth`, `bsc`, `base`, `arb`, `hyper`, `btc`, `sol`, `tron`, `xmr`, `zec`, `dash` (depending on the command — some only support a subset).
51
+ - Time windows: `24h`, `7d`, `30d`, `90d`, `all` (per command; check `vike <cmd> --help`).
52
+
53
+ ## Errors
54
+
55
+ - `No API key` → run `vike init` or set `VIKE_API_KEY`.
56
+ - `MCP error -32000: Hourly rate limit exceeded` → you hit the per-key cap; wait or upgrade your plan.
57
+ - `Network error` / timeout → check `vike doctor`; the endpoint is `https://vike.io/mcp`.
58
+ - `503` from a tool → upstream data source temporarily down; retry in 30s.
59
+
60
+ ## Cost awareness
61
+
62
+ Each tool call consumes credits against your API key quota. Cheap calls: `token search`, `wallet summary`, `alerts list`. Heavier: `wallet discover`, `hl_perp_top_traders` (large result sets).
63
+
64
+ ## When to use a router skill vs a task skill
65
+
66
+ - **Router skills** (`vike-router`, topic-level) — when the user is exploring or unsure which command they need.
67
+ - **Task skills** (`vike-smart-money-discovery`, `vike-perp-funding-arb`, etc.) — when the user has a specific question that maps to a known workflow.
@@ -0,0 +1,52 @@
1
+ ---
2
+ name: vike-cross-venue-perps
3
+ description: Compare a single perp symbol across all venues — funding, price, spreads. Use when the user asks "where to trade X" / "compare BTC perp across exchanges" / "best venue for ETH long".
4
+ allowed-tools: Bash(vike:*)
5
+ ---
6
+
7
+ # vike-cross-venue-perps
8
+
9
+ Per-symbol cross-venue analysis.
10
+
11
+ ## Steps
12
+
13
+ 1. Per-venue funding
14
+ ```bash
15
+ vike perp funding --symbol <SYM> --json
16
+ ```
17
+ 2. Per-venue spread
18
+ ```bash
19
+ vike perp spreads --symbol <SYM> --json
20
+ ```
21
+
22
+ ## Report template
23
+
24
+ > **`<SYM>` perp — venue comparison**
25
+ >
26
+ > | Venue | Mark price | Funding (daily %) | Bid-ask edge |
27
+ > |---|---|---|---|
28
+ > | Binance | ... | ... | ... |
29
+ > | Bybit | ... | ... | ... |
30
+ > | OKX | ... | ... | ... |
31
+ > | Aster | ... | ... | ... |
32
+ > | Hyperliquid | ... | ... | ... |
33
+ >
34
+ > **Best venue to long**: `<X>` (lowest funding paid)
35
+ > **Best venue to short**: `<Y>` (highest funding received)
36
+ > **Arb edge**: long-short spread = X%/day
37
+
38
+ ## Reading
39
+
40
+ - Negative funding on venue → shorts pay longs (longs receive). Good place to be long.
41
+ - Positive funding → longs pay shorts. Good place to be short.
42
+ - A wide divergence (>0.5%/day) between two venues with similar liquidity = arb edge worth quantifying.
43
+
44
+ ## Anti-patterns
45
+
46
+ - Don't blindly pick the venue with lowest funding without checking liquidity — Hyperliquid funding looks great on small alts but the book might be thin.
47
+ - Funding flips frequently; the read here is "as of now", not a forecast.
48
+
49
+ ## Pairs well with
50
+
51
+ - `vike-perp-funding-arb` for the full opportunity list across all symbols
52
+ - `vike-perp-screener` for market overview
@@ -0,0 +1,59 @@
1
+ ---
2
+ name: vike-defi-positions
3
+ description: DeFi protocol positions for a wallet across all DeBank-supported chains (Aave, Uniswap LP, Curve, Pendle, EigenLayer, etc.) — net USD, asset USD, debt USD per protocol. Use when the user asks "what DeFi positions does this wallet have" / "is wallet X farming yields" / "show me the protocol breakdown for Y".
4
+ allowed-tools: Bash(vike:*)
5
+ ---
6
+
7
+ # vike-defi-positions
8
+
9
+ ## Command
10
+
11
+ ```bash
12
+ vike defi <address> [--json]
13
+ ```
14
+
15
+ ## Example
16
+
17
+ ```bash
18
+ vike defi 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045 # vitalik.eth
19
+ ```
20
+
21
+ ## Output shape
22
+
23
+ ```json
24
+ {
25
+ "address": "0x...",
26
+ "total_balance": {
27
+ "total_usd": 12345.67,
28
+ "chains": [
29
+ { "chain": "eth", "usd": 9000.00 },
30
+ { "chain": "arb", "usd": 2000.00 },
31
+ { "chain": "base", "usd": 1345.67 }
32
+ ]
33
+ },
34
+ "protocols": [
35
+ { "protocol": "Aave V3", "chain": "eth", "net_usd": 5000.00, "asset_usd": 8000.00, "debt_usd": 3000.00, "positions": 2 },
36
+ { "protocol": "Uniswap V3", "chain": "eth", "net_usd": 2500.00, "asset_usd": 2500.00, "debt_usd": 0.00, "positions": 4 },
37
+ ...
38
+ ]
39
+ }
40
+ ```
41
+
42
+ ## Reading
43
+
44
+ - `net_usd = asset_usd - debt_usd` — what the position is actually worth
45
+ - A protocol row with `debt_usd > 0` means the wallet is **borrowing** (Aave / Compound / Morpho). High debt + low asset = leveraged.
46
+ - `positions` count tells you how many active positions inside one protocol (e.g. 4 Uniswap LP positions)
47
+ - `total_balance.total_usd` includes both DeFi positions AND wallet token balances; the `protocols` array is DeFi-only
48
+
49
+ ## Anti-patterns
50
+
51
+ - DeBank may not cover every L2/protocol — a missing protocol doesn't mean the wallet has no position there
52
+ - The `chain` field uses DeBank's IDs (`eth`, `bsc`, `matic`, `arb`, `op`, `base`, etc.) — translate to user-friendly names when reporting
53
+ - Stale data: DeBank refresh varies; freshly-opened positions may not show for 5-15 min
54
+ - If you get `balance_error` or `positions_error`, the DeBank API is rate-limited / down — retry once, then surface the error honestly
55
+
56
+ ## Pairs well with
57
+
58
+ - `vike labels <addr>` — combine label provenance with DeFi positions for a full institutional view
59
+ - `vike wallet summary <addr>` — on-chain transfer activity vs DeFi positions for the same wallet
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: vike-fund-holdings
3
+ description: Top labeled fund / market-maker / treasury / CEX wallets ranked by recent net inflow USD. Use when the user asks "what are funds buying" / "which whales are accumulating" / "track institutional flows".
4
+ allowed-tools: Bash(vike:*)
5
+ ---
6
+
7
+ # vike-fund-holdings
8
+
9
+ ## Command
10
+
11
+ ```bash
12
+ vike funds [--kind funds|cex|mm|treasury] [--window 7d|30d|90d|180d|all] [--limit N] [--json]
13
+ ```
14
+
15
+ ## Examples
16
+
17
+ ```bash
18
+ vike funds --kind funds --window 30d --limit 10
19
+ vike funds --kind cex --window 7d --limit 20
20
+ vike funds --kind treasury --window 90d
21
+ vike funds --kind mm --window 30d
22
+ ```
23
+
24
+ ## Kind filters
25
+
26
+ | Kind | Includes |
27
+ |---|---|
28
+ | `funds` (default) | Treasury wallets + market-makers + custody anchors + Fund / Hedge / VC / Foundation / DAO categories |
29
+ | `cex` | Exchanges (Binance, Coinbase, Bybit, OKX, etc.) |
30
+ | `mm` | Market-makers (Wintermute, GSR, Jump, etc.) |
31
+ | `treasury` | DAO + corporate treasury wallets |
32
+
33
+ ## Output columns
34
+
35
+ `wallet`, `entity`, `label` (raw provider tag, when available), `wallet_type`, `confidence`, `net_flow_usd` (window), `volume_usd` (window), `tx_count` (window)
36
+
37
+ ## Reading
38
+
39
+ - **Sort is descending by net_flow_usd** — top accumulators come first
40
+ - A wallet with `entity = "Binance"` and `wallet_type = "cex"` showing massive net inflow = users depositing TO Binance (bearish for prices on the way in), or Binance moving inventory internally
41
+ - `confidence = "High"` rows have multi-source label agreement; `Low` rows are heuristic-only
42
+ - Negative `net_flow_usd` in a list sorted descending = no accumulators above this row; everyone is net-selling
43
+
44
+ ## Anti-patterns
45
+
46
+ - Don't quote "Binance bought $50M of X" from this view — it's wallet-level flow, not per-token attribution. For per-token, use `vike token holders` then filter for CEX labels.
47
+ - Treasury wallets often have huge one-time inflows (e.g. ICO unlocks); a single 30d window can be misleading. Check `--window all` for context.
48
+
49
+ ## Pairs well with
50
+
51
+ - `vike labels <addr>` — drill into any specific wallet's full label cascade
52
+ - `vike token holders <addr>` — see which of these wallets hold a specific token
53
+ - `vike-smart-money-discovery` — find unlabeled smart wallets vs labeled funds