bykaranteli-mcp 0.34.1 → 0.34.3
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 +18 -0
- package/dist/provenance.js +33 -11
- package/dist/tools.js +3 -3
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
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.3] - 2026-10-08
|
|
6
|
+
|
|
7
|
+
67 tools.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- `chart_url` of `get_liquidations` and `get_etf_flows` opens the symbol or asset the call filtered on (the dataset path carried no filter, so every link opened BTCUSDT).
|
|
12
|
+
- `chart_url` of `get_options_snapshot` with a venue sets the options levels' own key (`lvv`), not the OI and funding panes' venue (`v`), so the chart draws the same venue's levels the answer reports.
|
|
13
|
+
|
|
14
|
+
## [0.34.2] - 2026-10-08
|
|
15
|
+
|
|
16
|
+
67 tools.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- Provenance `chart_url`: the venue asked for rides on the link as `v`, a bounded window (`to` plus `limit` bars, or `from` and `to`) as `r=from..to` in unix seconds, and the routes behind `get_liquidations`, `get_etf_flows` and `get_liquidation_cascades` (the dataset and incident routes) now have chart twins too; the liquidation twins open the recorded event marks (`rv=1`).
|
|
21
|
+
- `get_series`: the description says which periods stay member depth on a key (1m, 3m, 5m, 10m) and that the answer names the venue it was read from (`venue`) and every venue a market-wide series sums (`venues`).
|
|
22
|
+
|
|
5
23
|
## [0.34.1] - 2026-10-07
|
|
6
24
|
|
|
7
25
|
67 tools.
|
package/dist/provenance.js
CHANGED
|
@@ -52,14 +52,35 @@ function venueId(item) {
|
|
|
52
52
|
}
|
|
53
53
|
/* Chart block phase 2 (2026-10-07): the SuperChart address that shows what an answer holds, so an agent can hand the
|
|
54
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.
|
|
55
|
+
* lv, v, r, rv). Null for routes with no chart twin. The symbol defaults to BTCUSDT when the query names none. Since
|
|
56
|
+
* 2026-10-08 (the desk's MCP test): the venue asked for rides as v, a bounded window (to plus limit bars, or from
|
|
57
|
+
* and to) as r=from..to in unix seconds, and the dataset and incident routes have their twins too. */
|
|
56
58
|
const CHART_BASE = "https://bykaranteli.com/chart";
|
|
59
|
+
const CHART_PERIOD_MS = { "1m": 60_000, "3m": 180_000, "5m": 300_000, "10m": 600_000, "15m": 900_000, "30m": 1_800_000, "1h": 3_600_000, "2h": 7_200_000, "4h": 14_400_000, "6h": 21_600_000, "8h": 28_800_000, "12h": 43_200_000, "1d": 86_400_000, "3d": 259_200_000, "1w": 604_800_000, "1M": 2_592_000_000 };
|
|
57
60
|
function chartSymbol(q) {
|
|
58
61
|
const raw = (q.get("symbol") ?? q.get("coin") ?? q.get("currency") ?? q.get("asset") ?? "BTC").toUpperCase().replace(/[^A-Z0-9]/g, "");
|
|
59
62
|
if (!raw)
|
|
60
63
|
return "BTCUSDT";
|
|
61
64
|
return /USDT$|USD$|PERP$/.test(raw) ? raw : `${raw}USDT`;
|
|
62
65
|
}
|
|
66
|
+
/** The venue and the window of the request as chart keys (empty when the request names neither). `venueKey` is the
|
|
67
|
+
* chart key the venue belongs to: v for the OI and funding panes, lvv for the options levels (2026-10-08). */
|
|
68
|
+
function chartExtras(q, periodMs, venueKey = "v") {
|
|
69
|
+
let out = "";
|
|
70
|
+
const venue = (q.get("venue") ?? "").toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
71
|
+
if (venue && venue !== "all" && (venueKey === "lvv" || venue !== "binance"))
|
|
72
|
+
out += `&${venueKey}=${venue}`;
|
|
73
|
+
const toRaw = q.get("to");
|
|
74
|
+
const fromRaw = q.get("from");
|
|
75
|
+
const to = toRaw ? Date.parse(toRaw) : NaN;
|
|
76
|
+
const limit = Number(q.get("limit"));
|
|
77
|
+
let from = fromRaw ? Date.parse(fromRaw) : NaN;
|
|
78
|
+
if (!Number.isFinite(from) && Number.isFinite(to) && Number.isFinite(limit) && limit > 0 && periodMs > 0)
|
|
79
|
+
from = to - limit * periodMs;
|
|
80
|
+
if (Number.isFinite(from) && Number.isFinite(to) && to > from)
|
|
81
|
+
out += `&r=${Math.floor(from / 1000)}..${Math.floor(to / 1000)}`;
|
|
82
|
+
return out;
|
|
83
|
+
}
|
|
63
84
|
export function chartUrlForApiPath(path) {
|
|
64
85
|
const [clean, query = ""] = path.split("?");
|
|
65
86
|
const q = new URLSearchParams(query);
|
|
@@ -68,23 +89,24 @@ export function chartUrlForApiPath(path) {
|
|
|
68
89
|
const metric = (q.get("metric") ?? "price").toLowerCase();
|
|
69
90
|
const period = q.get("period") ?? "1h";
|
|
70
91
|
const panes = metric === "price" || metric === "volume" ? "" : `&panes=${encodeURIComponent(metric)}`;
|
|
71
|
-
return `${CHART_BASE}?s=${s}&p=${encodeURIComponent(period)}${panes}&heat=1&pr=1`;
|
|
92
|
+
return `${CHART_BASE}?s=${s}&p=${encodeURIComponent(period)}${panes}${chartExtras(q, CHART_PERIOD_MS[period] ?? 0)}&heat=1&pr=1`;
|
|
72
93
|
}
|
|
73
|
-
|
|
74
|
-
|
|
94
|
+
const x = chartExtras(q, 0);
|
|
95
|
+
if (clean.startsWith("/api/liqmap/") || clean.startsWith("/api/public/liqmap") || clean.startsWith("/api/public/liquidations") || clean.startsWith("/api/public/liquidation-cascades") || clean.startsWith("/api/v1/public/datasets/liquidation") || clean === "/api/public/incidents") {
|
|
96
|
+
return `${CHART_BASE}?s=${s}&panes=liquidations,oi&heat=1&pr=1&rv=1${x}`;
|
|
75
97
|
}
|
|
76
98
|
if (clean.startsWith("/api/public/options"))
|
|
77
|
-
return `${CHART_BASE}?s=${s}&panes=oi&lv=1&heat=1&pr=0`;
|
|
99
|
+
return `${CHART_BASE}?s=${s}&panes=oi&lv=1&heat=1&pr=0${chartExtras(q, 0, "lvv")}`;
|
|
78
100
|
if (clean.startsWith("/api/public/funding") || clean.startsWith("/api/public/heatmap"))
|
|
79
|
-
return `${CHART_BASE}?s=${s}&panes=funding,oi&heat=1&pr=0`;
|
|
101
|
+
return `${CHART_BASE}?s=${s}&panes=funding,oi&heat=1&pr=0${x}`;
|
|
80
102
|
if (clean.startsWith("/api/public/oi"))
|
|
81
|
-
return `${CHART_BASE}?s=${s}&panes=oi,funding&heat=1&pr=0`;
|
|
103
|
+
return `${CHART_BASE}?s=${s}&panes=oi,funding&heat=1&pr=0${x}`;
|
|
82
104
|
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`;
|
|
105
|
+
return `${CHART_BASE}?s=${s}&panes=long_short,top_traders&heat=0&pr=0${x}`;
|
|
106
|
+
if (clean.startsWith("/api/public/etf") || clean.startsWith("/api/v1/public/datasets/etf"))
|
|
107
|
+
return `${CHART_BASE}?s=${s}&p=1d&panes=etf_flow&heat=0&pr=0${x}`;
|
|
86
108
|
if (clean.startsWith("/api/public/hyperliquid-whales"))
|
|
87
|
-
return `${CHART_BASE}?s=${s}&panes=whale_net,oi&heat=1&pr=1`;
|
|
109
|
+
return `${CHART_BASE}?s=${s}&panes=whale_net,oi&heat=1&pr=1&hw=1${x}`;
|
|
88
110
|
return null;
|
|
89
111
|
}
|
|
90
112
|
export function buildProvenance(data, at) {
|
package/dist/tools.js
CHANGED
|
@@ -234,7 +234,7 @@ export function registerByKaranteliTools(server, options) {
|
|
|
234
234
|
? `rows is capped at ${MAX_ROWS} of ${filtered.length} matching rows (largest first). Use summary.totals and summary.by_date for complete figures, or pass a symbol filter. ` + baseNote
|
|
235
235
|
: baseNote,
|
|
236
236
|
source: `${PUBLIC_URL}/liquidations`,
|
|
237
|
-
provenance: provenanceFor(d,
|
|
237
|
+
provenance: provenanceFor(d, `/api/v1/public/datasets/liquidations-daily.json${wantSymbol ? `?symbol=${wantSymbol}` : ""}`, "/liquidations"),
|
|
238
238
|
});
|
|
239
239
|
}
|
|
240
240
|
catch (err) {
|
|
@@ -273,7 +273,7 @@ export function registerByKaranteliTools(server, options) {
|
|
|
273
273
|
truncated: dates.length < new Set(filtered.map((r) => String(r.date))).size,
|
|
274
274
|
note: "Finalized US trading days only; a positive net_inflow_usd means the funds bought more of the asset than they sold that day. window_net_inflow_usd sums the returned window per asset.",
|
|
275
275
|
source: `${PUBLIC_URL}/etf`,
|
|
276
|
-
provenance: provenanceFor(d,
|
|
276
|
+
provenance: provenanceFor(d, `/api/v1/public/datasets/etf-flows.json${asset ? `?asset=${asset}` : ""}`, "/etf"),
|
|
277
277
|
});
|
|
278
278
|
}
|
|
279
279
|
catch (err) {
|
|
@@ -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 (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
|
|
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 bars under 15 minutes (1m, 3m, 5m, 10m); a Builder key and above get member depth; the bar limits are in the same list. The answer names the venue it was read from (venue) and every venue a market-wide series sums (venues). 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.34.
|
|
3
|
+
"version": "0.34.3",
|
|
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": {
|