@aicoin/opendata-mcp 1.0.15 → 1.0.16
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/build/index.js +17 -15
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -592,16 +592,14 @@ import { z as z3 } from "zod";
|
|
|
592
592
|
function registerContentTools(server2) {
|
|
593
593
|
server2.tool(
|
|
594
594
|
"get_newsflash",
|
|
595
|
-
"Get latest crypto flash news
|
|
595
|
+
"Get latest crypto flash news by AiCoin only",
|
|
596
596
|
{
|
|
597
|
-
|
|
598
|
-
limit: z3.string().optional().describe("Items per page, default 20")
|
|
597
|
+
language: z3.string().optional().describe("Language: cn, tc, en")
|
|
599
598
|
},
|
|
600
|
-
async ({
|
|
599
|
+
async ({ language }) => {
|
|
601
600
|
try {
|
|
602
601
|
const params = {};
|
|
603
|
-
if (
|
|
604
|
-
params.limit = limit ?? "20";
|
|
602
|
+
if (language) params.language = language;
|
|
605
603
|
return ok(
|
|
606
604
|
await apiGet("/api/v2/content/newsflash", params)
|
|
607
605
|
);
|
|
@@ -614,14 +612,14 @@ function registerContentTools(server2) {
|
|
|
614
612
|
"get_news_list",
|
|
615
613
|
"Get news article list",
|
|
616
614
|
{
|
|
617
|
-
page: z3.string().optional().describe("Page number"),
|
|
618
|
-
|
|
615
|
+
page: z3.string().optional().describe("Page number, default 1"),
|
|
616
|
+
pageSize: z3.string().optional().describe("Page size, max 20")
|
|
619
617
|
},
|
|
620
|
-
async ({ page,
|
|
618
|
+
async ({ page, pageSize }) => {
|
|
621
619
|
try {
|
|
622
620
|
const params = {};
|
|
623
621
|
if (page) params.page = page;
|
|
624
|
-
params.
|
|
622
|
+
params.pageSize = pageSize ?? "20";
|
|
625
623
|
return ok(
|
|
626
624
|
await apiGet("/api/v2/content/news-list", params)
|
|
627
625
|
);
|
|
@@ -698,14 +696,18 @@ function registerContentTools(server2) {
|
|
|
698
696
|
"get_exchange_listing_flash",
|
|
699
697
|
"Get exchange coin listing/delisting news",
|
|
700
698
|
{
|
|
701
|
-
|
|
702
|
-
|
|
699
|
+
language: z3.string().optional().describe("Language: cn, tc, en"),
|
|
700
|
+
memberIds: z3.string().optional().describe(
|
|
701
|
+
"Exchange member IDs, comma-separated. 477=Binance, 1509=Bitget. Default: 477,1509"
|
|
702
|
+
),
|
|
703
|
+
pageSize: z3.string().optional().describe("Page size, default 20")
|
|
703
704
|
},
|
|
704
|
-
async ({
|
|
705
|
+
async ({ language, memberIds, pageSize }) => {
|
|
705
706
|
try {
|
|
706
707
|
const params = {};
|
|
707
|
-
if (
|
|
708
|
-
params.
|
|
708
|
+
if (language) params.language = language;
|
|
709
|
+
if (memberIds) params.memberIds = memberIds;
|
|
710
|
+
if (pageSize) params.pageSize = pageSize;
|
|
709
711
|
return ok(
|
|
710
712
|
await apiGet(
|
|
711
713
|
"/api/v2/content/exchange-listing-flash",
|