hvip-mcp-server 0.1.4 → 0.1.5

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 +165 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -21161,7 +21161,14 @@ var publicApi = {
21161
21161
  getHistoryCandles: (instId, bar, after, before, limit) => request("GET", "/api/v5/market/history-candles", { params: { instId, bar, after, before, limit } }),
21162
21162
  getHistoryTrades: (instId, limit) => request("GET", "/api/v5/market/history-trades", { params: { instId, limit } }),
21163
21163
  getSystemStatus: () => request("GET", "/api/v5/system/status"),
21164
- getPriceLimitBatch: (instType, uly, instId) => request("GET", "/api/v5/public/price-limit", { params: { instType, uly, instId } })
21164
+ getPriceLimitBatch: (instType, uly, instId) => request("GET", "/api/v5/public/price-limit", { params: { instType, uly, instId } }),
21165
+ getOptSummary: (uly, expTime) => request("GET", "/api/v5/public/opt-summary", { params: { uly, expTime } }),
21166
+ getInsuranceFund: (instType, uly) => request("GET", "/api/v5/public/insurance-fund", { params: { instType, uly } }),
21167
+ convertContractCoin: (instId, sz, unit, opType) => request("GET", "/api/v5/public/convert-contract-coin", { params: { instId, sz, unit, opType } }),
21168
+ getSupportCoin: () => request("GET", "/api/v5/rubik/stat/trading-data/support-coin"),
21169
+ getTopTraderLongShortRatio: (instId, begin, end) => request("GET", "/api/v5/rubik/stat/contracts/long-short-account-ratio-contract-top-trader", { params: { instId, begin, end } }),
21170
+ getOptionPutCallRatio: (ccy, begin, end) => request("GET", "/api/v5/rubik/stat/option/open-interest-volume-ratio", { params: { ccy, begin, end } }),
21171
+ getLendingRateSummary: (ccy) => request("GET", "/api/v5/finance/savings/lending-rate-summary", { params: { ccy } })
21165
21172
  };
21166
21173
  var privateApi = {
21167
21174
  getBalance: (auth, ccy) => request("GET", "/api/v5/account/balance", { params: { ccy }, auth }),
@@ -21185,6 +21192,9 @@ var privateApi = {
21185
21192
  getDepositAddress: (auth, ccy) => request("GET", "/api/v5/asset/deposit-address", { params: { ccy }, auth }),
21186
21193
  getDepositHistory: (auth, ccy, limit) => request("GET", "/api/v5/asset/deposit-history", { params: { ccy, limit }, auth }),
21187
21194
  getWithdrawalHistory: (auth, ccy, limit) => request("GET", "/api/v5/asset/withdrawal-history", { params: { ccy, limit }, auth }),
21195
+ getEthStakingBalance: (auth) => request("GET", "/api/v5/finance/staking-defi/eth/balance", { auth }),
21196
+ getEthStakingHistory: (auth, limit) => request("GET", "/api/v5/finance/staking-defi/eth/purchase-redeem-history", { params: { limit }, auth }),
21197
+ getSolStakingBalance: (auth) => request("GET", "/api/v5/finance/staking-defi/sol/balance", { auth }),
21188
21198
  getAlgoOrders: (auth, ordType, instType) => request("GET", "/api/v5/trade/orders-algo-pending", { params: { ordType, instType }, auth }),
21189
21199
  getAlgoOrdersHistory: (auth, ordType, state, instType) => request("GET", "/api/v5/trade/orders-algo-history", { params: { ordType, state, instType }, auth }),
21190
21200
  placeAlgoOrder: (auth, body) => request("POST", "/api/v5/trade/order-algo", { body, auth }),
@@ -21501,6 +21511,56 @@ function registerPublicTools(server) {
21501
21511
  }
21502
21512
  }
21503
21513
  );
