hvip-mcp-server 0.1.6 → 0.1.8
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 +263 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21169,6 +21169,10 @@ var publicApi = {
|
|
|
21169
21169
|
getTopTraderLongShortRatio: (instId, begin, end) => request("GET", "/api/v5/rubik/stat/contracts/long-short-account-ratio-contract-top-trader", { params: { instId, begin, end } }),
|
|
21170
21170
|
getOptionPutCallRatio: (ccy, begin, end) => request("GET", "/api/v5/rubik/stat/option/open-interest-volume-ratio", { params: { ccy, begin, end } }),
|
|
21171
21171
|
getLendingRateSummary: (ccy) => request("GET", "/api/v5/finance/savings/lending-rate-summary", { params: { ccy } }),
|
|
21172
|
+
// ── 跟单(公共,需带单员uniqueCode) ─────────────────────────────────────────
|
|
21173
|
+
getLeadTraderPositions: (uniqueCode, instType) => request("GET", "/api/v5/copytrading/public-current-subpositions", { params: { uniqueCode, instType } }),
|
|
21174
|
+
getLeadTraderHistory: (uniqueCode, instType, limit) => request("GET", "/api/v5/copytrading/public-subpositions-history", { params: { uniqueCode, instType, limit } }),
|
|
21175
|
+
getLeadTraderStats: (uniqueCode, instType, lastDays) => request("GET", "/api/v5/copytrading/public-stats", { params: { uniqueCode, instType, lastDays } }),
|
|
21172
21176
|
// ── 网格交易机器人(公共) ────────────────────────────────────────────────────
|
|
21173
21177
|
getGridAiParam: (instId, algoOrdType, direction) => request("GET", "/api/v5/tradingBot/grid/ai-param", { params: { instId, algoOrdType, direction } }),
|
|
21174
21178
|
// ── 大宗交易行情(公共) ─────────────────────────────────────────────────────
|
|
@@ -21208,6 +21212,12 @@ var privateApi = {
|
|
|
21208
21212
|
getEthStakingBalance: (auth) => request("GET", "/api/v5/finance/staking-defi/eth/balance", { auth }),
|
|
21209
21213
|
getEthStakingHistory: (auth, limit) => request("GET", "/api/v5/finance/staking-defi/eth/purchase-redeem-history", { params: { limit }, auth }),
|
|
21210
21214
|
getSolStakingBalance: (auth) => request("GET", "/api/v5/finance/staking-defi/sol/balance", { auth }),
|
|
21215
|
+
// ── 跟单(私有) ─────────────────────────────────────────────────────────────
|
|
21216
|
+
getMyLeadPositions: (auth, instType) => request("GET", "/api/v5/copytrading/current-subpositions", { params: { instType }, auth }),
|
|
21217
|
+
getMyLeadHistory: (auth, instType, limit) => request("GET", "/api/v5/copytrading/subpositions-history", { params: { instType, limit }, auth }),
|
|
21218
|
+
getCopyInstruments: (auth, instType) => request("GET", "/api/v5/copytrading/instruments", { params: { instType }, auth }),
|
|
21219
|
+
getProfitSharingTotal: (auth, instType) => request("GET", "/api/v5/copytrading/total-profit-sharing", { params: { instType }, auth }),
|
|
21220
|
+
getProfitSharingDetails: (auth, instType, limit) => request("GET", "/api/v5/copytrading/profit-sharing-details", { params: { instType, limit }, auth }),
|
|
21211
21221
|
// ── 网格交易机器人(私有) ────────────────────────────────────────────────────
|
|
21212
21222
|
getGridOrdersPending: (auth, algoOrdType, instId, instType) => request("GET", "/api/v5/tradingBot/grid/orders-algo-pending", { params: { algoOrdType, instId, instType }, auth }),
|
|
21213
21223
|
getGridOrdersHistory: (auth, algoOrdType, instId, instType) => request("GET", "/api/v5/tradingBot/grid/orders-algo-history", { params: { algoOrdType, instId, instType }, auth }),
|
|
@@ -21227,7 +21237,14 @@ var privateApi = {
|
|
|
21227
21237
|
getSavingsBalance: (auth, ccy) => request("GET", "/api/v5/finance/savings/balance", { params: { ccy }, auth }),
|
|
21228
21238
|
getSavingsLendingHistory: (auth, ccy) => request("GET", "/api/v5/finance/savings/lending-history", { params: { ccy }, auth }),
|
|
21229
21239
|
getStakingOffers: (auth, productId) => request("GET", "/api/v5/finance/staking-defi/offers", { params: { productId }, auth }),
|
|
21230
|
-
getEarnOffers: (ccy, productId) => request("GET", "/api/v5/finance/staking-defi/eth/balance", { params: { ccy, productId } })
|
|
21240
|
+
getEarnOffers: (ccy, productId) => request("GET", "/api/v5/finance/staking-defi/eth/balance", { params: { ccy, productId } }),
|
|
21241
|
+
// ── 信号交易(私有) ──────────────────────────────────────────────────────────
|
|
21242
|
+
getSignalBotsPending: (auth, algoId, instType) => request("GET", "/api/v5/tradingBot/signal/orders-algo-pending", { params: { algoOrdType: "contract", algoId, instType }, auth }),
|
|
21243
|
+
getSignalBotsHistory: (auth, algoId, instType, limit) => request("GET", "/api/v5/tradingBot/signal/orders-algo-history", { params: { algoOrdType: "contract", algoId, instType, limit }, auth }),
|
|
21244
|
+
getSignalPositions: (auth, algoId) => request("GET", "/api/v5/tradingBot/signal/positions", { params: { algoId }, auth }),
|
|
21245
|
+
getSignalPositionsHistory: (auth, algoId, limit) => request("GET", "/api/v5/tradingBot/signal/positions-history", { params: { algoOrdType: "contract", algoId, limit }, auth }),
|
|
21246
|
+
getSignalSubOrders: (auth, algoId, limit) => request("GET", "/api/v5/tradingBot/signal/sub-orders", { params: { algoOrdType: "contract", algoId, limit }, auth }),
|
|
21247
|
+
getSignalEventHistory: (auth, algoId, limit) => request("GET", "/api/v5/tradingBot/signal/event-histories", { params: { algoId, limit }, auth })
|
|
21231
21248
|
};
|
|
21232
21249
|
|
|
21233
21250
|
// src/adapters/hrails.ts
|
|
@@ -22618,9 +22635,251 @@ function registerSpreadTools(server) {
|
|
|
22618
22635
|
);
|
|
22619
22636
|
}
|
|
22620
22637
|
|
|
22638
|
+
// src/tools/copy.ts
|
|
22639
|
+
function registerCopyTools(server, auth) {
|
|
22640
|
+
server.tool(
|
|
22641
|
+
"okx_get_lead_trader_positions",
|
|
22642
|
+
"\u67E5\u8BE2\u6307\u5B9A\u5E26\u5355\u5458\u5F53\u524D\u6301\u4ED3\u5217\u8868\uFF0C\u542B\u54C1\u79CD\u3001\u65B9\u5411\u3001\u6301\u4ED3\u91CF\u548C\u5F00\u4ED3\u5747\u4EF7\u3002\u65E0\u9700API Key\u3002uniqueCode \u53EF\u4ECEOKX\u8DDF\u5355\u5E7F\u573A\u83B7\u53D6\u3002",
|
|
22643
|
+
{
|
|
22644
|
+
uniqueCode: external_exports.string().describe("\u5E26\u5355\u5458\u552F\u4E00\u6807\u8BC6\u7801\uFF0C\u4ECEOKX App\u300C\u8DDF\u5355\u300D\u9875\u9762\u83B7\u53D6"),
|
|
22645
|
+
instType: external_exports.enum(["SWAP", "FUTURES"]).optional().describe("\u4EA7\u54C1\u7C7B\u578B\uFF0C\u4E0D\u586B\u8FD4\u56DE\u5168\u90E8")
|
|
22646
|
+
},
|
|
22647
|
+
async ({ uniqueCode, instType }) => {
|
|
22648
|
+
try {
|
|
22649
|
+
const data = await publicApi.getLeadTraderPositions(uniqueCode, instType);
|
|
22650
|
+
return toResult(data);
|
|
22651
|
+
} catch (e) {
|
|
22652
|
+
return toError(e);
|
|
22653
|
+
}
|
|
22654
|
+
}
|
|
22655
|
+
);
|
|
22656
|
+
server.tool(
|
|
22657
|
+
"okx_get_lead_trader_history",
|
|
22658
|
+
"\u67E5\u8BE2\u6307\u5B9A\u5E26\u5355\u5458\u5386\u53F2\u6301\u4ED3\u8BB0\u5F55\uFF0C\u542B\u6BCF\u7B14\u4EA4\u6613\u7684\u76C8\u4E8F\u548C\u6301\u4ED3\u65F6\u957F\u3002\u65E0\u9700API Key\u3002\u9002\u5408\u8BC4\u4F30\u5E26\u5355\u5458\u5386\u53F2\u8868\u73B0\u540E\u518D\u51B3\u5B9A\u662F\u5426\u8DDF\u5355\u3002",
|
|
22659
|
+
{
|
|
22660
|
+
uniqueCode: external_exports.string().describe("\u5E26\u5355\u5458\u552F\u4E00\u6807\u8BC6\u7801"),
|
|
22661
|
+
instType: external_exports.enum(["SWAP", "FUTURES"]).optional().describe("\u4EA7\u54C1\u7C7B\u578B\uFF0C\u4E0D\u586B\u8FD4\u56DE\u5168\u90E8"),
|
|
22662
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA420")
|
|
22663
|
+
},
|
|
22664
|
+
async ({ uniqueCode, instType, limit }) => {
|
|
22665
|
+
try {
|
|
22666
|
+
const data = await publicApi.getLeadTraderHistory(uniqueCode, instType, limit);
|
|
22667
|
+
return toResult(data);
|
|
22668
|
+
} catch (e) {
|
|
22669
|
+
return toError(e);
|
|
22670
|
+
}
|
|
22671
|
+
}
|
|
22672
|
+
);
|
|
22673
|
+
server.tool(
|
|
22674
|
+
"okx_get_lead_trader_stats",
|
|
22675
|
+
"\u67E5\u8BE2\u6307\u5B9A\u5E26\u5355\u5458\u7684\u7EE9\u6548\u7EDF\u8BA1\uFF0C\u542B\u603B\u6536\u76CA\u7387\u3001\u6700\u5927\u56DE\u64A4\u3001\u8DDF\u5355\u4EBA\u6570\u548C\u80DC\u7387\u3002\u65E0\u9700API Key\u3002\u662F\u8BC4\u4F30\u5E26\u5355\u5458\u6700\u6838\u5FC3\u7684\u6307\u6807\u3002",
|
|
22676
|
+
{
|
|
22677
|
+
uniqueCode: external_exports.string().describe("\u5E26\u5355\u5458\u552F\u4E00\u6807\u8BC6\u7801"),
|
|
22678
|
+
instType: external_exports.enum(["SWAP", "FUTURES"]).describe("\u4EA7\u54C1\u7C7B\u578B"),
|
|
22679
|
+
lastDays: external_exports.enum(["7", "30", "90", "180"]).describe("\u7EDF\u8BA1\u5468\u671F\uFF08\u5929\uFF09\uFF1A7/30/90/180")
|
|
22680
|
+
},
|
|
22681
|
+
async ({ uniqueCode, instType, lastDays }) => {
|
|
22682
|
+
try {
|
|
22683
|
+
const data = await publicApi.getLeadTraderStats(uniqueCode, instType, lastDays);
|
|
22684
|
+
return toResult(data);
|
|
22685
|
+
} catch (e) {
|
|
22686
|
+
return toError(e);
|
|
22687
|
+
}
|
|
22688
|
+
}
|
|
22689
|
+
);
|
|
22690
|
+
server.tool(
|
|
22691
|
+
"okx_get_my_lead_positions",
|
|
22692
|
+
"\u67E5\u8BE2\u6211\u5F53\u524D\u4F5C\u4E3A\u5E26\u5355\u5458\u7684\u6301\u4ED3\u5217\u8868\uFF08\u4EC5\u5E26\u5355\u5458\u8D26\u6237\u6709\u6570\u636E\uFF09\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
22693
|
+
{
|
|
22694
|
+
instType: external_exports.enum(["SWAP", "FUTURES"]).optional().describe("\u4EA7\u54C1\u7C7B\u578B\uFF0C\u4E0D\u586B\u8FD4\u56DE\u5168\u90E8")
|
|
22695
|
+
},
|
|
22696
|
+
async ({ instType }) => {
|
|
22697
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
22698
|
+
try {
|
|
22699
|
+
const data = await privateApi.getMyLeadPositions(auth, instType);
|
|
22700
|
+
return toResult(data);
|
|
22701
|
+
} catch (e) {
|
|
22702
|
+
return toError(e);
|
|
22703
|
+
}
|
|
22704
|
+
}
|
|
22705
|
+
);
|
|
22706
|
+
server.tool(
|
|
22707
|
+
"okx_get_my_lead_history",
|
|
22708
|
+
"\u67E5\u8BE2\u6211\u7684\u5386\u53F2\u5E26\u5355\u8BB0\u5F55\uFF0C\u542B\u6BCF\u7B14\u7684\u76C8\u4E8F\u548C\u8DDF\u5355\u91CF\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
22709
|
+
{
|
|
22710
|
+
instType: external_exports.enum(["SWAP", "FUTURES"]).optional().describe("\u4EA7\u54C1\u7C7B\u578B"),
|
|
22711
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA420")
|
|
22712
|
+
},
|
|
22713
|
+
async ({ instType, limit }) => {
|
|
22714
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
22715
|
+
try {
|
|
22716
|
+
const data = await privateApi.getMyLeadHistory(auth, instType, limit);
|
|
22717
|
+
return toResult(data);
|
|
22718
|
+
} catch (e) {
|
|
22719
|
+
return toError(e);
|
|
22720
|
+
}
|
|
22721
|
+
}
|
|
22722
|
+
);
|
|
22723
|
+
server.tool(
|
|
22724
|
+
"okx_get_copy_instruments",
|
|
22725
|
+
"\u67E5\u8BE2\u6211\u5F53\u524D\u4F5C\u4E3A\u5E26\u5355\u5458\u5141\u8BB8\u8DDF\u5355\u7684\u54C1\u79CD\u5217\u8868\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
22726
|
+
{
|
|
22727
|
+
instType: external_exports.enum(["SWAP", "FUTURES"]).optional().describe("\u4EA7\u54C1\u7C7B\u578B")
|
|
22728
|
+
},
|
|
22729
|
+
async ({ instType }) => {
|
|
22730
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
22731
|
+
try {
|
|
22732
|
+
const data = await privateApi.getCopyInstruments(auth, instType);
|
|
22733
|
+
return toResult(data);
|
|
22734
|
+
} catch (e) {
|
|
22735
|
+
return toError(e);
|
|
22736
|
+
}
|
|
22737
|
+
}
|
|
22738
|
+
);
|
|
22739
|
+
server.tool(
|
|
22740
|
+
"okx_get_profit_sharing_total",
|
|
22741
|
+
"\u67E5\u8BE2\u6211\u7684\u5E26\u5355\u7D2F\u8BA1\u6536\u53D6\u7684\u5206\u6210\u91D1\u989D\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
22742
|
+
{
|
|
22743
|
+
instType: external_exports.enum(["SWAP", "FUTURES"]).optional().describe("\u4EA7\u54C1\u7C7B\u578B")
|
|
22744
|
+
},
|
|
22745
|
+
async ({ instType }) => {
|
|
22746
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
22747
|
+
try {
|
|
22748
|
+
const data = await privateApi.getProfitSharingTotal(auth, instType);
|
|
22749
|
+
return toResult(data);
|
|
22750
|
+
} catch (e) {
|
|
22751
|
+
return toError(e);
|
|
22752
|
+
}
|
|
22753
|
+
}
|
|
22754
|
+
);
|
|
22755
|
+
server.tool(
|
|
22756
|
+
"okx_get_profit_sharing_details",
|
|
22757
|
+
"\u67E5\u8BE2\u5E26\u5355\u76C8\u5229\u5206\u6210\u7684\u9010\u7B14\u660E\u7EC6\uFF0C\u542B\u6BCF\u6B21\u5206\u6210\u7684\u91D1\u989D\u3001\u6765\u6E90\u8DDF\u5355\u8005\u548C\u65F6\u95F4\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
22758
|
+
{
|
|
22759
|
+
instType: external_exports.enum(["SWAP", "FUTURES"]).optional().describe("\u4EA7\u54C1\u7C7B\u578B"),
|
|
22760
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA420")
|
|
22761
|
+
},
|
|
22762
|
+
async ({ instType, limit }) => {
|
|
22763
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
22764
|
+
try {
|
|
22765
|
+
const data = await privateApi.getProfitSharingDetails(auth, instType, limit);
|
|
22766
|
+
return toResult(data);
|
|
22767
|
+
} catch (e) {
|
|
22768
|
+
return toError(e);
|
|
22769
|
+
}
|
|
22770
|
+
}
|
|
22771
|
+
);
|
|
22772
|
+
}
|
|
22773
|
+
|
|
22774
|
+
// src/tools/signal.ts
|
|
22775
|
+
function registerSignalTools(server, auth) {
|
|
22776
|
+
server.tool(
|
|
22777
|
+
"okx_get_signal_bots_pending",
|
|
22778
|
+
"\u67E5\u8BE2\u5F53\u524D\u8FD0\u884C\u4E2D\u7684\u4FE1\u53F7\u4EA4\u6613\u673A\u5668\u4EBA\u5217\u8868\uFF0C\u542B\u54C1\u79CD\u3001\u65B9\u5411\u3001\u4ED3\u4F4D\u548C\u4FE1\u53F7\u6765\u6E90\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
22779
|
+
{
|
|
22780
|
+
algoId: external_exports.string().optional().describe("\u6307\u5B9A\u673A\u5668\u4EBAID\uFF0C\u4E0D\u586B\u8FD4\u56DE\u5168\u90E8"),
|
|
22781
|
+
instType: external_exports.enum(["SPOT", "SWAP", "FUTURES", "MARGIN"]).optional().describe("\u4EA7\u54C1\u7C7B\u578B")
|
|
22782
|
+
},
|
|
22783
|
+
async ({ algoId, instType }) => {
|
|
22784
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
22785
|
+
try {
|
|
22786
|
+
const data = await privateApi.getSignalBotsPending(auth, algoId, instType);
|
|
22787
|
+
return toResult(data);
|
|
22788
|
+
} catch (e) {
|
|
22789
|
+
return toError(e);
|
|
22790
|
+
}
|
|
22791
|
+
}
|
|
22792
|
+
);
|
|
22793
|
+
server.tool(
|
|
22794
|
+
"okx_get_signal_bots_history",
|
|
22795
|
+
"\u67E5\u8BE2\u5DF2\u505C\u6B62\u7684\u4FE1\u53F7\u4EA4\u6613\u673A\u5668\u4EBA\u5386\u53F2\u8BB0\u5F55\uFF0C\u542B\u6BCF\u4E2A\u673A\u5668\u4EBA\u7684\u7D2F\u8BA1\u76C8\u4E8F\u548C\u8FD0\u884C\u65F6\u957F\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
22796
|
+
{
|
|
22797
|
+
algoId: external_exports.string().optional().describe("\u6307\u5B9A\u673A\u5668\u4EBAID"),
|
|
22798
|
+
instType: external_exports.enum(["SPOT", "SWAP", "FUTURES", "MARGIN"]).optional().describe("\u4EA7\u54C1\u7C7B\u578B"),
|
|
22799
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA420")
|
|
22800
|
+
},
|
|
22801
|
+
async ({ algoId, instType, limit }) => {
|
|
22802
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
22803
|
+
try {
|
|
22804
|
+
const data = await privateApi.getSignalBotsHistory(auth, algoId, instType, limit);
|
|
22805
|
+
return toResult(data);
|
|
22806
|
+
} catch (e) {
|
|
22807
|
+
return toError(e);
|
|
22808
|
+
}
|
|
22809
|
+
}
|
|
22810
|
+
);
|
|
22811
|
+
server.tool(
|
|
22812
|
+
"okx_get_signal_positions",
|
|
22813
|
+
"\u67E5\u8BE2\u6307\u5B9A\u4FE1\u53F7\u673A\u5668\u4EBA\u7684\u5F53\u524D\u6301\u4ED3\uFF0C\u542B\u672A\u5B9E\u73B0\u76C8\u4E8F\u548C\u5F00\u4ED3\u5747\u4EF7\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
22814
|
+
{
|
|
22815
|
+
algoId: external_exports.string().describe("\u4FE1\u53F7\u673A\u5668\u4EBAID\uFF08\u4ECE okx_get_signal_bots_pending \u83B7\u53D6\uFF09")
|
|
22816
|
+
},
|
|
22817
|
+
async ({ algoId }) => {
|
|
22818
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
22819
|
+
try {
|
|
22820
|
+
const data = await privateApi.getSignalPositions(auth, algoId);
|
|
22821
|
+
return toResult(data);
|
|
22822
|
+
} catch (e) {
|
|
22823
|
+
return toError(e);
|
|
22824
|
+
}
|
|
22825
|
+
}
|
|
22826
|
+
);
|
|
22827
|
+
server.tool(
|
|
22828
|
+
"okx_get_signal_positions_history",
|
|
22829
|
+
"\u67E5\u8BE2\u6307\u5B9A\u4FE1\u53F7\u673A\u5668\u4EBA\u7684\u5386\u53F2\u6301\u4ED3\u8BB0\u5F55\uFF0C\u542B\u6BCF\u7B14\u7684\u5B9E\u73B0\u76C8\u4E8F\u548C\u6301\u4ED3\u65F6\u957F\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
22830
|
+
{
|
|
22831
|
+
algoId: external_exports.string().describe("\u4FE1\u53F7\u673A\u5668\u4EBAID\uFF08\u4ECE okx_get_signal_bots_history \u83B7\u53D6\uFF09"),
|
|
22832
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA420")
|
|
22833
|
+
},
|
|
22834
|
+
async ({ algoId, limit }) => {
|
|
22835
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
22836
|
+
try {
|
|
22837
|
+
const data = await privateApi.getSignalPositionsHistory(auth, algoId, limit);
|
|
22838
|
+
return toResult(data);
|
|
22839
|
+
} catch (e) {
|
|
22840
|
+
return toError(e);
|
|
22841
|
+
}
|
|
22842
|
+
}
|
|
22843
|
+
);
|
|
22844
|
+
server.tool(
|
|
22845
|
+
"okx_get_signal_sub_orders",
|
|
22846
|
+
"\u67E5\u8BE2\u4FE1\u53F7\u673A\u5668\u4EBA\u89E6\u53D1\u7684\u5B50\u8BA2\u5355\u5217\u8868\uFF0C\u53EF\u8FFD\u8E2A\u6BCF\u4E2A\u4FE1\u53F7\u5BF9\u5E94\u7684\u5B9E\u9645\u4E0B\u5355\u60C5\u51B5\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
22847
|
+
{
|
|
22848
|
+
algoId: external_exports.string().describe("\u4FE1\u53F7\u673A\u5668\u4EBAID"),
|
|
22849
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA420")
|
|
22850
|
+
},
|
|
22851
|
+
async ({ algoId, limit }) => {
|
|
22852
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
22853
|
+
try {
|
|
22854
|
+
const data = await privateApi.getSignalSubOrders(auth, algoId, limit);
|
|
22855
|
+
return toResult(data);
|
|
22856
|
+
} catch (e) {
|
|
22857
|
+
return toError(e);
|
|
22858
|
+
}
|
|
22859
|
+
}
|
|
22860
|
+
);
|
|
22861
|
+
server.tool(
|
|
22862
|
+
"okx_get_signal_event_history",
|
|
22863
|
+
"\u67E5\u8BE2\u4FE1\u53F7\u673A\u5668\u4EBA\u6536\u5230\u7684\u4FE1\u53F7\u4E8B\u4EF6\u5386\u53F2\uFF0C\u542B\u6BCF\u6761\u4FE1\u53F7\u7684\u5185\u5BB9\u3001\u89E6\u53D1\u65F6\u95F4\u548C\u6267\u884C\u7ED3\u679C\u3002\u26A0\uFE0F \u9700\u8981API Key\u9274\u6743\u3002",
|
|
22864
|
+
{
|
|
22865
|
+
algoId: external_exports.string().describe("\u4FE1\u53F7\u673A\u5668\u4EBAID"),
|
|
22866
|
+
limit: external_exports.number().int().min(1).max(100).optional().describe("\u8FD4\u56DE\u6761\u6570\uFF0C\u9ED8\u8BA420")
|
|
22867
|
+
},
|
|
22868
|
+
async ({ algoId, limit }) => {
|
|
22869
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
22870
|
+
try {
|
|
22871
|
+
const data = await privateApi.getSignalEventHistory(auth, algoId, limit);
|
|
22872
|
+
return toResult(data);
|
|
22873
|
+
} catch (e) {
|
|
22874
|
+
return toError(e);
|
|
22875
|
+
}
|
|
22876
|
+
}
|
|
22877
|
+
);
|
|
22878
|
+
}
|
|
22879
|
+
|
|
22621
22880
|
// src/index.ts
|
|
22622
22881
|
async function main() {
|
|
22623
|
-
const server = new McpServer({ name: "hvip", version: "0.1.
|
|
22882
|
+
const server = new McpServer({ name: "hvip", version: "0.1.8" });
|
|
22624
22883
|
const auth = getAuth();
|
|
22625
22884
|
registerMarketTools(server);
|
|
22626
22885
|
registerPublicTools(server);
|
|
@@ -22631,6 +22890,8 @@ async function main() {
|
|
|
22631
22890
|
registerTradingTools(server, auth);
|
|
22632
22891
|
registerAlgoTools(server, auth);
|
|
22633
22892
|
registerBotTools(server, auth);
|
|
22893
|
+
registerCopyTools(server, auth);
|
|
22894
|
+
registerSignalTools(server, auth);
|
|
22634
22895
|
registerFundingTools(server, auth);
|
|
22635
22896
|
registerSubAccountTools(server, auth);
|
|
22636
22897
|
registerFinanceTools(server, auth);
|