hvip-mcp-server 0.1.3 → 0.1.4
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/index.js +228 -2
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -21157,7 +21157,11 @@ var publicApi = {
|
|
|
21157
21157
|
getLongShortRatio: (ccy, begin, end) => request("GET", "/api/v5/rubik/stat/contracts/long-short-account-ratio", { params: { ccy, begin, end } }),
|
|
21158
21158
|
getTakerVolume: (ccy, instType, begin, end) => request("GET", "/api/v5/rubik/stat/taker-volume", { params: { ccy, instType, begin, end } }),
|
|
21159
21159
|
getOpenInterestVolume: (ccy, begin, end) => request("GET", "/api/v5/rubik/stat/contracts/open-interest-volume", { params: { ccy, begin, end } }),
|
|
21160
|
-
getLendingRateHistory: (ccy) => request("GET", "/api/v5/rubik/stat/margin/loan-ratio", { params: { ccy } })
|
|
21160
|
+
getLendingRateHistory: (ccy) => request("GET", "/api/v5/rubik/stat/margin/loan-ratio", { params: { ccy } }),
|
|
21161
|
+
getHistoryCandles: (instId, bar, after, before, limit) => request("GET", "/api/v5/market/history-candles", { params: { instId, bar, after, before, limit } }),
|
|
21162
|
+
getHistoryTrades: (instId, limit) => request("GET", "/api/v5/market/history-trades", { params: { instId, limit } }),
|
|
21163
|
+
getSystemStatus: () => request("GET", "/api/v5/system/status"),
|
|
21164
|
+
getPriceLimitBatch: (instType, uly, instId) => request("GET", "/api/v5/public/price-limit", { params: { instType, uly, instId } })
|
|
21161
21165
|
};
|
|
21162
21166
|
var privateApi = {
|
|
21163
21167
|
getBalance: (auth, ccy) => request("GET", "/api/v5/account/balance", { params: { ccy }, auth }),
|
|
@@ -21171,6 +21175,16 @@ var privateApi = {
|
|
|
21171
21175
|
transfer: (auth, body) => request("POST", "/api/v5/asset/transfer", { body, auth }),
|
|
21172
21176
|
withdrawal: (auth, body) => request("POST", "/api/v5/asset/withdrawal", { body, auth }),
|
|
21173
21177
|
// ── 策略交易 ────────────────────────────────────────────────────────────────
|
|
21178
|
+
getAccountBills: (auth, instType, ccy, limit) => request("GET", "/api/v5/account/bills", { params: { instType, ccy, limit }, auth }),
|
|
21179
|
+
getAccountConfig: (auth) => request("GET", "/api/v5/account/config", { auth }),
|
|
21180
|
+
getLeverageInfo: (auth, instId, mgnMode) => request("GET", "/api/v5/account/leverage-info", { params: { instId, mgnMode }, auth }),
|
|
21181
|
+
getOrdersPending: (auth, instType, instId, ordType) => request("GET", "/api/v5/trade/orders-pending", { params: { instType, instId, ordType }, auth }),
|
|
21182
|
+
getFills: (auth, instType, instId, limit) => request("GET", "/api/v5/trade/fills", { params: { instType, instId, limit }, auth }),
|
|
21183
|
+
getOrdersHistoryArchive: (auth, instType, limit) => request("GET", "/api/v5/trade/orders-history-archive", { params: { instType, limit }, auth }),
|
|
21184
|
+
getCurrencies: (auth, ccy) => request("GET", "/api/v5/asset/currencies", { params: { ccy }, auth }),
|
|
21185
|
+
getDepositAddress: (auth, ccy) => request("GET", "/api/v5/asset/deposit-address", { params: { ccy }, auth }),
|
|
21186
|
+
getDepositHistory: (auth, ccy, limit) => request("GET", "/api/v5/asset/deposit-history", { params: { ccy, limit }, auth }),
|
|
21187
|
+
getWithdrawalHistory: (auth, ccy, limit) => request("GET", "/api/v5/asset/withdrawal-history", { params: { ccy, limit }, auth }),
|
|
21174
21188
|
getAlgoOrders: (auth, ordType, instType) => request("GET", "/api/v5/trade/orders-algo-pending", { params: { ordType, instType }, auth }),
|
|
21175
21189
|
getAlgoOrdersHistory: (auth, ordType, state, instType) => request("GET", "/api/v5/trade/orders-algo-history", { params: { ordType, state, instType }, auth }),
|
|
21176
21190
|
placeAlgoOrder: (auth, body) => request("POST", "/api/v5/trade/order-algo", { body, auth }),
|
|
@@ -21348,6 +21362,54 @@ function registerMarketTools(server) {
|
|
|
21348
21362
|
}
|
|
21349
21363
|
}
|
|
21350
21364
|
);
|
|
21365
|
+
server.tool(
|
|
21366
|
+
"okx_get_history_candles",
|
|
21367
|
+
"\u83B7\u53D6\u4EA7\u54C1\u5386\u53F2K\u7EBF\u6570\u636E\uFF08\u6700\u8FD13\u4E2A\u6708\u4EE5\u524D\u7684\u6570\u636E\uFF09\u3002\u7528\u4E8E\u56DE\u6D4B\u3001\u957F\u5468\u671F\u6280\u672F\u5206\u6790\u3002\u4E0Eokx_get_candles\u4E92\u8865\uFF0Ccandles\u53EA\u63D0\u4F9B\u6700\u8FD1\u6570\u636E\u3002",
|
|
21368
|
+
{
|
|
21369
|
+
instId: external_exports.string().describe("\u4EA7\u54C1ID\uFF0C\u5982 BTC-USDT"),
|
|
21370
|
+
bar: external_exports.enum(["1m", "3m", "5m", "15m", "30m", "1H", "4H", "1D", "1W"]).optional().describe("K\u7EBF\u5468\u671F\uFF0C\u9ED8\u8BA41H"),
|
|
21371
|
+
after: external_exports.string().optional().describe("\u67E5\u8BE2\u6B64\u65F6\u95F4\u6233\u4E4B\u524D\u7684\u6570\u636E\uFF08\u6BEB\u79D2Unix\u65F6\u95F4\u6233\uFF0C\u7528\u4E8E\u7FFB\u9875\uFF09"),
|
|
21372
|
+
before: external_exports.string().optional().describe("\u67E5\u8BE2\u6B64\u65F6\u95F4\u6233\u4E4B\u540E\u7684\u6570\u636E\uFF08\u6BEB\u79D2Unix\u65F6\u95F4\u6233\uFF09"),
|
|
21373
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA4100")
|
|
21374
|
+
},
|
|
21375
|
+
async ({ instId, bar, after, before, limit }) => {
|
|
21376
|
+
try {
|
|
21377
|
+
const data = await publicApi.getHistoryCandles(instId, bar, after, before, limit);
|
|
21378
|
+
return toResult(data);
|
|
21379
|
+
} catch (e) {
|
|
21380
|
+
return toError(e);
|
|
21381
|
+
}
|
|
21382
|
+
}
|
|
21383
|
+
);
|
|
21384
|
+
server.tool(
|
|
21385
|
+
"okx_get_history_trades",
|
|
21386
|
+
"\u83B7\u53D6\u4EA7\u54C1\u5386\u53F2\u6210\u4EA4\u8BB0\u5F55\uFF08\u6700\u8FD13\u4E2A\u6708\uFF09\u3002\u7528\u4E8E\u5206\u6790\u5386\u53F2\u6210\u4EA4\u4EF7\u683C\u5206\u5E03\u3001\u7814\u7A76\u6D41\u52A8\u6027\u6A21\u5F0F\u3002",
|
|
21387
|
+
{
|
|
21388
|
+
instId: external_exports.string().describe("\u4EA7\u54C1ID"),
|
|
21389
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA4100")
|
|
21390
|
+
},
|
|
21391
|
+
async ({ instId, limit }) => {
|
|
21392
|
+
try {
|
|
21393
|
+
const data = await publicApi.getHistoryTrades(instId, limit);
|
|
21394
|
+
return toResult(data);
|
|
21395
|
+
} catch (e) {
|
|
21396
|
+
return toError(e);
|
|
21397
|
+
}
|
|
21398
|
+
}
|
|
21399
|
+
);
|
|
21400
|
+
server.tool(
|
|
21401
|
+
"okx_get_system_status",
|
|
21402
|
+
"\u83B7\u53D6OKX\u7CFB\u7EDF\u7EF4\u62A4\u72B6\u6001\u3002\u5728\u4E0B\u5355\u524D\u5EFA\u8BAE\u67E5\u8BE2\uFF0C\u786E\u8BA4\u7CFB\u7EDF\u6B63\u5E38\u8FD0\u884C\u4E2D\uFF0C\u907F\u514D\u7EF4\u62A4\u671F\u8BEF\u64CD\u4F5C\u3002",
|
|
21403
|
+
{},
|
|
21404
|
+
async () => {
|
|
21405
|
+
try {
|
|
21406
|
+
const data = await publicApi.getSystemStatus();
|
|
21407
|
+
return toResult(data);
|
|
21408
|
+
} catch (e) {
|
|
21409
|
+
return toError(e);
|
|
21410
|
+
}
|
|
21411
|
+
}
|
|
21412
|
+
);
|
|
21351
21413
|
}
|
|
21352
21414
|
|
|
21353
21415
|
// src/tools/public.ts
|
|
@@ -21490,7 +21552,7 @@ function registerAccountTools(server, auth) {
|
|
|
21490
21552
|
);
|
|
21491
21553
|
server.tool(
|
|
21492
21554
|
"okx_get_orders_history",
|
|
21493
|
-
"\u67E5\u8BE2\u6700\u8FD1\u7684\u5386\u53F2\u6210\u4EA4\u8BA2\u5355\u5217\u8868\u3002\u7528\u4E8E\u590D\u76D8\u4EA4\u6613\u8868\u73B0\u3001\u7EDF\u8BA1\u76C8\u4E8F\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
21555
|
+
"\u67E5\u8BE2\u6700\u8FD1\u7684\u5386\u53F2\u6210\u4EA4\u8BA2\u5355\u5217\u8868\uFF08\u6700\u8FD13\u4E2A\u6708\uFF09\u3002\u7528\u4E8E\u590D\u76D8\u4EA4\u6613\u8868\u73B0\u3001\u7EDF\u8BA1\u76C8\u4E8F\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
21494
21556
|
{
|
|
21495
21557
|
instType: external_exports.enum(["SPOT", "MARGIN", "SWAP", "FUTURES", "OPTION"]).describe("\u4EA7\u54C1\u7C7B\u578B"),
|
|
21496
21558
|
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA450")
|
|
@@ -21505,6 +21567,55 @@ function registerAccountTools(server, auth) {
|
|
|
21505
21567
|
}
|
|
21506
21568
|
}
|
|
21507
21569
|
);
|
|
21570
|
+
server.tool(
|
|
21571
|
+
"okx_get_account_bills",
|
|
21572
|
+
"\u67E5\u8BE2\u4EA4\u6613\u8D26\u6237\u8D44\u91D1\u6D41\u6C34\uFF08\u8D26\u5355\uFF09\uFF0C\u542B\u6BCF\u7B14\u51FA\u5165\u91D1\u3001\u624B\u7EED\u8D39\u3001\u8D44\u91D1\u8D39\u7387\u3001\u7ED3\u7B97\u76C8\u4E8F\u7B49\u3002\u662F\u6700\u5B8C\u6574\u7684\u8D44\u91D1\u53D8\u52A8\u8BB0\u5F55\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
21573
|
+
{
|
|
21574
|
+
instType: external_exports.enum(["SPOT", "MARGIN", "SWAP", "FUTURES", "OPTION"]).optional().describe("\u4EA7\u54C1\u7C7B\u578B\uFF0C\u4E0D\u586B\u8FD4\u56DE\u5168\u90E8"),
|
|
21575
|
+
ccy: external_exports.string().optional().describe("\u5E01\u79CD\uFF0C\u5982 USDT"),
|
|
21576
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA4100")
|
|
21577
|
+
},
|
|
21578
|
+
async ({ instType, ccy, limit }) => {
|
|
21579
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
21580
|
+
try {
|
|
21581
|
+
const data = await privateApi.getAccountBills(auth, instType, ccy, limit);
|
|
21582
|
+
return toResult(data);
|
|
21583
|
+
} catch (e) {
|
|
21584
|
+
return toError(e);
|
|
21585
|
+
}
|
|
21586
|
+
}
|
|
21587
|
+
);
|
|
21588
|
+
server.tool(
|
|
21589
|
+
"okx_get_account_config",
|
|
21590
|
+
"\u67E5\u8BE2\u8D26\u6237\u5F53\u524D\u914D\u7F6E\uFF0C\u542B\u8D26\u6237\u6A21\u5F0F\uFF08\u5355\u5E01\u79CD/\u591A\u5E01\u79CD/\u7EC4\u5408\u4FDD\u8BC1\u91D1\uFF09\u3001\u6301\u4ED3\u6A21\u5F0F\uFF08\u5355\u5411/\u53CC\u5411\uFF09\u548C\u4E3B\u8D26\u6237UID\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
21591
|
+
{},
|
|
21592
|
+
async () => {
|
|
21593
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
21594
|
+
try {
|
|
21595
|
+
const data = await privateApi.getAccountConfig(auth);
|
|
21596
|
+
return toResult(data);
|
|
21597
|
+
} catch (e) {
|
|
21598
|
+
return toError(e);
|
|
21599
|
+
}
|
|
21600
|
+
}
|
|
21601
|
+
);
|
|
21602
|
+
server.tool(
|
|
21603
|
+
"okx_get_leverage_info",
|
|
21604
|
+
"\u67E5\u8BE2\u6307\u5B9A\u4EA7\u54C1\u7684\u5F53\u524D\u6760\u6746\u500D\u6570\u8BBE\u7F6E\u3002\u4EA4\u6613\u524D\u5EFA\u8BAE\u5148\u67E5\u8BE2\uFF0C\u786E\u8BA4\u98CE\u9669\u655E\u53E3\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
21605
|
+
{
|
|
21606
|
+
instId: external_exports.string().describe("\u4EA7\u54C1ID\uFF0C\u5982 BTC-USDT-SWAP"),
|
|
21607
|
+
mgnMode: external_exports.enum(["isolated", "cross"]).describe("\u4FDD\u8BC1\u91D1\u6A21\u5F0F\uFF1Aisolated=\u9010\u4ED3\uFF0Ccross=\u5168\u4ED3")
|
|
21608
|
+
},
|
|
21609
|
+
async ({ instId, mgnMode }) => {
|
|
21610
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
21611
|
+
try {
|
|
21612
|
+
const data = await privateApi.getLeverageInfo(auth, instId, mgnMode);
|
|
21613
|
+
return toResult(data);
|
|
21614
|
+
} catch (e) {
|
|
21615
|
+
return toError(e);
|
|
21616
|
+
}
|
|
21617
|
+
}
|
|
21618
|
+
);
|
|
21508
21619
|
}
|
|
21509
21620
|
|
|
21510
21621
|
// src/tools/trading.ts
|
|
@@ -21571,6 +21682,59 @@ function registerTradingTools(server, auth) {
|
|
|
21571
21682
|
}
|
|
21572
21683
|
}
|
|
21573
21684
|
);
|
|
21685
|
+
server.tool(
|
|
21686
|
+
"okx_get_orders_pending",
|
|
21687
|
+
"\u67E5\u8BE2\u5F53\u524D\u6240\u6709\u672A\u6210\u4EA4\u6302\u5355\u5217\u8868\u3002\u7528\u4E8E\u76D1\u63A7\u672A\u6210\u4EA4\u8BA2\u5355\u3001\u68C0\u67E5\u9650\u4EF7\u5355\u662F\u5426\u4ECD\u5728\u961F\u5217\u4E2D\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
21688
|
+
{
|
|
21689
|
+
instType: external_exports.enum(["SPOT", "MARGIN", "SWAP", "FUTURES", "OPTION"]).optional().describe("\u4EA7\u54C1\u7C7B\u578B\uFF0C\u4E0D\u586B\u8FD4\u56DE\u5168\u90E8"),
|
|
21690
|
+
instId: external_exports.string().optional().describe("\u4EA7\u54C1ID\uFF0C\u7CBE\u786E\u7B5B\u9009"),
|
|
21691
|
+
ordType: external_exports.enum(["market", "limit", "post_only", "fok", "ioc"]).optional().describe("\u8BA2\u5355\u7C7B\u578B\u7B5B\u9009")
|
|
21692
|
+
},
|
|
21693
|
+
async ({ instType, instId, ordType }) => {
|
|
21694
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
21695
|
+
try {
|
|
21696
|
+
const data = await privateApi.getOrdersPending(auth, instType, instId, ordType);
|
|
21697
|
+
return toResult(data);
|
|
21698
|
+
} catch (e) {
|
|
21699
|
+
return toError(e);
|
|
21700
|
+
}
|
|
21701
|
+
}
|
|
21702
|
+
);
|
|
21703
|
+
server.tool(
|
|
21704
|
+
"okx_get_fills",
|
|
21705
|
+
"\u67E5\u8BE2\u6700\u8FD1\u7684\u6210\u4EA4\u660E\u7EC6\uFF08\u9010\u7B14\u6210\u4EA4\uFF09\uFF0C\u542B\u6210\u4EA4\u4EF7\u3001\u6210\u4EA4\u91CF\u548C\u624B\u7EED\u8D39\u3002\u6BD4\u8BA2\u5355\u5386\u53F2\u66F4\u7EC6\u7C92\u5EA6\uFF0C\u53EF\u7528\u4E8E\u7CBE\u786E\u8BA1\u7B97\u5747\u4EF7\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
21706
|
+
{
|
|
21707
|
+
instType: external_exports.enum(["SPOT", "MARGIN", "SWAP", "FUTURES", "OPTION"]).optional().describe("\u4EA7\u54C1\u7C7B\u578B"),
|
|
21708
|
+
instId: external_exports.string().optional().describe("\u4EA7\u54C1ID"),
|
|
21709
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA4100")
|
|
21710
|
+
},
|
|
21711
|
+
async ({ instType, instId, limit }) => {
|
|
21712
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
21713
|
+
try {
|
|
21714
|
+
const data = await privateApi.getFills(auth, instType, instId, limit);
|
|
21715
|
+
return toResult(data);
|
|
21716
|
+
} catch (e) {
|
|
21717
|
+
return toError(e);
|
|
21718
|
+
}
|
|
21719
|
+
}
|
|
21720
|
+
);
|
|
21721
|
+
server.tool(
|
|
21722
|
+
"okx_get_orders_history_archive",
|
|
21723
|
+
"\u67E5\u8BE23\u4E2A\u6708\u4EE5\u524D\u7684\u5B8C\u6574\u5386\u53F2\u8BA2\u5355\uFF08\u5F52\u6863\u6570\u636E\uFF09\u3002\u7528\u4E8E\u957F\u671F\u4EA4\u6613\u8BB0\u5F55\u5206\u6790\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
21724
|
+
{
|
|
21725
|
+
instType: external_exports.enum(["SPOT", "MARGIN", "SWAP", "FUTURES", "OPTION"]).describe("\u4EA7\u54C1\u7C7B\u578B"),
|
|
21726
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA450")
|
|
21727
|
+
},
|
|
21728
|
+
async ({ instType, limit }) => {
|
|
21729
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
21730
|
+
try {
|
|
21731
|
+
const data = await privateApi.getOrdersHistoryArchive(auth, instType, limit);
|
|
21732
|
+
return toResult(data);
|
|
21733
|
+
} catch (e) {
|
|
21734
|
+
return toError(e);
|
|
21735
|
+
}
|
|
21736
|
+
}
|
|
21737
|
+
);
|
|
21574
21738
|
}
|
|
21575
21739
|
|
|
21576
21740
|
// src/tools/algo.ts
|
|
@@ -21678,6 +21842,68 @@ function registerFundingTools(server, auth) {
|
|
|
21678
21842
|
}
|
|
21679
21843
|
}
|
|
21680
21844
|
);
|
|
21845
|
+
server.tool(
|
|
21846
|
+
"okx_get_currencies",
|
|
21847
|
+
"\u83B7\u53D6OKX\u652F\u6301\u7684\u6240\u6709\u5E01\u79CD\u5217\u8868\uFF0C\u542B\u5145\u503C/\u63D0\u73B0\u662F\u5426\u5F00\u653E\u3001\u6700\u5C0F\u63D0\u73B0\u91CF\u3001\u624B\u7EED\u8D39\u7B49\u4FE1\u606F\u3002\u5145\u503C\u524D\u5EFA\u8BAE\u5148\u67E5\u8BE2\u786E\u8BA4\u7F51\u7EDC\u72B6\u6001\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
21848
|
+
{ ccy: external_exports.string().optional().describe("\u6307\u5B9A\u5E01\u79CD\uFF0C\u5982 BTC\uFF0C\u4E0D\u586B\u8FD4\u56DE\u5168\u90E8") },
|
|
21849
|
+
async ({ ccy }) => {
|
|
21850
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
21851
|
+
try {
|
|
21852
|
+
const data = await privateApi.getCurrencies(auth, ccy);
|
|
21853
|
+
return toResult(data);
|
|
21854
|
+
} catch (e) {
|
|
21855
|
+
return toError(e);
|
|
21856
|
+
}
|
|
21857
|
+
}
|
|
21858
|
+
);
|
|
21859
|
+
server.tool(
|
|
21860
|
+
"okx_get_deposit_address",
|
|
21861
|
+
"\u83B7\u53D6\u6307\u5B9A\u5E01\u79CD\u7684\u5145\u503C\u5730\u5740\uFF08\u542B\u7F51\u7EDC/\u94FE\u4FE1\u606F\uFF09\u3002\u26A0\uFE0F \u8BF7\u5411\u7528\u6237\u5C55\u793A\u5B8C\u6574\u5730\u5740\u548C\u94FE\u540D\u79F0\u540E\u518D\u64CD\u4F5C\uFF0C\u5145\u9519\u94FE\u4E0D\u53EF\u9006\u3002\u9700\u8981API Key\u9274\u6743\u3002",
|
|
21862
|
+
{ ccy: external_exports.string().describe("\u5E01\u79CD\uFF0C\u5982 USDT\u3001BTC\u3001ETH") },
|
|
21863
|
+
async ({ ccy }) => {
|
|
21864
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
21865
|
+
try {
|
|
21866
|
+
const data = await privateApi.getDepositAddress(auth, ccy);
|
|
21867
|
+
return toResult(data);
|
|
21868
|
+
} catch (e) {
|
|
21869
|
+
return toError(e);
|
|
21870
|
+
}
|
|
21871
|
+
}
|
|
21872
|
+
);
|
|
21873
|
+
server.tool(
|
|
21874
|
+
"okx_get_deposit_history",
|
|
21875
|
+
"\u67E5\u8BE2\u5145\u503C\u8BB0\u5F55\uFF0C\u542B\u72B6\u6001\uFF08\u5F85\u786E\u8BA4/\u6210\u529F/\u5931\u8D25\uFF09\u3001\u5230\u8D26\u6570\u91CF\u548C\u4EA4\u6613\u54C8\u5E0C\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
21876
|
+
{
|
|
21877
|
+
ccy: external_exports.string().optional().describe("\u5E01\u79CD\uFF0C\u4E0D\u586B\u8FD4\u56DE\u5168\u90E8"),
|
|
21878
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA4100")
|
|
21879
|
+
},
|
|
21880
|
+
async ({ ccy, limit }) => {
|
|
21881
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
21882
|
+
try {
|
|
21883
|
+
const data = await privateApi.getDepositHistory(auth, ccy, limit);
|
|
21884
|
+
return toResult(data);
|
|
21885
|
+
} catch (e) {
|
|
21886
|
+
return toError(e);
|
|
21887
|
+
}
|
|
21888
|
+
}
|
|
21889
|
+
);
|
|
21890
|
+
server.tool(
|
|
21891
|
+
"okx_get_withdrawal_history",
|
|
21892
|
+
"\u67E5\u8BE2\u63D0\u73B0\u8BB0\u5F55\uFF0C\u542B\u63D0\u73B0\u72B6\u6001\u3001\u624B\u7EED\u8D39\u548C\u94FE\u4E0A\u4EA4\u6613\u54C8\u5E0C\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
21893
|
+
{
|
|
21894
|
+
ccy: external_exports.string().optional().describe("\u5E01\u79CD\uFF0C\u4E0D\u586B\u8FD4\u56DE\u5168\u90E8"),
|
|
21895
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA4100")
|
|
21896
|
+
},
|
|
21897
|
+
async ({ ccy, limit }) => {
|
|
21898
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
21899
|
+
try {
|
|
21900
|
+
const data = await privateApi.getWithdrawalHistory(auth, ccy, limit);
|
|
21901
|
+
return toResult(data);
|
|
21902
|
+
} catch (e) {
|
|
21903
|
+
return toError(e);
|
|
21904
|
+
}
|
|
21905
|
+
}
|
|
21906
|
+
);
|
|
21681
21907
|
}
|
|
21682
21908
|
|
|
21683
21909
|
// src/tools/stats.ts
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hvip-mcp-server",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"description": "OKX ecosystem MCP server — full API coverage for AI agents",
|
|
5
5
|
"homepage": "https://hvip.one",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"bin": {
|
|
8
|
-
"hvip-mcp": "
|
|
8
|
+
"hvip-mcp": "dist/index.js"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist/index.js"
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"build": "node build.mjs",
|
|
15
15
|
"dev": "tsx watch src/index.ts",
|
|
16
16
|
"start": "node dist/index.js",
|
|
17
|
-
"verify": "tsx tests/verify.
|
|
17
|
+
"verify": "tsx tests/verify.mts",
|
|
18
18
|
"test": "vitest run",
|
|
19
19
|
"test:watch": "vitest",
|
|
20
20
|
"lint": "eslint src",
|