21514
+ server.tool(
21515
+ "okx_get_opt_summary",
21516
+ "\u83B7\u53D6\u671F\u6743\u5E02\u573A\u6458\u8981\u6570\u636E\uFF0C\u542B\u5404\u5230\u671F\u65E5\u7684\u9690\u542B\u6CE2\u52A8\u7387\uFF08IV\uFF09\u3001\u672A\u5E73\u4ED3\u91CF\u548C\u6210\u4EA4\u91CF\u5206\u5E03\u3002\u7528\u4E8E\u671F\u6743\u4EA4\u6613\u524D\u7684\u6574\u4F53\u5E02\u573A\u626B\u63CF\u3002",
21517
+ {
21518
+ uly: external_exports.string().describe("\u6807\u7684\u6307\u6570\uFF0C\u5982 BTC-USD\u3001ETH-USD"),
21519
+ expTime: external_exports.string().optional().describe("\u5230\u671F\u65E5\u7B5B\u9009\uFF0C\u683C\u5F0F YYYYMMDD\uFF0C\u5982 20250101")
21520
+ },
21521
+ async ({ uly, expTime }) => {
21522
+ try {
21523
+ const data = await publicApi.getOptSummary(uly, expTime);
21524
+ return toResult(data);
21525
+ } catch (e) {
21526
+ return toError(e);
21527
+ }
21528
+ }
21529
+ );
21530
+ server.tool(
21531
+ "okx_get_insurance_fund",
21532
+ "\u83B7\u53D6OKX\u4FDD\u9669\u57FA\u91D1\u4F59\u989D\u53D8\u52A8\u5386\u53F2\u3002\u4FDD\u9669\u57FA\u91D1\u89C4\u6A21\u53CD\u6620\u4EA4\u6613\u6240\u62B5\u5FA1\u6781\u7AEF\u884C\u60C5\u7684\u80FD\u529B\uFF0C\u4E5F\u662F\u8861\u91CF\u5E73\u53F0\u98CE\u9669\u7684\u6307\u6807\u3002",
21533
+ {
21534
+ instType: external_exports.enum(["SWAP", "FUTURES", "OPTION", "MARGIN"]).describe("\u4EA7\u54C1\u7C7B\u578B"),
21535
+ uly: external_exports.string().optional().describe("\u6807\u7684\u6307\u6570\uFF0C\u5982 BTC-USD\uFF08SWAP/FUTURES/OPTION\u5FC5\u586B\uFF09")
21536
+ },
21537
+ async ({ instType, uly }) => {
21538
+ try {
21539
+ const data = await publicApi.getInsuranceFund(instType, uly);
21540
+ return toResult(data);
21541
+ } catch (e) {
21542
+ return toError(e);
21543
+ }
21544
+ }
21545
+ );
21546
+ server.tool(
21547
+ "okx_convert_contract_coin",
21548
+ "\u5408\u7EA6\u5F20\u6570\u4E0E\u5E01\u6570\u4E92\u6362\u8BA1\u7B97\u3002\u4E0B\u5408\u7EA6\u5355\u65F6\u5148\u7528\u6B64\u63A5\u53E3\u6362\u7B97\u5F20\u6570\uFF0C\u907F\u514D\u6570\u91CF\u586B\u9519\u3002",
21549
+ {
21550
+ instId: external_exports.string().describe("\u4EA7\u54C1ID\uFF0C\u5982 BTC-USDT-SWAP"),
21551
+ sz: external_exports.string().describe("\u6570\u91CF\uFF08\u5F20\u6570\u6216\u5E01\u6570\uFF0C\u53D6\u51B3\u4E8Eunit\uFF09"),
21552
+ unit: external_exports.enum(["coin", "usds", "contracts"]).describe("sz\u7684\u5355\u4F4D\uFF1Acoin=\u5E01\uFF0Ccontracts=\u5F20"),
21553
+ opType: external_exports.enum(["open", "close"]).describe("\u5F00\u4ED3\u6216\u5E73\u4ED3")
21554
+ },
21555
+ async ({ instId, sz, unit, opType }) => {
21556
+ try {
21557
+ const data = await publicApi.convertContractCoin(instId, sz, unit, opType);
21558
+ return toResult(data);
21559
+ } catch (e) {
21560
+ return toError(e);
21561
+ }
21562
+ }
21563
+ );
21504
21564
  }
