hvip-mcp-server 0.2.30 → 0.2.31

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.
Files changed (2) hide show
  1. package/dist/index.js +132 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -21456,7 +21456,18 @@ var privateApi = {
21456
21456
  getStakingActiveOrders: (auth) => request("GET", "/api/v5/finance/staking-defi/orders-active", { auth }),
21457
21457
  cancelRedeemEthStaking: (auth, body) => request("POST", "/api/v5/finance/staking-defi/eth/cancel-redeem", { body, auth }),
21458
21458
  purchaseSolStaking: (auth, body) => request("POST", "/api/v5/finance/staking-defi/sol/purchase", { body, auth }),
21459
- redeemSolStaking: (auth, body) => request("POST", "/api/v5/finance/staking-defi/sol/redeem", { body, auth })
21459
+ redeemSolStaking: (auth, body) => request("POST", "/api/v5/finance/staking-defi/sol/redeem", { body, auth }),
21460
+ // ── 最终批 ────────────────────────────────────────────────────────────
21461
+ getRiskState: (auth) => request("GET", "/api/v5/account/risk-state", { auth }),
21462
+ borrowRepay: (auth, body) => request("POST", "/api/v5/account/borrow-repay", { body, auth }),
21463
+ getBorrowRepayHistory: (auth) => request("GET", "/api/v5/account/borrow-repay-history", { auth }),
21464
+ getFlexibleLoanCollateralAssets: (auth) => request("GET", "/api/v5/finance/flexible-loan/collateral-assets", { auth }),
21465
+ getFlexibleLoanInfo: (auth) => request("GET", "/api/v5/finance/flexible-loan/loan-info", { auth }),
21466
+ getFlexibleLoanHistory: (auth) => request("GET", "/api/v5/finance/flexible-loan/loan-history", { auth }),
21467
+ getStableRewardsProductInfo: (auth) => request("GET", "/api/v5/finance/stable-rewards/product-info", { auth }),
21468
+ getStableRewardsQuote: (auth, body) => request("POST", "/api/v5/finance/stable-rewards/quote", { body, auth }),
21469
+ getEasyConvertCurrencyList: (auth) => request("GET", "/api/v5/trade/easy-convert-currency-list", { auth }),
21470
+ getOneClickRepayCurrencyList: (auth) => request("GET", "/api/v5/trade/one-click-repay-currency-list", { auth })
21460
21471
  };
21461
21472
 
21462
21473
  // src/adapters/hrails.ts
@@ -23223,6 +23234,56 @@ function registerAccountTools(server, auth) {
23223
23234
  }
23224
23235
  }
23225
23236
  );
