@dritan/mcp 0.6.0 → 0.6.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/README.md +1 -1
- package/dist/index.js +26 -13
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -87,7 +87,7 @@ npm run build && npm start
|
|
|
87
87
|
- Option 2: user gets a free key at `https://dritan.dev`.
|
|
88
88
|
- `x402_create_api_key` auto-activates returned keys for the current MCP session.
|
|
89
89
|
- `token_get_ohlcv_chart` returns a shareable chart URL plus a ready-to-send markdown image snippet.
|
|
90
|
-
- `token_get_ohlcv_chart` supports `chartType: "line-volume" | "candlestick"` (default is `
|
|
90
|
+
- `token_get_ohlcv_chart` supports `chartType: "line-volume" | "candlestick"` (default is `candlestick`).
|
|
91
91
|
- Ticker workflow for chart requests: `token_search` -> extract mint -> `token_get_ohlcv` or `token_get_ohlcv_chart`.
|
|
92
92
|
- If users ask for `$WIF` style symbols, always resolve mint with `token_search` first.
|
|
93
93
|
- If Solana CLI is missing, run `system_check_prereqs` and follow returned install steps.
|
package/dist/index.js
CHANGED
|
@@ -296,27 +296,35 @@ function buildCandlestickOhlcvChartUrl(mint, timeframe, bars, width, height) {
|
|
|
296
296
|
const volumeSeries = bars.map((bar) => Number(bar.volume.toFixed(12)));
|
|
297
297
|
const volumeColors = bars.map((bar) => bar.close >= bar.open ? "rgba(16,185,129,0.25)" : "rgba(239,68,68,0.25)");
|
|
298
298
|
const config = {
|
|
299
|
-
type: "
|
|
299
|
+
type: "bar",
|
|
300
300
|
data: {
|
|
301
301
|
labels,
|
|
302
302
|
datasets: [
|
|
303
303
|
{
|
|
304
|
+
type: "bar",
|
|
305
|
+
label: "Volume",
|
|
306
|
+
data: volumeSeries,
|
|
307
|
+
backgroundColor: volumeColors,
|
|
308
|
+
borderWidth: 0,
|
|
309
|
+
yAxisID: "volume",
|
|
310
|
+
barPercentage: 0.9,
|
|
311
|
+
categoryPercentage: 1,
|
|
312
|
+
maxBarThickness: 14,
|
|
313
|
+
order: 1,
|
|
314
|
+
},
|
|
315
|
+
{
|
|
316
|
+
type: "candlestick",
|
|
304
317
|
label: "OHLC",
|
|
305
318
|
data: candles,
|
|
319
|
+
yAxisID: "price",
|
|
320
|
+
parsing: false,
|
|
321
|
+
order: 2,
|
|
306
322
|
color: {
|
|
307
323
|
up: "#10b981",
|
|
308
324
|
down: "#ef4444",
|
|
309
325
|
unchanged: "#94a3b8",
|
|
310
326
|
},
|
|
311
327
|
},
|
|
312
|
-
{
|
|
313
|
-
type: "bar",
|
|
314
|
-
label: "Volume",
|
|
315
|
-
data: volumeSeries,
|
|
316
|
-
backgroundColor: volumeColors,
|
|
317
|
-
borderWidth: 0,
|
|
318
|
-
yAxisID: "volume",
|
|
319
|
-
},
|
|
320
328
|
],
|
|
321
329
|
},
|
|
322
330
|
options: {
|
|
@@ -329,8 +337,13 @@ function buildCandlestickOhlcvChartUrl(mint, timeframe, bars, width, height) {
|
|
|
329
337
|
},
|
|
330
338
|
scales: {
|
|
331
339
|
x: { type: "category" },
|
|
332
|
-
|
|
333
|
-
volume: {
|
|
340
|
+
price: { type: "linear", position: "left" },
|
|
341
|
+
volume: {
|
|
342
|
+
type: "linear",
|
|
343
|
+
position: "right",
|
|
344
|
+
beginAtZero: true,
|
|
345
|
+
grid: { drawOnChartArea: false },
|
|
346
|
+
},
|
|
334
347
|
},
|
|
335
348
|
},
|
|
336
349
|
};
|
|
@@ -506,7 +519,7 @@ const tokenOhlcvSchema = z.object({
|
|
|
506
519
|
timeTo: z.number().int().positive().optional(),
|
|
507
520
|
});
|
|
508
521
|
const tokenOhlcvChartSchema = tokenOhlcvSchema.extend({
|
|
509
|
-
chartType: z.enum(["line-volume", "candlestick"]).default("
|
|
522
|
+
chartType: z.enum(["line-volume", "candlestick"]).default("candlestick"),
|
|
510
523
|
includeActive: z.boolean().default(true),
|
|
511
524
|
maxPoints: z.number().int().min(10).max(500).default(120),
|
|
512
525
|
width: z.number().int().min(300).max(2000).default(1200),
|
|
@@ -804,7 +817,7 @@ const tools = [
|
|
|
804
817
|
chartType: {
|
|
805
818
|
type: "string",
|
|
806
819
|
enum: ["line-volume", "candlestick"],
|
|
807
|
-
description: "Chart style. Default
|
|
820
|
+
description: "Chart style. Default candlestick.",
|
|
808
821
|
},
|
|
809
822
|
includeActive: { type: "boolean" },
|
|
810
823
|
maxPoints: { type: "number" },
|