bykaranteli-mcp 0.32.0 → 0.34.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 CHANGED
@@ -2,6 +2,22 @@
2
2
 
3
3
  Notable changes to the `bykaranteli-mcp` package. The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and versions follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html). Dates are UTC and come from the git tag of each release (the version commit where no tag exists). The tool count is the number of tools the server registers in that release.
4
4
 
5
+ ## [0.34.0] - 2026-10-07
6
+
7
+ 67 tools.
8
+
9
+ ### Changed
10
+
11
+ - `get_series`: `metric` accepts `funding_agg`, the 8h funding rate weighted by open interest across every perp venue the 10-minute venue recorder reports (the SuperChart's all-venue funding pane); the description names it next to the single-venue `funding`.
12
+
13
+ ## [0.33.0] - 2026-10-07
14
+
15
+ 67 tools.
16
+
17
+ ### Added
18
+
19
+ - Provenance: every answer whose route has a chart twin carries `chart_url` (the SuperChart address that opens on the same symbol, period and layers) and `chart_image_url` (a 1200 x 630 PNG of that view) next to `source_page` and `api_path`. Routes with a twin: series, the liquidation map and liquidation routes, options, funding and the funding heatmap, open interest, positioning, ETF flows and Hyperliquid whales.
20
+
5
21
  ## [0.32.0] - 2026-10-06
6
22
 
7
23
  67 tools.
@@ -2,6 +2,10 @@ export declare const PROOF_URL = "https://bykaranteli.com/proof";
2
2
  export type ProvenanceCoverage = "full" | "sampled" | "mixed";
3
3
  export type Provenance = {
4
4
  source_page: string;
5
+ /** The SuperChart address that opens on what this answer holds, when the route has a chart twin (2026-10-07). */
6
+ chart_url?: string;
7
+ /** A PNG of that chart view (1200 x 630, candles, heatmap, prints), for clients that show images. */
8
+ chart_image_url?: string;
5
9
  api_path: string;
6
10
  /** The answer's own timestamp (generatedAt, generated_at, as_of); null when the route does not stamp one. */
7
11
  generated_at: string | null;
@@ -15,6 +19,7 @@ export type Provenance = {
15
19
  };
16
20
  /** The site page a route's numbers are shown on. */
17
21
  export declare function pageForApiPath(path: string): string;
22
+ export declare function chartUrlForApiPath(path: string): string | null;
18
23
  export declare function buildProvenance(data: unknown, at: {
19
24
  apiPath: string;
20
25
  sourcePage: string;
@@ -50,6 +50,43 @@ function venueId(item) {
50
50
  const id = str(item.exchange) ?? str(item.venue_id) ?? str(item.id) ?? str(item.key) ?? str(item.venue);
51
51
  return id && VENUE_TOKEN.test(id) ? id : undefined;
52
52
  }
53
+ /* Chart block phase 2 (2026-10-07): the SuperChart address that shows what an answer holds, so an agent can hand the
54
+ * reader a chart that opens on the same symbol, period and layers (chart-url-state.ts keys: s, p, panes, heat, pr,
55
+ * lv). Null for routes with no chart twin. The symbol defaults to BTCUSDT when the query names none. */
56
+ const CHART_BASE = "https://bykaranteli.com/chart";
57
+ function chartSymbol(q) {
58
+ const raw = (q.get("symbol") ?? q.get("coin") ?? q.get("currency") ?? q.get("asset") ?? "BTC").toUpperCase().replace(/[^A-Z0-9]/g, "");
59
+ if (!raw)
60
+ return "BTCUSDT";
61
+ return /USDT$|USD$|PERP$/.test(raw) ? raw : `${raw}USDT`;
62
+ }
63
+ export function chartUrlForApiPath(path) {
64
+ const [clean, query = ""] = path.split("?");
65
+ const q = new URLSearchParams(query);
66
+ const s = chartSymbol(q);
67
+ if (clean === "/api/series" || clean.startsWith("/api/series/")) {
68
+ const metric = (q.get("metric") ?? "price").toLowerCase();
69
+ const period = q.get("period") ?? "1h";
70
+ const panes = metric === "price" || metric === "volume" ? "" : `&panes=${encodeURIComponent(metric)}`;
71
+ return `${CHART_BASE}?s=${s}&p=${encodeURIComponent(period)}${panes}&heat=1&pr=1`;
72
+ }
73
+ if (clean.startsWith("/api/liqmap/") || clean.startsWith("/api/public/liqmap") || clean.startsWith("/api/public/liquidations") || clean.startsWith("/api/public/liquidation-cascades")) {
74
+ return `${CHART_BASE}?s=${s}&panes=liquidations,oi&heat=1&pr=1`;
75
+ }
76
+ if (clean.startsWith("/api/public/options"))
77
+ return `${CHART_BASE}?s=${s}&panes=oi&lv=1&heat=1&pr=0`;
78
+ if (clean.startsWith("/api/public/funding") || clean.startsWith("/api/public/heatmap"))
79
+ return `${CHART_BASE}?s=${s}&panes=funding,oi&heat=1&pr=0`;
80
+ if (clean.startsWith("/api/public/oi"))
81
+ return `${CHART_BASE}?s=${s}&panes=oi,funding&heat=1&pr=0`;
82
+ if (clean.startsWith("/api/public/positioning") || clean.startsWith("/api/public/long-short"))
83
+ return `${CHART_BASE}?s=${s}&panes=long_short,top_traders&heat=0&pr=0`;
84
+ if (clean.startsWith("/api/public/etf"))
85
+ return `${CHART_BASE}?s=${s}&p=1d&panes=etf_flow&heat=0&pr=0`;
86
+ if (clean.startsWith("/api/public/hyperliquid-whales"))
87
+ return `${CHART_BASE}?s=${s}&panes=whale_net,oi&heat=1&pr=1`;
88
+ return null;
89
+ }
53
90
  export function buildProvenance(data, at) {
54
91
  const d = isRec(data) ? data : {};
55
92
  const meta = isRec(d.meta) ? d.meta : {};
@@ -115,6 +152,7 @@ export function buildProvenance(data, at) {
115
152
  const since = str(d.recorded_since) ?? str(d.history_since) ?? str(meta.recorded_since) ?? str(meta.history_since);
116
153
  return {
117
154
  source_page: at.sourcePage,
155
+ ...(chartUrlForApiPath(at.apiPath) ? { chart_url: chartUrlForApiPath(at.apiPath), chart_image_url: chartUrlForApiPath(at.apiPath).replace("/chart?", "/api/og/chart?") } : {}),
118
156
  api_path: at.apiPath,
119
157
  generated_at: str(d.generatedAt) ?? str(d.generated_at) ?? str(d.as_of) ?? str(d.asOf) ?? str(meta.generatedAt) ?? str(meta.generated_at) ?? str(meta.as_of) ?? null,
120
158
  fetched_at: at.fetchedAt,
package/dist/tools.js CHANGED
@@ -1296,7 +1296,7 @@ export function registerByKaranteliTools(server, options) {
1296
1296
  /* API contract values the account and series tools use (0.31.0). They mirror the web registries (series metrics,
1297
1297
  * recipe fields, operators, channels and limits); the web test mcp-extra-tools.test.ts fails when they drift, and
1298
1298
  * GET /api/series/metrics lists the metrics with their units and floors at runtime. */
1299
- const SERIES_METRIC_KEYS = ["price", "volume", "cvd_perp", "cvd_spot", "oi", "funding", "liquidations", "long_short", "top_traders", "rsi", "premium", "etf_flow", "borrow", "whale_net"];
1299
+ const SERIES_METRIC_KEYS = ["price", "volume", "cvd_perp", "cvd_spot", "oi", "funding", "funding_agg", "liquidations", "long_short", "top_traders", "rsi", "premium", "etf_flow", "borrow", "whale_net"];
1300
1300
  const SERIES_METRICS = Object.fromEntries(SERIES_METRIC_KEYS.map((k) => [k, true]));
1301
1301
  const SERIES_PERIODS = ["5m", "15m", "1h", "4h", "1d"];
1302
1302
  const PERIOD_MS = { "5m": 300_000, "15m": 900_000, "1h": 3_600_000, "4h": 14_400_000, "1d": 86_400_000 };
@@ -1390,7 +1390,7 @@ export function registerByKaranteliTools(server, options) {
1390
1390
  /* ---- 0.31.0: recorded series, alert text, alert recipes, watchlists ---- */
1391
1391
  server.registerTool("get_series", {
1392
1392
  title: "Recorded series: bars or points of one metric for one perpetual (price, OI, funding, CVD, liquidations, long/short, RSI and more)",
1393
- description: `Call this when the user wants the history of one recorded metric for one perpetual as a time series: price candles, volume, perp or spot CVD, open interest, funding, liquidations, long/short ratios, RSI, the Coinbase premium, US spot ETF flows, borrow rates or Hyperliquid whale net flow, for charting, backtesting or "what did X do over the last N days". Returns the /api/series answer (points as [t, v], or [t, o, h, l, c, v] for price, with unit, kind, source and source_kind, the bars served and whether member depth applied) plus provenance. metric is one of: ${SERIES_METRIC_KEYS.join(", ")} (unit, finest period and venue support of each: https://bykaranteli.com/api/series/metrics). Public depth serves fewer bars and no 5m bars; a Builder key and above get member depth; the bar limits are in the same list. Pass from and to (ISO) for a window, or limit for the newest bars.`,
1393
+ description: `Call this when the user wants the history of one recorded metric for one perpetual as a time series: price candles, volume, perp or spot CVD, open interest, funding (one venue, or OI-weighted across every venue as funding_agg), liquidations, long/short ratios, RSI, the Coinbase premium, US spot ETF flows, borrow rates or Hyperliquid whale net flow, for charting, backtesting or "what did X do over the last N days". Returns the /api/series answer (points as [t, v], or [t, o, h, l, c, v] for price, with unit, kind, source and source_kind, the bars served and whether member depth applied) plus provenance. metric is one of: ${SERIES_METRIC_KEYS.join(", ")} (unit, finest period and venue support of each: https://bykaranteli.com/api/series/metrics). Public depth serves fewer bars and no 5m bars; a Builder key and above get member depth; the bar limits are in the same list. Pass from and to (ISO) for a window, or limit for the newest bars.`,
1394
1394
  inputSchema: {
1395
1395
  metric: z.string().describe("string, metric key, e.g. price, oi, funding, liquidations (list: /api/series/metrics)"),
1396
1396
  symbol: z.string().optional().describe("string, optional Binance USDT-M perp or coin, e.g. BTCUSDT or BTC (default BTCUSDT)"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bykaranteli-mcp",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
4
4
  "description": "MCP server for live crypto derivatives data from bykaranteli.com: funding rates, funding arbitrage, open interest pressure, liquidations, options, ETF flows, Fear & Greed and BTC dominance. 67 read-only and account tools (the alert and watchlist tools act on your own account), free account key, paid depth via plans or x402.",
5
5
  "type": "module",
6
6
  "bin": {