23237
+ server.tool(
23238
+ "okx_get_risk_state",
23239
+ "## \u529F\u80FD\uFF1A\u67E5\u8BE2\u8D26\u6237\u98CE\u63A7\u72B6\u6001\n## \u573A\u666F\uFF1A\u7528\u4E8E\u4E86\u89E3\u8D26\u6237\u662F\u5426\u5B58\u5728\u98CE\u9669\u8B66\u544A\n## \u5173\u952E\u8BCD\uFF1A\u98CE\u63A7\u72B6\u6001, risk state, \u8D26\u6237\u98CE\u9669, \u5F3A\u5E73\u98CE\u9669\n## \u53C2\u6570\uFF1A\u65E0\n## \u9274\u6743\uFF1A\u26A0\uFE0F \u9700\u8981 API Key\uFF08\u53EA\u8BFB\uFF09\n## \u98CE\u9669\uFF1AREAD \u2014 \u53EA\u8BFB\u67E5\u8BE2\uFF0CAgent \u53EF\u81EA\u52A8\u8C03\u7528\n## \u8FD4\u56DE\u91CF\uFF1A\u4E2D\u7B49 ~5KB\n## \u5173\u8054\uFF1A\u672C\u5DE5\u5177\u67E5\u98CE\u9669 \u2192 \u5F3A\u5E73\u9884\u8B66 \u2192 \u8C03\u6574\u4FDD\u8BC1\u91D1",
23240
+ {},
23241
+ async () => {
23242
+ if (!auth) return toError(AUTH_REQUIRED);
23243
+ try {
23244
+ const data = await privateApi.getRiskState(auth);
23245
+ return toResult(data);
23246
+ } catch (e) {
23247
+ return toError(e);
23248
+ }
23249
+ }
23250
+ );
23251
+ server.tool(
23252
+ "okx_borrow_repay",
23253
+ "## \u529F\u80FD\uFF1A\u501F\u5E01\u6216\u8FD8\u6B3E\n## \u573A\u666F\uFF1A\u7528\u4E8E\u589E\u52A0\u501F\u6B3E\u6216\u507F\u8FD8\u503A\u52A1\n## \u53C2\u6570\uFF1A\n## - ccy: \u5E01\u79CD\u3002\u5FC5\u586B\n## - side: \u65B9\u5411\u3002borrow=\u501F\u5E01, repay=\u8FD8\u6B3E\u3002\u5FC5\u586B\n## - amt: \u6570\u91CF\u3002\u5FC5\u586B\n## \u9274\u6743\uFF1A\u{1F534} \u9700\u8981 API Key\uFF08\u4EA4\u6613\uFF09- \u5C06\u64CD\u4F5C\u501F\u8D37\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u98CE\u9669\uFF1AFUND_TRANSFER \u2014 \u501F\u5165/\u507F\u8FD8\u8D44\u91D1\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u8FD4\u56DE\u91CF\uFF1A\u5FAE\u5C0F ~500B\n## \u5173\u8054\uFF1A\u672C\u5DE5\u5177\u64CD\u4F5C \u2192 okx_get_borrow_repay_history \u770B\u8BB0\u5F55",
23254
+ {
23255
+ ccy: external_exports.string().describe("\u5E01\u79CD\u3002\u5FC5\u586B"),
23256
+ side: external_exports.enum(["borrow", "repay"]).describe("\u65B9\u5411\u3002borrow=\u501F\u5E01, repay=\u8FD8\u6B3E"),
23257
+ amt: external_exports.string().describe("\u6570\u91CF\u3002\u5FC5\u586B")
23258
+ },
23259
+ async ({ ccy, side, amt }) => {
23260
+ if (!auth) return toError(AUTH_REQUIRED);
23261
+ try {
23262
+ const data = await privateApi.borrowRepay(auth, { ccy, side, amt });
23263
+ return toResult(data);
23264
+ } catch (e) {
23265
+ return toError(e);
23266
+ }
23267
+ }
23268
+ );
23269
+ server.tool(
23270
+ "okx_get_borrow_repay_history",
23271
+ "## \u529F\u80FD\uFF1A\u67E5\u8BE2\u501F\u5E01\u8FD8\u6B3E\u5386\u53F2\n## \u573A\u666F\uFF1A\u7528\u4E8E\u8FFD\u8E2A\u501F\u8D37\u64CD\u4F5C\u8BB0\u5F55\n## \u5173\u952E\u8BCD\uFF1A\u501F\u8D37\u5386\u53F2, borrow repay history, \u501F\u6B3E\u8BB0\u5F55\n## \u53C2\u6570\uFF1A\u65E0\n## \u9274\u6743\uFF1A\u26A0\uFE0F \u9700\u8981 API Key\uFF08\u53EA\u8BFB\uFF09\n## \u98CE\u9669\uFF1AREAD \u2014 \u53EA\u8BFB\u67E5\u8BE2\uFF0CAgent \u53EF\u81EA\u52A8\u8C03\u7528\n## \u8FD4\u56DE\u91CF\uFF1A\u4E2D\u7B49 ~5KB\n## \u5173\u8054\uFF1Aokx_borrow_repay \u64CD\u4F5C \u2192 \u672C\u5DE5\u5177\u67E5\u8BB0\u5F55",
23272
+ {},
23273
+ async () => {
23274
+ if (!auth) return toError(AUTH_REQUIRED);
23275
+ try {
23276
+ const data = await privateApi.getBorrowRepayHistory(auth);
23277
+ const enriched = data.map((item) => ({
23278
+ ...item,
23279
+ tsIso: item.ts ? new Date(parseInt(item.ts)).toISOString() : void 0
23280
+ }));
23281
+ return toResult(enriched);
23282
+ } catch (e) {
23283
+ return toError(e);
23284
+ }
23285
+ }
23286
+ );
23226
23287
  }
23227
23288
 
23228
23289
  // src/tools/trading.ts
