Recipe 11 of 33
Threshold alert: a cohort is more than 70% long a coin
Poll the coin's metrics for one cohort, compute its long share from the newest row, and fire when it passes 0.70; the heatmap checks every coin at once.
GET /v1/hl-cohorts/symbols/{symbol}/metrics with axis=size&cohort=whale answers it in one call: that cohort's
hourly series on one coin, whose first row is the hour in progress, read from the newest 5-minute snapshot. The
long share is total_position_value_long / total_position_value, so "more than 70% long" is a long share above
0.70, the same as a bias above 0.40. The full parameter list is on
Coin metrics.
Quick answer
limit=2 returns the current hour and the settled ones before it.
# whale positioning on BTC: the current hour first, then the settled ones
curl -H "X-API-Key: $VIKE_API_KEY" \
"https://data.vike.io/v1/hl-cohorts/symbols/BTC/metrics?axis=size&cohort=whale&limit=2"Example response
Captured from the live API on 2026-10-24 at 17:12 UTC.
The first row has provisional: true; its ts is the snapshot instant and moves on every poll.
Its long share was $269.9M / $452.4M = 0.60, so a 70% rule would not fire. The other rows
are settled, complete hours. limit=2 returned two settled rows plus the provisional one.
{
"axis": "size",
"label_basis": "point_in_time",
"metrics": [
{
"ts": "2026-10-24T17:07:00+00:00",
"position_count": 99,
"position_count_long": 56,
"total_position_value": 452427817.0,
"total_position_value_long": 269851101.3,
"total_unrealized_pnl": -16513737.19,
"total_position_size": 5637.02035,
"total_position_size_long": 3362.20739,
"bias": 0.1929023425,
"provisional": true,
"label_basis": "point_in_time"
},
{
"ts": "2026-10-24T16:00:00+00:00",
"position_count": 104,
"position_count_long": 58,
"total_position_value": 460673104.4,
"total_position_value_long": 274952948.7,
"total_unrealized_pnl": -16449223.58,
"total_position_size": 5766.61979,
"total_position_size_long": 3441.80325,
"bias": 0.1937008958,
"provisional": false,
"label_basis": "point_in_time"
},
{
"ts": "2026-10-24T15:00:00+00:00",
"position_count": 97,
"position_count_long": 47,
"total_position_value": 443285077.1,
"total_position_value_long": 261781432.0,
"total_unrealized_pnl": -13752693.43,
"total_position_size": 5557.05995,
"total_position_size_long": 3281.72536,
"bias": 0.1810974269,
"provisional": false,
"label_basis": "point_in_time"
}
],
"nextCursor": "eyJtIjoibWV0cmljcyIsInQiOiIyMDI2LTEwLTI0IDE1OjAwOjAwIn0"
}Variations
The rule as one value. Compute the share in the response and keep only the current row.
# current long share of the whale cohort on BTC
curl -s -H "X-API-Key: $VIKE_API_KEY" \
"https://data.vike.io/v1/hl-cohorts/symbols/BTC/metrics?axis=size&cohort=whale&limit=1" \
| jq '.metrics[0] | {ts, provisional, long_share: (.total_position_value_long / .total_position_value)}'Every coin at once. The heatmap holds every coin and cohort at the newest snapshot; keep the cells over 70% long.
# whale cells more than 70% long on any coin
curl -s -H "X-API-Key: $VIKE_API_KEY" \
"https://data.vike.io/v1/hl-cohorts/heatmap?axis=size" \
| jq '[.heatmap[] | .symbol as $s | .segments[] | select(.cohort == "whale" and .total_long_value / .total_value > 0.7) | {symbol: $s, total_value, long_share: (.total_long_value / .total_value)}]'Across the whole book. /segments/{cohort}/summary sums the cohort over every coin; by_side.long.share is its long share.
# the top 1% by realized PnL: long share across all coins
curl -s -H "X-API-Key: $VIKE_API_KEY" \
"https://data.vike.io/v1/hl-cohorts/segments/3x_smart/summary?axis=pnl" \
| jq '{snapshot_ts, long_share: .by_side.long.share}'Before you rely on it
An alert is your polling job
Nothing is pushed: you poll and test the rule yourself. The provisional row changes every 5 minutes,
so require the rule to hold on two polls or on a settled hour before acting. On this route a pnl
cohort is today's grading, which is right for "now" and wrong for history. The label whale is one
rung ($1m to $2.5m); repeat the call per rung for all whales.
Ask your agent
Connected to the Vike MCP server (https://vike.io/mcp) in Claude, ChatGPT or Cursor, ask it in plain words.
The hl_market tool answers (view symbol_metrics), at 1 credit a call.
Is the Hyperliquid whale cohort more than 70% long BTC right now?