21505
21565
 
21506
21566
  // src/tools/account.ts
@@ -21973,6 +22033,66 @@ function registerStatsTools(server) {
21973
22033
  }
21974
22034
  }
21975
22035
  );
22036
+ server.tool(
22037
+ "okx_get_stats_support_coin",
22038
+ "\u83B7\u53D6\u4EA4\u6613\u5927\u6570\u636E\u6A21\u5757\u652F\u6301\u67E5\u8BE2\u7684\u6240\u6709\u5E01\u79CD\u5217\u8868\u3002\u5728\u8C03\u7528\u5176\u4ED6\u4EA4\u6613\u5927\u6570\u636E\u63A5\u53E3\u524D\uFF0C\u53EF\u5148\u67E5\u8BE2\u6B64\u63A5\u53E3\u786E\u8BA4\u5E01\u79CD\u53EF\u7528\u3002",
22039
+ {},
22040
+ async () => {
22041
+ try {
22042
+ const data = await publicApi.getSupportCoin();
22043
+ return toResult(data);
22044
+ } catch (e) {
22045
+ return toError(e);
22046
+ }
22047
+ }
22048
+ );
22049
+ server.tool(
22050
+ "okx_get_top_trader_long_short_ratio",
22051
+ "\u83B7\u53D6\u7CBE\u82F1\u4EA4\u6613\u5458\u591A\u7A7A\u6301\u4ED3\u6BD4\u4F8B\uFF08\u4EC5\u7EDF\u8BA1\u524D5%\u5927\u6237\uFF09\u3002\u5927\u6237\u7684\u4ED3\u4F4D\u6BD4\u6563\u6237\u66F4\u5177\u9884\u6D4B\u4EF7\u503C\uFF0C\u80CC\u79BB\u65F6\u5F80\u5F80\u662F\u9006\u52BF\u4FE1\u53F7\u3002",
22052
+ {
22053
+ instId: external_exports.string().describe("\u5408\u7EA6\u4EA7\u54C1ID\uFF0C\u5982 BTC-USDT-SWAP\u3001ETH-USDT-SWAP"),
22054
+ begin: external_exports.string().optional().describe("\u5F00\u59CB\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09"),
22055
+ end: external_exports.string().optional().describe("\u7ED3\u675F\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09")
22056
+ },
22057
+ async ({ instId, begin, end }) => {
22058
+ try {
22059
+ const data = await publicApi.getTopTraderLongShortRatio(instId, begin, end);
22060
+ return toResult(data);
22061
+ } catch (e) {
22062
+ return toError(e);
22063
+ }
22064
+ }
22065
+ );
22066
+ server.tool(
22067
+ "okx_get_put_call_ratio",
22068
+ "\u83B7\u53D6\u671F\u6743Put/Call\u6BD4\uFF08\u672A\u5E73\u4ED3\u91CF\u548C\u6210\u4EA4\u91CF\uFF09\u3002Put/Call > 1 \u8868\u793A\u5E02\u573A\u504F\u5411\u770B\u8DCC\uFF0C\u662F\u8861\u91CF\u671F\u6743\u5E02\u573A\u60C5\u7EEA\u7684\u7ECF\u5178\u6307\u6807\u3002",
22069
+ {
22070
+ ccy: external_exports.string().describe("\u5E01\u79CD\uFF0C\u5982 BTC\u3001ETH"),
22071
+ begin: external_exports.string().optional().describe("\u5F00\u59CB\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09"),
22072
+ end: external_exports.string().optional().describe("\u7ED3\u675F\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09")
22073
+ },
22074
+ async ({ ccy, begin, end }) => {
22075
+ try {
22076
+ const data = await publicApi.getOptionPutCallRatio(ccy, begin, end);
22077
+ return toResult(data);
22078
+ } catch (e) {
22079
+ return toError(e);
22080
+ }
22081
+ }
22082
+ );
22083
+ server.tool(
22084
+ "okx_get_lending_rate_summary",
22085
+ "\u83B7\u53D6\u6D3B\u671F\u501F\u5E01\u5F53\u524D\u5E02\u573A\u5229\u7387\u6C47\u603B\uFF08\u516C\u5F00\u6570\u636E\uFF0C\u65E0\u9700API Key\uFF09\u3002\u7528\u4E8E\u5224\u65AD\u501F\u8D37\u6210\u672C\uFF0C\u6216\u5BFB\u627E\u95F2\u7F6E\u8D44\u91D1\u7684\u6700\u4F18\u51FA\u501F\u5229\u7387\u3002",
22086
+ { ccy: external_exports.string().optional().describe("\u5E01\u79CD\uFF0C\u5982 BTC\u3001USDT\uFF0C\u4E0D\u586B\u8FD4\u56DE\u5168\u90E8") },
22087
+ async ({ ccy }) => {
22088
+ try {
22089
+ const data = await publicApi.getLendingRateSummary(ccy);
22090
+ return toResult(data);
22091
+ } catch (e) {
22092
+ return toError(e);
22093
+ }
22094
+ }
22095
+ );
21976
22096
  }
