bykaranteli-mcp 0.23.0 → 0.23.1
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/dist/tools.js +19 -1
- package/package.json +1 -1
package/dist/tools.js
CHANGED
|
@@ -37,6 +37,24 @@ export function registerByKaranteliTools(server, options) {
|
|
|
37
37
|
}
|
|
38
38
|
/* Every answer carries where it came from and when (README promise; audit
|
|
39
39
|
* P3 #416): routes that already emit these keep their own values. */
|
|
40
|
+
/* API stems whose public page has a different name. Stripping /api/public off
|
|
41
|
+
* the route gave nine tools a `source` that 404s on the site (2026-09-04
|
|
42
|
+
* audit: /borrow-rates, /oi, /recent, /venues/markets ...). */
|
|
43
|
+
const PAGE_FOR_STEM = {
|
|
44
|
+
"/borrow-rates": "/borrow",
|
|
45
|
+
"/oi": "/oi-leaderboard",
|
|
46
|
+
"/recent": "/signals",
|
|
47
|
+
"/leaderboard": "/strategies",
|
|
48
|
+
"/venues/markets": "/venues",
|
|
49
|
+
"/venues/lead-lag": "/venues",
|
|
50
|
+
"/venues/profile": "/venues",
|
|
51
|
+
"/datasets/etf-flows": "/etf",
|
|
52
|
+
"/datasets/liquidations-daily": "/liquidations",
|
|
53
|
+
};
|
|
54
|
+
function pageForApiPath(path) {
|
|
55
|
+
const stem = path.replace(/^\/api\/(?:v1\/)?public/, "").split("?")[0] || "/";
|
|
56
|
+
return PAGE_FOR_STEM[stem] ?? stem;
|
|
57
|
+
}
|
|
40
58
|
function withProvenance(data, path) {
|
|
41
59
|
if (!data || typeof data !== "object" || Array.isArray(data))
|
|
42
60
|
return data;
|
|
@@ -44,7 +62,7 @@ export function registerByKaranteliTools(server, options) {
|
|
|
44
62
|
return {
|
|
45
63
|
...record,
|
|
46
64
|
generatedAt: typeof record.generatedAt === "string" ? record.generatedAt : new Date().toISOString(),
|
|
47
|
-
source: typeof record.source === "string" ? record.source : `${PUBLIC_URL}${path
|
|
65
|
+
source: typeof record.source === "string" ? record.source : `${PUBLIC_URL}${pageForApiPath(path)}`,
|
|
48
66
|
};
|
|
49
67
|
}
|
|
50
68
|
function ok(data) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bykaranteli-mcp",
|
|
3
|
-
"version": "0.23.
|
|
3
|
+
"version": "0.23.1",
|
|
4
4
|
"description": "MCP server for live crypto derivatives data from bykaranteli.com: funding rates, funding arbitrage, open interest pressure, Fear & Greed, BTC dominance and verified signal performance. Free, no API key.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|