bykaranteli-mcp 0.34.1 → 0.34.2
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 +9 -0
- package/dist/provenance.js +32 -11
- package/dist/tools.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,15 @@
|
|
|
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.2] - 2026-10-08
|
|
6
|
+
|
|
7
|
+
67 tools.
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- 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`).
|
|
12
|
+
- `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`).
|
|
13
|
+
|
|
5
14
|
## [0.34.1] - 2026-10-07
|
|
6
15
|
|
|
7
16
|
67 tools.
|
package/dist/provenance.js
CHANGED
|
@@ -52,14 +52,34 @@ 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). */
|
|
67
|
+
function chartExtras(q, periodMs) {
|
|
68
|
+
let out = "";
|
|
69
|
+
const venue = (q.get("venue") ?? "").toLowerCase().replace(/[^a-z0-9]/g, "");
|
|
70
|
+
if (venue && venue !== "binance" && venue !== "all")
|
|
71
|
+
out += `&v=${venue}`;
|
|
72
|
+
const toRaw = q.get("to");
|
|
73
|
+
const fromRaw = q.get("from");
|
|
74
|
+
const to = toRaw ? Date.parse(toRaw) : NaN;
|
|
75
|
+
const limit = Number(q.get("limit"));
|
|
76
|
+
let from = fromRaw ? Date.parse(fromRaw) : NaN;
|
|
77
|
+
if (!Number.isFinite(from) && Number.isFinite(to) && Number.isFinite(limit) && limit > 0 && periodMs > 0)
|
|
78
|
+
from = to - limit * periodMs;
|
|
79
|
+
if (Number.isFinite(from) && Number.isFinite(to) && to > from)
|
|
80
|
+
out += `&r=${Math.floor(from / 1000)}..${Math.floor(to / 1000)}`;
|
|
81
|
+
return out;
|
|
82
|
+
}
|
|
63
83
|
export function chartUrlForApiPath(path) {
|
|
64
84
|
const [clean, query = ""] = path.split("?");
|
|
65
85
|
const q = new URLSearchParams(query);
|
|
@@ -68,23 +88,24 @@ export function chartUrlForApiPath(path) {
|
|
|
68
88
|
const metric = (q.get("metric") ?? "price").toLowerCase();
|
|
69
89
|
const period = q.get("period") ?? "1h";
|
|
70
90
|
const panes = metric === "price" || metric === "volume" ? "" : `&panes=${encodeURIComponent(metric)}`;
|
|
71
|
-
return `${CHART_BASE}?s=${s}&p=${encodeURIComponent(period)}${panes}&heat=1&pr=1`;
|
|
91
|
+
return `${CHART_BASE}?s=${s}&p=${encodeURIComponent(period)}${panes}${chartExtras(q, CHART_PERIOD_MS[period] ?? 0)}&heat=1&pr=1`;
|
|
72
92
|
}
|
|
73
|
-
|
|
74
|
-
|
|
93
|
+
const x = chartExtras(q, 0);
|
|
94
|
+
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") {
|
|
95
|
+
return `${CHART_BASE}?s=${s}&panes=liquidations,oi&heat=1&pr=1&rv=1${x}`;
|
|
75
96
|
}
|
|
76
97
|
if (clean.startsWith("/api/public/options"))
|
|
77
|
-
return `${CHART_BASE}?s=${s}&panes=oi&lv=1&heat=1&pr=0`;
|
|
98
|
+
return `${CHART_BASE}?s=${s}&panes=oi&lv=1&heat=1&pr=0${x}`;
|
|
78
99
|
if (clean.startsWith("/api/public/funding") || clean.startsWith("/api/public/heatmap"))
|
|
79
|
-
return `${CHART_BASE}?s=${s}&panes=funding,oi&heat=1&pr=0`;
|
|
100
|
+
return `${CHART_BASE}?s=${s}&panes=funding,oi&heat=1&pr=0${x}`;
|
|
80
101
|
if (clean.startsWith("/api/public/oi"))
|
|
81
|
-
return `${CHART_BASE}?s=${s}&panes=oi,funding&heat=1&pr=0`;
|
|
102
|
+
return `${CHART_BASE}?s=${s}&panes=oi,funding&heat=1&pr=0${x}`;
|
|
82
103
|
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`;
|
|
104
|
+
return `${CHART_BASE}?s=${s}&panes=long_short,top_traders&heat=0&pr=0${x}`;
|
|
105
|
+
if (clean.startsWith("/api/public/etf") || clean.startsWith("/api/v1/public/datasets/etf"))
|
|
106
|
+
return `${CHART_BASE}?s=${s}&p=1d&panes=etf_flow&heat=0&pr=0${x}`;
|
|
86
107
|
if (clean.startsWith("/api/public/hyperliquid-whales"))
|
|
87
|
-
return `${CHART_BASE}?s=${s}&panes=whale_net,oi&heat=1&pr=1`;
|
|
108
|
+
return `${CHART_BASE}?s=${s}&panes=whale_net,oi&heat=1&pr=1&hw=1${x}`;
|
|
88
109
|
return null;
|
|
89
110
|
}
|
|
90
111
|
export function buildProvenance(data, at) {
|
package/dist/tools.js
CHANGED
|
@@ -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.2",
|
|
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": {
|