21977
22097
 
21978
22098
  // src/tools/subaccount.ts
@@ -22085,6 +22205,50 @@ function registerFinanceTools(server, auth) {
22085
22205
  }
22086
22206
  }
22087
22207
  );
22208
+ server.tool(
22209
+ "okx_get_eth_staking_balance",
22210
+ "\u67E5\u8BE2ETH\u8D28\u62BC\uFF08BETH\uFF09\u6301\u4ED3\u4F59\u989D\uFF0C\u542B\u8D28\u62BC\u603B\u91CF\u3001BETH\u6570\u91CF\u548C\u5F53\u524D\u5E74\u5316\u6536\u76CA\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
22211
+ {},
22212
+ async () => {
22213
+ if (!auth) return toError(AUTH_REQUIRED);
22214
+ try {
22215
+ const data = await privateApi.getEthStakingBalance(auth);
22216
+ return toResult(data);
22217
+ } catch (e) {
22218
+ return toError(e);
22219
+ }
22220
+ }
22221
+ );
22222
+ server.tool(
22223
+ "okx_get_eth_staking_history",
22224
+ "\u67E5\u8BE2ETH\u8D28\u62BC/\u8D4E\u56DE\u5386\u53F2\u8BB0\u5F55\uFF0C\u542B\u64CD\u4F5C\u65F6\u95F4\u3001\u6570\u91CF\u548C\u72B6\u6001\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
22225
+ {
22226
+ limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA4100")
22227
+ },
22228
+ async ({ limit }) => {
22229
+ if (!auth) return toError(AUTH_REQUIRED);
22230
+ try {
22231
+ const data = await privateApi.getEthStakingHistory(auth, limit);
22232
+ return toResult(data);
22233
+ } catch (e) {
22234
+ return toError(e);
22235
+ }
22236
+ }
22237
+ );
22238
+ server.tool(
22239
+ "okx_get_sol_staking_balance",
22240
+ "\u67E5\u8BE2SOL\u8D28\u62BC\u6301\u4ED3\u4F59\u989D\uFF0C\u542B\u8D28\u62BC\u603B\u91CF\u548C\u5F53\u524D\u5E74\u5316\u6536\u76CA\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
22241
+ {},
22242
+ async () => {
22243
+ if (!auth) return toError(AUTH_REQUIRED);
22244
+ try {
22245
+ const data = await privateApi.getSolStakingBalance(auth);
22246
+ return toResult(data);
22247
+ } catch (e) {
22248
+ return toError(e);
22249
+ }
22250
+ }
22251
+ );
22088
22252
  }
22089
22253
 
22090
22254
  // src/tools/outcomes.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hvip-mcp-server",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "OKX ecosystem MCP server — full API coverage for AI agents",
5
5
  "homepage": "https://hvip.one",
6
6
  "license": "MIT",