@@ -23740,6 +23801,20 @@ function registerTradingTools(server, auth) {
23740
23801
  }
23741
23802
  }
23742
23803
  );
23804
+ server.tool(
23805
+ "okx_get_easy_convert_currency_list",
23806
+ "## \u529F\u80FD\uFF1A\u83B7\u53D6\u95EA\u5151\u652F\u6301\u7684\u5E01\u79CD\u5217\u8868\n## \u573A\u666F\uFF1A\u7528\u4E8E\u67E5\u770B\u54EA\u4E9B\u5E01\u79CD\u652F\u6301\u95EA\u5151\n## \u5173\u952E\u8BCD\uFF1A\u95EA\u5151\u5217\u8868, easy convert list, \u95EA\u5151\u5E01\u79CD\n## \u53C2\u6570\uFF1A\u65E0\n## \u9274\u6743\uFF1A\u26A0\uFE0F \u9700\u8981 API Key\uFF08\u53EA\u8BFB\uFF09\n## \u98CE\u9669\uFF1AREAD \u2014 \u53EA\u8BFB\u67E5\u8BE2\n## \u8FD4\u56DE\u91CF\uFF1A\u4E2D\u7B49 ~5KB",
23807
+ {},
23808
+ async () => {
23809
+ if (!auth) return toError(AUTH_REQUIRED);
23810
+ try {
23811
+ const data = await privateApi.getEasyConvertCurrencyList(auth);
23812
+ return toResult(data);
23813
+ } catch (e) {
23814
+ return toError(e);
23815
+ }
23816
+ }
23817
+ );
23743
23818
  }
23744
23819
 
23745
23820
  // src/tools/algo.ts
@@ -25149,6 +25224,62 @@ function registerFinanceTools(server, auth) {
25149
25224
  }
25150
25225
  }
25151
25226
  );
