@vike-io/cli 0.19.0 → 0.21.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 +12 -0
- package/README.md +3 -3
- package/package.json +1 -1
- package/skills/vike/SKILL.md +6 -5
- package/skills/vike-hl-asset-briefing/SKILL.md +1 -1
- package/skills/vike-hl-trader-profile/SKILL.md +1 -1
- package/skills/vike-predictfun-trader/SKILL.md +2 -0
- package/skills/vike-stream/SKILL.md +10 -1
- package/src/commands/hl.js +9 -6
- package/src/commands/predictfun.js +7 -0
- package/src/commands/stream.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.21.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 80498fd: `hl orders --view book`: one Hyperliquid symbol's order book at one instant, price levels best first (`--symbol`, `--at`, `--side both|bid|ask`, `--levels`, default 100, max 1000). `--market perp|spot` on the `open`, `clusters` and `book` views (a spot symbol is a pair, `HYPE/USDC`); `--cohort-axis` and `--cohort` on `open` too, whose rows now carry the owner's `sizeCohort`, `pnlCohort` and `pnlCumUsd`. `stream --filter kind=resting|trigger` is sent as one value (the `hl.order_walls` filter); the `vike-stream` skill names the walls' new fields (`kind`, `dex`, `source`, `trigger_type` / `trigger_px`, and on `disappeared` the `outcome` and `filled_usd`).
|
|
8
|
+
|
|
9
|
+
## 0.20.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- `predictfun wallet-flows <address>`: one Predict.fun wallet's USDT deposits and withdrawals on BNB Chain (MCP tool `predictfun_wallet_flows`), newest first, with whole-history totals and the first funder.
|
|
14
|
+
|
|
3
15
|
## 0.19.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ The key is read from `VIKE_API_KEY` first, then from `~/.vike/config.json`
|
|
|
56
56
|
| **Polymarket up/down families** (archive) | The same archive cut per market family, `asset=btc/tenor=5m` and so on, with an `asset=other/tenor=other` catch-all | free key | [polymarket-updown-markets](https://vike.io/data/polymarket-updown-markets) |
|
|
57
57
|
| **Polymarket API** `/v1/polymarket` | Markets, the raw event and trade tape (about 30 days back), order-book snapshots, candles, on-chain settlements | free key | [polymarket](https://vike.io/data/polymarket) |
|
|
58
58
|
| **Hyperliquid cohorts** `/v1/hyperliquid/coins/{coin}/cohort-metrics` | Long vs short per cohort, hourly, up to 8,760 hours in one request. Axes: `size` (account value, shrimp to 4x whale), `tier` (position notional), `pnl` (realized-PnL percentile), `pnl_abs` (PnL in dollars). `labelBasis=point_in_time` grades each hour with the label it had then (from 2026-04-07). | free key | [hl-cohorts](https://vike.io/data/hl-cohorts) |
|
|
59
|
-
| **Hyperliquid API** `/v1/hyperliquid` | Trader rankings and leaderboards, 5-minute position snapshots kept for a year, wallet fills, funding and ledger, liquidations (inferred from snapshots), builders, candles since the start of 2026; closed bars also stream live as the `hl.candles` channel of `wss://stream.vike.io/v1/stream/hl` | free key | [hyperliquid](https://vike.io/data/hyperliquid) |
|
|
59
|
+
| **Hyperliquid API** `/v1/hyperliquid` | Trader rankings and leaderboards, 5-minute position snapshots kept for a year, wallet fills, funding and ledger, standing orders and the order book (perp and spot), liquidations (inferred from snapshots), builders, candles since the start of 2026; closed bars also stream live as the `hl.candles` channel of `wss://stream.vike.io/v1/stream/hl` | free key | [hyperliquid](https://vike.io/data/hyperliquid) |
|
|
60
60
|
| **Predict.fun API** `/v1/predictfun` | Prediction markets on BNB Chain: a venue overview, the market catalog with 24h volume, one market's outcomes and stats, the newest recorded order book (the ~1,000 most active open markets), every on-chain fill with the wallet behind it, per-wallet positions and P&L, and a leaderboard of every wallet by realized and unrealized P&L, volume and fills | free key | [predictfun](https://vike.io/predictfun) |
|
|
61
61
|
| **Event streams** `wss://stream.vike.io/v1/stream/<path>` | Live events with a resume cursor on four paths: `hl` (fills, liquidations, positions, top-10 positions per coin, closed trades, liquidation risk, order walls, candles, TWAPs, ledger, leverage changes, funding), `hl-cohorts` (cohort flow, indices, cohort bias, cohort leverage), `onchain` (transfers on eth, bsc, base, hyperevm), `polymarket` (trades, wallet position changes, resolutions, price moves, new markets). `vike-data stream` reads them; `vike-data stream info` lists every channel and filter. Connections are not counted against the hourly limit. | free key | [stream channels](https://vike.io/docs/data/reference/stream-channels) |
|
|
62
62
|
| **On-chain API** `/v1/onchain` | Wallet summaries, transactions, counterparties, PnL, address labels with per-source provenance, token holders and transfers. Ethereum on every route, BNB Chain on the wallet and token-flow routes, Base on token transfers. | free key | [onchain](https://vike.io/data/onchain) |
|
|
@@ -144,10 +144,10 @@ Every data command is one `tools/call` to the MCP server. `vike-data <group> --h
|
|
|
144
144
|
| `vike-data wallet` | `summary`, `transactions` (`txs`), `compare`, `trace`, `batch`, `counterparties`, `pnl-history`, `balances`, `ens`, `discover`, `first-funder`, `exchange-usage` | `wallet_summary`, `wallet_transactions`, `wallet_compare`, `wallet_trace`, `wallet_batch_labels`, `wallet_counterparties`, `wallet_pnl_history`, `wallet_token_balances`, `wallet_ens`, `wallet_discover`, `wallet_first_funder`, `wallet_exchange_usage` |
|
|
145
145
|
| `vike-data labels <address>` | multi-source label provenance for one wallet | `wallet_label_provenance` |
|
|
146
146
|
| `vike-data perp` | `top-traders`, `find-position` (Hyperliquid); `funding`, `spreads` (cross-venue funding rates and perp-vs-perp price gaps) | `hl_perp_top_traders`, `hl_position_match`, `perp_funding`, `perp_spreads` |
|
|
147
|
-
| `vike-data hl` | `cohort-metrics <symbol>`, `segments`, `wallet <address>`, `wallet-activity <address>`, `wallet-trades <address>`, `leaderboard`, `liquidations`, `market`, `orders
|
|
147
|
+
| `vike-data hl` | `cohort-metrics <symbol>`, `segments`, `wallet <address>`, `wallet-activity <address>`, `wallet-trades <address>`, `leaderboard`, `liquidations`, `market`, `orders` (`--view open`: resting orders with each owner's size and PnL cohort; `wallet`; `clusters`; `book`: the order book at one instant; `--market spot` for a spot pair such as `HYPE/USDC`), `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` |
|
|
148
148
|
| `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` |
|
|
149
149
|
| `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`, `chainlink-prices <symbol>` (the Chainlink prices the crypto up/down markets resolve on), `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_chainlink_prices`, `polymarket_archive` |
|
|
150
|
-
| `vike-data predictfun` (`pf`) | `overview`, `markets`, `market <market_id>`, `orderbook <market_id>`, `market-trades <market_id>`, `wallet <address>` (positions and P&L), `wallet-trades <address>`, `leaderboard` | `predictfun_overview`, `predictfun_markets`, `predictfun_market_detail`, `predictfun_market_book`, `predictfun_market_trades`, `predictfun_wallet_positions`, `predictfun_wallet_trades`, `predictfun_leaderboard` |
|
|
150
|
+
| `vike-data predictfun` (`pf`) | `overview`, `markets`, `market <market_id>`, `orderbook <market_id>`, `market-trades <market_id>`, `wallet <address>` (positions and P&L), `wallet-trades <address>`, `wallet-flows <address>` (USDT deposits and withdrawals), `leaderboard` | `predictfun_overview`, `predictfun_markets`, `predictfun_market_detail`, `predictfun_market_book`, `predictfun_market_trades`, `predictfun_wallet_positions`, `predictfun_wallet_trades`, `predictfun_leaderboard` |
|
|
151
151
|
| `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_*` |
|
|
152
152
|
| `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 |
|
|
153
153
|
| `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` |
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.21.0",
|
|
7
7
|
"description": "CLI, agent skills and MCP client for the free Vike Data API: a Polymarket full-L2 order-book archive in Parquet, Hyperliquid positions, fills and cohorts, and labelled Ethereum/BNB wallets",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "src/index.js",
|
package/skills/vike/SKILL.md
CHANGED
|
@@ -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, Predict.fun (BNB Chain) markets, order books, on-chain fills, wallet positions and P&L and its leaderboard, transfer, Hyperliquid and Polymarket alerts, and live event streams over WebSocket.
|
|
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, Predict.fun (BNB Chain) markets, order books, on-chain fills, wallet positions and P&L, USDT deposits and withdrawals and its leaderboard, transfer, Hyperliquid and Polymarket alerts, and live event streams over WebSocket. 83 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>`
|
|
@@ -108,7 +108,7 @@ Pick by the question, then read the named skill for the recipe and the traps. If
|
|
|
108
108
|
| Liquidation risk by symbol, liquidation heatmap, recent or live liquidations | `vike-data hl liquidations`; `stream hl --channel hl.liq_risk hl.liquidations` | `vike-hl-liquidation-radar` |
|
|
109
109
|
| Builder codes: fees, users, routed share | `vike-data hl builders` | `vike-hl-builder-intel` |
|
|
110
110
|
| HL open interest, vaults | `vike-data hl market`, `hl vaults`, `hl vault` | this skill |
|
|
111
|
-
| HL orders and order
|
|
111
|
+
| HL orders, order clusters and the order book (perp, or spot with `--market spot`), 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 |
|
|
112
112
|
| A name, symbol, address, ENS name or polymarket.com link → what it is | `vike-data search <q>` / `search` | this skill |
|
|
113
113
|
| 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` |
|
|
114
114
|
| Trending Polymarket markets (by 24h volume) | `vike-data polymarket markets` / `polymarket_markets` | `vike-polymarket-markets` |
|
|
@@ -120,7 +120,7 @@ Pick by the question, then read the named skill for the recipe and the traps. If
|
|
|
120
120
|
| Many resolutions; the Parquet L2 archive | `vike-data polymarket settlements`, `archive` | `vike-pm-l2-archive` |
|
|
121
121
|
| Predict.fun at a glance; its markets by 24h volume or newest, by status or a title substring | `vike-data predictfun overview`, `predictfun markets` / `predictfun_overview`, `predictfun_markets` | `vike-predictfun-markets` |
|
|
122
122
|
| One Predict.fun market: outcomes, stats, order book, fills with wallets | `vike-data predictfun market <market_id>`, `orderbook`, `market-trades` / `predictfun_market_detail`, `predictfun_market_book`, `predictfun_market_trades` | `vike-predictfun-market-detail` |
|
|
123
|
-
| One Predict.fun wallet: positions, P&L, fills | `vike-data predictfun wallet <address>`, `wallet-trades` / `predictfun_wallet_positions`, `predictfun_wallet_trades` | `vike-predictfun-trader` |
|
|
123
|
+
| One Predict.fun wallet: positions, P&L, fills, deposits and withdrawals | `vike-data predictfun wallet <address>`, `wallet-trades`, `wallet-flows` / `predictfun_wallet_positions`, `predictfun_wallet_trades`, `predictfun_wallet_flows` | `vike-predictfun-trader` |
|
|
124
124
|
| Predict.fun wallet leaderboard (realized / unrealized P&L, volume, fills) | `vike-data predictfun leaderboard` / `predictfun_leaderboard` | `vike-predictfun-leaderboard` |
|
|
125
125
|
| The Chainlink price a crypto up/down market resolves on, at its window start and end (btc, eth, sol, xrp, doge, bnb, hype, zec; since 2026-11-06 09:24 UTC) | `vike-data polymarket chainlink-prices btc --interval <the market's tenor: 5m\|15m\|1h> --from-ms <window start> --to-ms <window end + 1>` / `polymarket_chainlink_prices`: two rows, the price at the start and at the end (`--to-ms` is exclusive). 4h and daily windows follow US Eastern time while buckets are UTC-aligned: ask `--interval 1m --from-ms <start> --to-ms <start + 60000>`, then again with `<end>` and `<end + 60000>` | this skill |
|
|
126
126
|
| Who funded a wallet; which exchanges it uses | `vike-data wallet first-funder`, `wallet exchange-usage` | `vike-wallet-who-is` |
|
|
@@ -165,7 +165,7 @@ Any MCP tool, including one with no command of its own, is one `call` away; it p
|
|
|
165
165
|
vike-data call hl_wallet --args '{"address":"0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","view":"summary"}'
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
**B) Via an MCP connector (recommended when your client has one).** All
|
|
168
|
+
**B) Via an MCP connector (recommended when your client has one).** All 83 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.
|
|
169
169
|
|
|
170
170
|
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.
|
|
171
171
|
|
|
@@ -223,7 +223,7 @@ These two have no command: `vike-data call perp_open_interest --args '{"symbol":
|
|
|
223
223
|
| `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`) |
|
|
224
224
|
| `hl_leaderboard` (`hl leaderboard`) | traders on 20 metrics; `--min-win-rate` is a FRACTION here (0.6), a percent in `perp top-traders` |
|
|
225
225
|
| `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 |
|
|
226
|
-
| `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) |
|
|
226
|
+
| `hl_orders`, `hl_twaps`, `hl_ledger`, `hl_leverage_changes` | resting orders at one instant (each with its owner's `sizeCohort`, `pnlCohort`, `pnlCumUsd`; `--cohort-axis` + `--cohort` keep one cohort's), one wallet's orders, order clusters, the order book (`--view book`: price levels best first, `--side`, `--levels`); `open`, `clusters` and `book` read the perp books unless `--market spot` (a pair, `HYPE/USDC`); the cross-wallet feeds (follow one with `--order asc` and each `nextCursor`, stop on an empty page) |
|
|
227
227
|
| `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 Parquet files: `fills`, `positions`, and from 2026-05-01 `positions_hourly`, `cohorts_hourly`, `wallets_hourly` (`--view url` = a 7-day link) |
|
|
228
228
|
|
|
229
229
|
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.
|
|
@@ -249,6 +249,7 @@ Prediction markets on BNB Chain; USD is BSC USDT, prices are probabilities 0 to
|
|
|
249
249
|
| `predictfun_market_detail` | one market with Predict.fun's own `details`, `outcomes` (`token_id`, WON/LOST, `last_price`) and `stats` (24h and total volume); an unknown id is an error |
|
|
250
250
|
| `predictfun_market_book` | the newest recorded book, priced on the first outcome (Yes): `bids`, `asks` as `[price, quantity]`, `pending_*`, `last_settled`; only the ~1,000 most active open markets, none in 30 days is an error |
|
|
251
251
|
| `predictfun_market_trades`, `predictfun_wallet_trades` | `{trades, next_cursor}`, newest first, with `wallet`, `counterparty`, `role`, `side`, `size`, `price`, `usd`, `fee`. One row is one ORDER's fill: add `usd` over one `role`, never both. No time filter |
|
|
252
|
+
| `predictfun_wallet_flows` | `{flows, totals, next_cursor, as_of_ts}`: USDT in/out with anyone outside Predict.fun's contracts, newest first; `totals` (deposited, withdrawn, net, `first_funder`) cover the whole history. The wallet's WHOLE USDT traffic, so a market maker's totals include its exchange and lending activity. |
|
|
252
253
|
| `predictfun_wallet_positions` | per outcome token: `net`, `cost`, `proceeds`, `mark`, `value`, `pnl`, `state`; `totals` with `realized_pnl` and `unrealized_pnl`. Exchange fills only: splits, merges, redemptions and transfers are not seen |
|
|
253
254
|
| `predictfun_leaderboard` | every wallet ranked by realized P&L, volume or fills over `all`/`1d`/`7d`/`30d`, or `unrealized` (window `all` only); each row carries every window. Rebuilt hourly |
|
|
254
255
|
|
|
@@ -22,7 +22,7 @@ vike-data hl liquidations --view heatmap --symbol $S --bins 20 --json # where
|
|
|
22
22
|
vike-data hl market --view large_fills --symbol $S --json # the newest fills of $50k+ (at most 200)
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
Optional: `hl orders --view clusters --symbol $S` (standing orders bucketed around the mid, `--range-pct`, `--step-bps`), `hl market --view size_breakdown --symbol $S` (position-size tiers with `value_close_to_liquidation`), `hl liquidations --view fills --symbol $S --limit 20` (the latest liquidations).
|
|
25
|
+
Optional: `hl orders --view clusters --symbol $S` (standing orders bucketed around the mid, `--range-pct`, `--step-bps`; `--cohort-axis size --cohort whale` for one cohort's), `hl orders --view book --symbol $S --levels 20` (the order book, price levels best first; the spot book with `--market spot --symbol HYPE/USDC`), `hl market --view size_breakdown --symbol $S` (position-size tiers with `value_close_to_liquidation`), `hl liquidations --view fills --symbol $S --limit 20` (the latest liquidations).
|
|
26
26
|
|
|
27
27
|
## Reading each section
|
|
28
28
|
|
|
@@ -20,7 +20,7 @@ vike-data hl wallet-activity $W --view ledger --limit 50 --json # deposits, w
|
|
|
20
20
|
vike-data hl liquidations --wallet $W --json # has it been liquidated
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Optional, by question: `hl wallet-activity $W --view fills --symbol BTC` (raw fills), `--view builders` (which front-ends it routes through), `hl orders --view wallet --address $W` (what became of its orders, 7 days by default, at most 30), `hl twaps --wallet $W`, `hl leverage-changes --wallet $W`, `hl market --view positions --wallet $W` (open positions with liquidation price). `--window` is `1d|7d|30d|all` (default `all`); page with `nextCursor` -> `--cursor`.
|
|
23
|
+
Optional, by question: `hl wallet-activity $W --view fills --symbol BTC` (raw fills), `--view builders` (which front-ends it routes through), `hl orders --view wallet --address $W` (what became of its orders, 7 days by default, at most 30), `hl orders --view open --wallet $W` (its orders resting now; `--market spot` for its spot orders), `hl twaps --wallet $W`, `hl leverage-changes --wallet $W`, `hl market --view positions --wallet $W` (open positions with liquidation price). `--window` is `1d|7d|30d|all` (default `all`); page with `nextCursor` -> `--cursor`.
|
|
24
24
|
|
|
25
25
|
## Reading
|
|
26
26
|
|
|
@@ -11,6 +11,7 @@ allowed-tools: Bash(vike-data:*)
|
|
|
11
11
|
```bash
|
|
12
12
|
vike-data predictfun wallet <address> [--json] # positions and P&L, 1 credit
|
|
13
13
|
vike-data predictfun wallet-trades <address> [--limit N] [--cursor C] [--json] # fills, limit default 100, max 10000; 1 credit
|
|
14
|
+
vike-data predictfun wallet-flows <address> [--limit N] [--cursor C] [--json] # USDT deposits / withdrawals; 1 credit
|
|
14
15
|
```
|
|
15
16
|
|
|
16
17
|
`address` is `0x` + 40 hex digits; anything else is an error.
|
|
@@ -27,6 +28,7 @@ vike-data pf wallet-trades 0xabcdef1234... --limit 500 --json # `pf` alias
|
|
|
27
28
|
- `wallet`: `{positions, totals, as_of_ts}`. One position per outcome token, most recently traded first: `market_id`, `market_title`, `token_id`, `outcome`, `state` (`open`, `won`, `lost`, or `uncatalogued` for a market not in the catalog yet), `net` (shares bought minus sold minus fees taken in shares), `cost` (USD paid), `proceeds` (USD received, net of fees), `mark` (the token's last price) and `mark_ts`, `value` (`net` x 1 won, x 0 lost, x `mark` while open), `pnl` (`proceeds - cost + value`; `null` for an open token with no price yet), `fills`, `first_ts`, `last_ts`.
|
|
28
29
|
`totals`: `positions`, `open_positions`, `cost`, `proceeds`, `value` (open positions), `pnl`, `realized_pnl` (won and lost positions), `unrealized_pnl` (open ones), `unpriced` (positions with `pnl` `null`). `as_of_ts` is when the positions were last rebuilt.
|
|
29
30
|
- `wallet-trades`: `{trades, next_cursor}`, newest first, each with `market_id`, `market_title` and `outcome` (`null` for a market the catalog does not hold yet), otherwise the rows of `predictfun market-trades`. An address with no fills is an empty page.
|
|
31
|
+
- `wallet-flows`: `{flows, totals, next_cursor, as_of_ts}`: the wallet's USDT transfers on BNB Chain with anyone outside Predict.fun's own contracts (`direction` in/out, `counterparty` and its label such as `cex/binance`, `amount_usd`), newest first; `totals` over the whole history: deposited, withdrawn, net and `first_funder`. It is the wallet's WHOLE USDT traffic: a market maker that also uses Binance or a lending pool shows that activity too, so don't read `deposited_usd` as money put into Predict.fun for such a wallet. Dust under one cent is left out.
|
|
30
32
|
|
|
31
33
|
## Reading
|
|
32
34
|
|
|
@@ -32,6 +32,12 @@ channel the path does not serve is refused with `unknown_channel` and the list.
|
|
|
32
32
|
`labels.tags` its trader tags. Filters `min_leverage` (a number) and `tag` (a list) exist on this channel only.
|
|
33
33
|
- `hl.top_positions`: per coin of the top 50, the position that `entered`, `left` or `moved` within the top 10 (filter
|
|
34
34
|
`event` takes ONE of those, `direction` one of `long` / `short`). The first capture sends all 10 of every coin as `entered`.
|
|
35
|
+
- `hl.order_walls`: perp orders of $1M or more that `appeared` in or `disappeared` from the 5-minute order snapshots.
|
|
36
|
+
`data.kind` is `resting` (a limit order) or `trigger` (a stop or take-profit not yet fired, with `trigger_type`
|
|
37
|
+
`sl` / `tp` / `trailing` and `trigger_px`); `dex` is `HL` or the HIP-3 dex, `source` the snapshot feed. A
|
|
38
|
+
`disappeared` says what happened: `outcome` (`filled`, `partially_filled`, `canceled`, `unknown`) and `filled_usd`;
|
|
39
|
+
it waits for the order's fills, up to ~12 minutes after the snapshot that found the order gone. Filters `side`,
|
|
40
|
+
`event` and `kind` take one value each.
|
|
35
41
|
- `hl.closed_trades`: a finished round trip (entry and exit price, `realized_pnl`, `duration_seconds`), in batches
|
|
36
42
|
every 30 minutes; unfiltered up to ~32,000 an hour (measured 2026-11-02): filter by `wallet` or `min_usd`.
|
|
37
43
|
- `hl.cohort_leverage` (`hl-cohorts`): once an hour per cohort of one `axis`, `perp_bias` and `equity_exposure`
|
|
@@ -58,6 +64,9 @@ vike-data stream onchain --channel chain.transfers --filter chain=base --filter
|
|
|
58
64
|
# Position changes at 20x or more, BTC and ETH (the wallet's leverage and liquidation price before the fill are in data)
|
|
59
65
|
vike-data stream hl --channel hl.positions --filter coin=BTC,ETH --filter min_leverage=20
|
|
60
66
|
|
|
67
|
+
# BTC and ETH stops and take-profits of $1M+ that left the book, with whether they filled
|
|
68
|
+
vike-data stream hl --channel hl.order_walls --filter coin=BTC,ETH --filter kind=trigger --filter event=disappeared
|
|
69
|
+
|
|
61
70
|
# Every round trip one wallet closes (a batch every 30 minutes)
|
|
62
71
|
vike-data stream hl --channel hl.closed_trades --filter wallet=0x1111111111111111111111111111111111111111
|
|
63
72
|
|
|
@@ -70,7 +79,7 @@ vike-data stream polymarket --channel pm.trades --filter min_usd=10000 | jq -c '
|
|
|
70
79
|
|
|
71
80
|
`--filter` applies to every `--channel` of the command; a key the channel does not take is refused by the server
|
|
72
81
|
with the key's name. List keys (`wallet`, `coin`, `token`, `market`, `chain`, cohorts, ...) take comma-separated
|
|
73
|
-
values and repeat; `side`, `direction`, `event`, `axis`, `move`, `role` take one value; `true` / `false` is sent as a yes/no (`contract=false`); `min_usd`, `min_amount`, `min_move`,
|
|
82
|
+
values and repeat; `side`, `direction`, `event`, `axis`, `move`, `role`, `kind` take one value; `true` / `false` is sent as a yes/no (`contract=false`); `min_usd`, `min_amount`, `min_move`,
|
|
74
83
|
`min_leverage` take a number. Channels in one command must all take every key you pass (`min_leverage` and `tag` are `hl.positions` only). Channel fields and filter keys: https://vike.io/docs/data/reference/stream-channels
|
|
75
84
|
|
|
76
85
|
## Without a socket
|
package/src/commands/hl.js
CHANGED
|
@@ -184,13 +184,14 @@ export function registerHl(program) {
|
|
|
184
184
|
|
|
185
185
|
addTool(hl, 'orders', {
|
|
186
186
|
tool: 'hl_orders',
|
|
187
|
-
desc: 'Standing orders: resting at one instant, one wallet\'s orders over a window,
|
|
187
|
+
desc: 'Standing orders: resting at one instant (with the owner\'s cohorts), one wallet\'s orders over a window, one symbol\'s order clusters or its order book',
|
|
188
188
|
options: [
|
|
189
|
-
view(['open', 'wallet', 'clusters']),
|
|
190
|
-
['--symbol <s>', 'open: symbol and/or --wallet required; clusters: required'],
|
|
189
|
+
view(['open', 'wallet', 'clusters', 'book']),
|
|
190
|
+
['--symbol <s>', 'open: symbol and/or --wallet required; clusters, book: required. With --market spot a pair, e.g. HYPE/USDC'],
|
|
191
|
+
['--market <m>', 'open, clusters, book: perp (default) | spot'],
|
|
191
192
|
['--wallet <a>', 'open: one wallet\'s resting orders'],
|
|
192
193
|
['--address <a>', 'wallet: the wallet (required)'],
|
|
193
|
-
['--at <t>', 'open, clusters: ISO-8601 UTC instant (default the newest snapshot)'],
|
|
194
|
+
['--at <t>', 'open, clusters, book: ISO-8601 UTC instant (default the newest snapshot)'],
|
|
194
195
|
['--oid <n>', 'open: one order id'],
|
|
195
196
|
['--order-type <t>', 'open: Limit | Stop Market | Stop Limit | Take Profit Market | Take Profit Limit | Trailing Stop Market'],
|
|
196
197
|
['--created-from <t>', 'open: placed at or after (ISO-8601 UTC)'],
|
|
@@ -200,8 +201,10 @@ export function registerHl(program) {
|
|
|
200
201
|
['--status <s>', 'wallet: open | filled | partially_filled | canceled_or_expired'],
|
|
201
202
|
['--step-bps <n>', 'clusters: bucket width in basis points (default 10)'],
|
|
202
203
|
['--range-pct <n>', 'clusters: half-width around the mid in percent (default 10)'],
|
|
203
|
-
['--cohort-axis <a>', 'clusters: size | pnl | pnl_abs'],
|
|
204
|
-
['--cohort <c>', 'clusters: one cohort label (
|
|
204
|
+
['--cohort-axis <a>', 'open, clusters: size | pnl | pnl_abs (default size)'],
|
|
205
|
+
['--cohort <c>', 'open, clusters: one cohort label (with --at, the labels of the hour before that snapshot)'],
|
|
206
|
+
['--side <s>', 'book: both (default) | bid | ask'],
|
|
207
|
+
['--levels <n>', 'book: price levels per side, best first (default 100, max 1000)'],
|
|
205
208
|
LIMIT, CURSOR,
|
|
206
209
|
],
|
|
207
210
|
});
|
|
@@ -70,6 +70,13 @@ export function registerPredictfun(program) {
|
|
|
70
70
|
options: [LIMIT, CURSOR],
|
|
71
71
|
});
|
|
72
72
|
|
|
73
|
+
addTool(cmd, 'wallet-flows <address>', {
|
|
74
|
+
tool: 'predictfun_wallet_flows',
|
|
75
|
+
args: ['address'],
|
|
76
|
+
desc: 'One wallet\'s USDT deposits and withdrawals on BNB Chain, newest first, with whole-history totals and the first funder',
|
|
77
|
+
options: [LIMIT, CURSOR],
|
|
78
|
+
});
|
|
79
|
+
|
|
73
80
|
addTool(cmd, 'leaderboard', {
|
|
74
81
|
tool: 'predictfun_leaderboard',
|
|
75
82
|
desc: 'Every wallet ranked by realized P&L, volume or fills over a window, or by unrealized P&L (rebuilt hourly)',
|
package/src/commands/stream.js
CHANGED
|
@@ -10,7 +10,7 @@ export const STREAM_PATHS = ['hl', 'hl-cohorts', 'onchain', 'polymarket'];
|
|
|
10
10
|
const MAX_SUBSCRIPTIONS = 100; // per connection, the server's cap
|
|
11
11
|
const IDLE_MS = 60_000; // the server pings every 15 s: a minute of silence is a dead connection
|
|
12
12
|
const NUMBER_KEYS = new Set(['min_usd', 'min_amount', 'min_move', 'min_leverage']);
|
|
13
|
-
const ONE_VALUE_KEYS = new Set(['side', 'direction', 'event', 'axis', 'move', 'role']); // every other key is a list
|
|
13
|
+
const ONE_VALUE_KEYS = new Set(['side', 'direction', 'event', 'axis', 'move', 'role', 'kind']); // every other key is a list
|
|
14
14
|
// No channel list here: the server decides which channels a path serves (`stream info` lists them) and refuses
|
|
15
15
|
// an unknown one with `unknown_channel`.
|
|
16
16
|
const FATAL_ERRORS = new Set(['bad_subscription', 'unknown_channel', 'rate_limited']);
|