25227
+ server.tool(
25228
+ "okx_get_flexible_loan_collateral",
25229
+ "## \u529F\u80FD\uFF1A\u67E5\u8BE2\u7075\u6D3B\u501F\u8D37\u652F\u6301\u7684\u62B5\u62BC\u8D44\u4EA7\n## \u573A\u666F\uFF1A\u7528\u4E8E\u67E5\u770B\u53EF\u62B5\u62BC\u7684\u5E01\u79CD\u548C\u62B5\u62BC\u7387\n## \u5173\u952E\u8BCD\uFF1A\u62B5\u62BC\u8D44\u4EA7, collateral assets, \u7075\u6D3B\u501F\u8D37\u62B5\u62BC\n## \u53C2\u6570\uFF1A\u65E0\n## \u9274\u6743\uFF1A\u26A0\uFE0F \u9700\u8981 API Key\uFF08\u53EA\u8BFB\uFF09\n## \u98CE\u9669\uFF1AREAD \u2014 \u53EA\u8BFB\u67E5\u8BE2\uFF0CAgent \u53EF\u81EA\u52A8\u8C03\u7528\n## \u8FD4\u56DE\u91CF\uFF1A\u4E2D\u7B49 ~5KB\n## \u5173\u8054\uFF1A\u672C\u5DE5\u5177\u67E5\u770B\u62B5\u62BC\u8D44\u4EA7 \u2192 \u8C03\u6574\u62B5\u62BC \u2192 \u7BA1\u7406\u501F\u8D37",
25230
+ {},
25231
+ async () => {
25232
+ if (!auth) return toError(AUTH_REQUIRED);
25233
+ try {
25234
+ const data = await privateApi.getFlexibleLoanCollateralAssets(auth);
25235
+ return toResult(data);
25236
+ } catch (e) {
25237
+ return toError(e);
25238
+ }
25239
+ }
25240
+ );
25241
+ server.tool(
25242
+ "okx_get_flexible_loan_info",
25243
+ "## \u529F\u80FD\uFF1A\u67E5\u8BE2\u7075\u6D3B\u501F\u8D37\u4FE1\u606F\n## \u573A\u666F\uFF1A\u7528\u4E8E\u67E5\u770B\u5F53\u524D\u501F\u8D37\u8BE6\u60C5\n## \u5173\u952E\u8BCD\uFF1A\u7075\u6D3B\u501F\u8D37, loan info, \u501F\u8D37\u4FE1\u606F\n## \u53C2\u6570\uFF1A\u65E0\n## \u9274\u6743\uFF1A\u26A0\uFE0F \u9700\u8981 API Key\uFF08\u53EA\u8BFB\uFF09\n## \u98CE\u9669\uFF1AREAD \u2014 \u53EA\u8BFB\u67E5\u8BE2\uFF0CAgent \u53EF\u81EA\u52A8\u8C03\u7528\n## \u8FD4\u56DE\u91CF\uFF1A\u4E2D\u7B49 ~5KB\n## \u5173\u8054\uFF1A\u672C\u5DE5\u5177\u67E5\u770B\u501F\u8D37 \u2192 \u7BA1\u7406\u98CE\u9669",
25244
+ {},
25245
+ async () => {
25246
+ if (!auth) return toError(AUTH_REQUIRED);
25247
+ try {
25248
+ const data = await privateApi.getFlexibleLoanInfo(auth);
25249
+ return toResult(data);
25250
+ } catch (e) {
25251
+ return toError(e);
25252
+ }
25253
+ }
25254
+ );
25255
+ server.tool(
25256
+ "okx_get_flexible_loan_history",
25257
+ "## \u529F\u80FD\uFF1A\u67E5\u8BE2\u7075\u6D3B\u501F\u8D37\u5386\u53F2\n## \u573A\u666F\uFF1A\u7528\u4E8E\u8FFD\u8E2A\u501F\u8D37\u64CD\u4F5C\u8BB0\u5F55\n## \u5173\u952E\u8BCD\uFF1A\u501F\u8D37\u5386\u53F2, loan history, \u7075\u6D3B\u501F\u8D37\u8BB0\u5F55\n## \u53C2\u6570\uFF1A\u65E0\n## \u9274\u6743\uFF1A\u26A0\uFE0F \u9700\u8981 API Key\uFF08\u53EA\u8BFB\uFF09\n## \u98CE\u9669\uFF1AREAD \u2014 \u53EA\u8BFB\u67E5\u8BE2\n## \u8FD4\u56DE\u91CF\uFF1A\u4E2D\u7B49 ~5KB",
25258
+ {},
25259
+ async () => {
25260
+ if (!auth) return toError(AUTH_REQUIRED);
25261
+ try {
25262
+ const data = await privateApi.getFlexibleLoanHistory(auth);
25263
+ return toResult(data);
25264
+ } catch (e) {
25265
+ return toError(e);
25266
+ }
25267
+ }
25268
+ );
25269
+ server.tool(
25270
+ "okx_get_stable_rewards_product",
25271
+ "## \u529F\u80FD\uFF1A\u67E5\u8BE2\u7A33\u5B9A\u5E01\u5956\u52B1\u4EA7\u54C1\n## \u573A\u666F\uFF1A\u7528\u4E8E\u67E5\u770B\u7A33\u5B9A\u5E01\u7406\u8D22\u4EA7\u54C1\u7684\u6536\u76CA\u7387\n## \u5173\u952E\u8BCD\uFF1A\u7A33\u5B9A\u5E01\u5956\u52B1, stable rewards, \u7A33\u5B9A\u5E01\u7406\u8D22\n## \u53C2\u6570\uFF1A\u65E0\n## \u9274\u6743\uFF1A\u26A0\uFE0F \u9700\u8981 API Key\uFF08\u53EA\u8BFB\uFF09\n## \u98CE\u9669\uFF1AREAD \u2014 \u53EA\u8BFB\u67E5\u8BE2\n## \u8FD4\u56DE\u91CF\uFF1A\u4E2D\u7B49 ~5KB",
25272
+ {},
25273
+ async () => {
25274
+ if (!auth) return toError(AUTH_REQUIRED);
25275
+ try {
25276
+ const data = await privateApi.getStableRewardsProductInfo(auth);
25277
+ return toResult(data);
25278
+ } catch (e) {
25279
+ return toError(e);
25280
+ }
25281
+ }
25282
+ );
25152
25283
  }
25153
25284
 
25154
25285
  // src/tools/outcomes.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvip-mcp-server",
3
- "version": "0.2.30",
3
+ "version": "0.2.31",
4
4
  "description": "OKX ecosystem MCP server - full API coverage for AI agents",
5
5
  "homepage": "https://hvip.one",
6
6
  "license": "MIT",