hvip-mcp-server 0.2.27 → 0.2.29
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 +408 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -21402,7 +21402,33 @@ var privateApi = {
|
|
|
21402
21402
|
getFiatBuySellPair: (auth) => request("GET", "/api/v5/fiat/buy-sell/currency-pair", { auth }),
|
|
21403
21403
|
getFiatDeposit: (auth) => request("GET", "/api/v5/fiat/deposit", { auth }),
|
|
21404
21404
|
getFiatDepositOrderHistory: (auth) => request("GET", "/api/v5/fiat/deposit-order-history", { auth }),
|
|
21405
|
-
getFiatDepositPaymentMethods: (auth) => request("GET", "/api/v5/fiat/deposit-payment-methods", { auth })
|
|
21405
|
+
getFiatDepositPaymentMethods: (auth) => request("GET", "/api/v5/fiat/deposit-payment-methods", { auth }),
|
|
21406
|
+
// ── rubik 大数据(v0.2.26 第四批) ────────────────────────────────────
|
|
21407
|
+
getTakerVolumeContract: (ccy, instId) => request("GET", "/api/v5/rubik/stat/taker-volume-contract", { params: { ccy, instId } }),
|
|
21408
|
+
getOptionTakerBlockVolume: (ccy) => request("GET", "/api/v5/rubik/stat/option/taker-block-volume", { params: { ccy } }),
|
|
21409
|
+
getTopTraderPositionRatio: (instId) => request("GET", "/api/v5/rubik/stat/contracts/long-short-position-ratio-contract-top-trader", { params: { instId } }),
|
|
21410
|
+
applyMonthlyStatement: (auth) => request("POST", "/api/v5/asset/monthly-statement", { auth }),
|
|
21411
|
+
// ── RFQ 收尾(第八批新增) ────────────────────────────────────────────
|
|
21412
|
+
getRfqCounterparties: (auth) => request("GET", "/api/v5/rfq/counterparties", { auth }),
|
|
21413
|
+
cancelRfq: (auth, body) => request("POST", "/api/v5/rfq/cancel-rfq", { body, auth }),
|
|
21414
|
+
cancelBatchRfqs: (auth, body) => request("POST", "/api/v5/rfq/cancel-batch-rfqs", { body, auth }),
|
|
21415
|
+
cancelAllRfqs: (auth) => request("POST", "/api/v5/rfq/cancel-all-rfqs", { auth }),
|
|
21416
|
+
createRfqQuote: (auth, body) => request("POST", "/api/v5/rfq/create-quote", { body, auth }),
|
|
21417
|
+
cancelRfqQuote: (auth, body) => request("POST", "/api/v5/rfq/cancel-quote", { body, auth }),
|
|
21418
|
+
cancelBatchQuotes: (auth, body) => request("POST", "/api/v5/rfq/cancel-batch-quotes", { body, auth }),
|
|
21419
|
+
cancelAllQuotes: (auth) => request("POST", "/api/v5/rfq/cancel-all-quotes", { auth }),
|
|
21420
|
+
getRfqTrades: (auth) => request("GET", "/api/v5/rfq/trades", { auth }),
|
|
21421
|
+
// ── Copytrading 收尾(第九批新增) ────────────────────────────────────
|
|
21422
|
+
getPublicLeadTraders: () => request("GET", "/api/v5/copytrading/public-lead-traders"),
|
|
21423
|
+
getPublicCopyConfig: () => request("GET", "/api/v5/copytrading/public-config"),
|
|
21424
|
+
getPublicLeadTraderPnl: (uniqueCode, lastDays) => request("GET", "/api/v5/copytrading/public-pnl", { params: { uniqueCode, lastDays } }),
|
|
21425
|
+
getPublicLeadTraderStats: (uniqueCode, instType, lastDays) => request("GET", "/api/v5/copytrading/public-stats", { params: { uniqueCode, instType, lastDays } }),
|
|
21426
|
+
getCopyTraders: (auth) => request("GET", "/api/v5/copytrading/copy-traders", { auth }),
|
|
21427
|
+
firstCopySettings: (auth, body) => request("POST", "/api/v5/copytrading/first-copy-settings", { body, auth }),
|
|
21428
|
+
getUnrealizedProfitSharing: (auth) => request("GET", "/api/v5/copytrading/unrealized-profit-sharing-details", { auth }),
|
|
21429
|
+
getTotalUnrealizedProfitSharing: (auth) => request("GET", "/api/v5/copytrading/total-unrealized-profit-sharing", { auth }),
|
|
21430
|
+
amendProfitSharingRatio: (auth, body) => request("POST", "/api/v5/copytrading/amend-profit-sharing-ratio", { body, auth }),
|
|
21431
|
+
amendCopySettings: (auth, body) => request("POST", "/api/v5/copytrading/amend-copy-settings", { body, auth })
|
|
21406
21432
|
};
|
|
21407
21433
|
|
|
21408
21434
|
// src/adapters/hrails.ts
|
|
@@ -23856,6 +23882,20 @@ function registerFundingTools(server, auth) {
|
|
|
23856
23882
|
}
|
|
23857
23883
|
}
|
|
23858
23884
|
);
|
|
23885
|
+
server.tool(
|
|
23886
|
+
"okx_get_monthly_statement",
|
|
23887
|
+
"## \u529F\u80FD\uFF1A\u83B7\u53D6\u8D26\u6237\u6708\u5EA6\u8D26\u5355\n## \u573A\u666F\uFF1A\u7528\u4E8E\u67E5\u770B\u6708\u5EA6\u4EA4\u6613\u6C47\u603B\u3001\u6536\u5165\u652F\u51FA\u660E\u7EC6\n## \u5173\u952E\u8BCD\uFF1A\u6708\u5EA6\u8D26\u5355, monthly statement, \u6708\u7ED3, \u6708\u5EA6\u62A5\u544A\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 ~10KB\n## \u5173\u8054\uFF1A\u672C\u5DE5\u5177\u770B\u6708\u5EA6\u6C47\u603B \u2192 \u8BC4\u4F30\u6708\u5EA6\u76C8\u4E8F \u2192 \u8C03\u6574\u7B56\u7565",
|
|
23888
|
+
{},
|
|
23889
|
+
async () => {
|
|
23890
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
23891
|
+
try {
|
|
23892
|
+
const data = await privateApi.applyMonthlyStatement(auth);
|
|
23893
|
+
return toResult(data);
|
|
23894
|
+
} catch (e) {
|
|
23895
|
+
return toError(e);
|
|
23896
|
+
}
|
|
23897
|
+
}
|
|
23898
|
+
);
|
|
23859
23899
|
}
|
|
23860
23900
|
|
|
23861
23901
|
// src/tools/stats.ts
|
|
@@ -24229,6 +24269,121 @@ function registerStatsTools(server) {
|
|
|
24229
24269
|
}
|
|
24230
24270
|
}
|
|
24231
24271
|
);
|
|
24272
|
+
server.tool(
|
|
24273
|
+
"okx_get_long_short_account_ratio",
|
|
24274
|
+
"## \u529F\u80FD\uFF1A\u83B7\u53D6\u5408\u7EA6\u591A\u7A7A\u8D26\u6237\u6BD4\u4F8B\n## \u573A\u666F\uFF1A\u7528\u4E8E\u5224\u65AD\u5E02\u573A\u60C5\u7EEA\uFF0C\u6BD4\u503C>1\u8868\u793A\u591A\u5934\u5360\u591A\u6570\n## \u5173\u952E\u8BCD\uFF1A\u591A\u7A7A\u8D26\u6237\u6BD4, long short account, \u5E02\u573A\u60C5\u7EEA\n## \u53C2\u6570\uFF1A\n## - ccy: \u5E01\u79CD\uFF0C\u5982 BTC\u3001ETH\n## - begin: \u5F00\u59CB\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09\n## - end: \u7ED3\u675F\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09\n## \u9274\u6743\uFF1APUBLIC \u2014 \u516C\u5F00\u63A5\u53E3\uFF0C\u4E0D\u9700\u8981 API Key\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\u770B\u8D26\u6237\u591A\u7A7A\u6BD4 \u2192 okx_get_contract_trader_ls_ratio \u770B\u5927\u6237 \u2192 \u5BF9\u6BD4",
|
|
24275
|
+
{
|
|
24276
|
+
ccy: external_exports.string().describe("\u5E01\u79CD\uFF0C\u5982 BTC\u3001ETH"),
|
|
24277
|
+
begin: external_exports.string().optional().describe("\u5F00\u59CB\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09"),
|
|
24278
|
+
end: external_exports.string().optional().describe("\u7ED3\u675F\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09")
|
|
24279
|
+
},
|
|
24280
|
+
async ({ ccy, begin, end }) => {
|
|
24281
|
+
try {
|
|
24282
|
+
const data = await publicApi.getLongShortRatio(ccy, begin, end);
|
|
24283
|
+
const enriched = data.map((item) => ({
|
|
24284
|
+
...item,
|
|
24285
|
+
tsIso: item.ts ? new Date(parseInt(item.ts)).toISOString() : void 0
|
|
24286
|
+
}));
|
|
24287
|
+
return toResult(enriched);
|
|
24288
|
+
} catch (e) {
|
|
24289
|
+
return toError(e);
|
|
24290
|
+
}
|
|
24291
|
+
}
|
|
24292
|
+
);
|
|
24293
|
+
server.tool(
|
|
24294
|
+
"okx_get_contract_trader_ls_ratio",
|
|
24295
|
+
"## \u529F\u80FD\uFF1A\u83B7\u53D6\u7CBE\u82F1\u4EA4\u6613\u5458\u5408\u7EA6\u591A\u7A7A\u6BD4\n## \u573A\u666F\uFF1A\u7528\u4E8E\u5224\u65AD\u5927\u6237\u5BF9\u5408\u7EA6\u5E02\u573A\u7684\u770B\u6CD5\n## \u5173\u952E\u8BCD\uFF1A\u7CBE\u82F1\u591A\u7A7A\u6BD4, top trader ls, \u5927\u6237\u5408\u7EA6\n## \u53C2\u6570\uFF1A\n## - instId: \u5408\u7EA6\u4EA7\u54C1ID\uFF0C\u5982 BTC-USDT-SWAP\n## - begin: \u5F00\u59CB\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09\n## - end: \u7ED3\u675F\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09\n## \u9274\u6743\uFF1APUBLIC \u2014 \u516C\u5F00\u63A5\u53E3\uFF0C\u4E0D\u9700\u8981 API Key\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\u770B\u5927\u6237\u591A\u7A7A \u2192 okx_get_long_short_account_ratio \u770B\u6563\u6237 \u2192 \u5BF9\u6BD4",
|
|
24296
|
+
{
|
|
24297
|
+
instId: external_exports.string().describe("\u5408\u7EA6\u4EA7\u54C1ID\uFF0C\u5982 BTC-USDT-SWAP"),
|
|
24298
|
+
begin: external_exports.string().optional().describe("\u5F00\u59CB\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09"),
|
|
24299
|
+
end: external_exports.string().optional().describe("\u7ED3\u675F\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09")
|
|
24300
|
+
},
|
|
24301
|
+
async ({ instId, begin, end }) => {
|
|
24302
|
+
try {
|
|
24303
|
+
const data = await publicApi.getTopTraderLongShortRatio(instId, begin, end);
|
|
24304
|
+
const enriched = data.map((item) => ({
|
|
24305
|
+
...item,
|
|
24306
|
+
tsIso: item.ts ? new Date(parseInt(item.ts)).toISOString() : void 0
|
|
24307
|
+
}));
|
|
24308
|
+
return toResult(enriched);
|
|
24309
|
+
} catch (e) {
|
|
24310
|
+
return toError(e);
|
|
24311
|
+
}
|
|
24312
|
+
}
|
|
24313
|
+
);
|
|
24314
|
+
server.tool(
|
|
24315
|
+
"okx_get_contract_position_trader_ratio",
|
|
24316
|
+
"## \u529F\u80FD\uFF1A\u83B7\u53D6\u7CBE\u82F1\u4EA4\u6613\u5458\u6301\u4ED3\u591A\u7A7A\u6BD4\u4F8B\uFF08\u6309\u4ED3\u4F4D\uFF09\n## \u573A\u666F\uFF1A\u7528\u4E8E\u5206\u6790\u5927\u6237\u5B9E\u9645\u6301\u4ED3\u65B9\u5411\u3001\u6BD4\u8D26\u6237\u6BD4\u4F8B\u66F4\u7CBE\u786E\n## \u5173\u952E\u8BCD\uFF1A\u7CBE\u82F1\u6301\u4ED3\u6BD4, top trader position, \u5927\u6237\u4ED3\u4F4D\n## \u53C2\u6570\uFF1A\n## - instId: \u5408\u7EA6\u4EA7\u54C1ID\uFF0C\u5982 BTC-USDT-SWAP\u3002\u5FC5\u586B\n## \u9274\u6743\uFF1APUBLIC \u2014 \u516C\u5F00\u63A5\u53E3\uFF0C\u4E0D\u9700\u8981 API Key\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\u770B\u5927\u6237\u4ED3\u4F4D\u591A\u7A7A \u2192 \u7ED3\u5408\u4EF7\u683C\u5224\u65AD\u8D8B\u52BF",
|
|
24317
|
+
{
|
|
24318
|
+
instId: external_exports.string().describe("\u5408\u7EA6\u4EA7\u54C1ID\uFF0C\u5982 BTC-USDT-SWAP\u3002\u5FC5\u586B")
|
|
24319
|
+
},
|
|
24320
|
+
async ({ instId }) => {
|
|
24321
|
+
try {
|
|
24322
|
+
const data = await publicApi.getTopTraderPositionRatio(instId);
|
|
24323
|
+
const enriched = data.map((item) => ({
|
|
24324
|
+
...item,
|
|
24325
|
+
tsIso: item.ts ? new Date(parseInt(item.ts)).toISOString() : void 0
|
|
24326
|
+
}));
|
|
24327
|
+
return toResult(enriched);
|
|
24328
|
+
} catch (e) {
|
|
24329
|
+
return toError(e);
|
|
24330
|
+
}
|
|
24331
|
+
}
|
|
24332
|
+
);
|
|
24333
|
+
server.tool(
|
|
24334
|
+
"okx_get_option_oi_ratio",
|
|
24335
|
+
"## \u529F\u80FD\uFF1A\u83B7\u53D6\u671F\u6743\u672A\u5E73\u4ED3\u91CFCall/Put\u6BD4\u548C\u6210\u4EA4\u91CF\u6BD4\n## \u573A\u666F\uFF1A\u7528\u4E8E\u8861\u91CF\u671F\u6743\u5E02\u573A\u6574\u4F53\u60C5\u7EEA\n## \u5173\u952E\u8BCD\uFF1A\u671F\u6743\u6301\u4ED3\u6BD4, option oi ratio, PCR, \u671F\u6743\u60C5\u7EEA\n## \u53C2\u6570\uFF1A\n## - ccy: \u5E01\u79CD\uFF0C\u5982 BTC\u3001ETH\n## - begin: \u5F00\u59CB\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09\n## - end: \u7ED3\u675F\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09\n## \u9274\u6743\uFF1APUBLIC \u2014 \u516C\u5F00\u63A5\u53E3\uFF0C\u4E0D\u9700\u8981 API Key\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\u770B\u671F\u6743\u6BD4 \u2192 okx_get_option_open_interest \u770B\u6301\u4ED3\u603B\u91CF",
|
|
24336
|
+
{
|
|
24337
|
+
ccy: external_exports.string().describe("\u5E01\u79CD\uFF0C\u5982 BTC\u3001ETH"),
|
|
24338
|
+
begin: external_exports.string().optional().describe("\u5F00\u59CB\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09"),
|
|
24339
|
+
end: external_exports.string().optional().describe("\u7ED3\u675F\u65F6\u95F4\u6233\uFF08\u6BEB\u79D2\uFF09")
|
|
24340
|
+
},
|
|
24341
|
+
async ({ ccy, begin, end }) => {
|
|
24342
|
+
try {
|
|
24343
|
+
const data = await publicApi.getOptionPutCallRatio(ccy, begin, end);
|
|
24344
|
+
const enriched = data.map((item) => ({
|
|
24345
|
+
...item,
|
|
24346
|
+
tsIso: item.ts ? new Date(parseInt(item.ts)).toISOString() : void 0
|
|
24347
|
+
}));
|
|
24348
|
+
return toResult(enriched);
|
|
24349
|
+
} catch (e) {
|
|
24350
|
+
return toError(e);
|
|
24351
|
+
}
|
|
24352
|
+
}
|
|
24353
|
+
);
|
|
24354
|
+
server.tool(
|
|
24355
|
+
"okx_get_option_taker_block_volume",
|
|
24356
|
+
"## \u529F\u80FD\uFF1A\u83B7\u53D6\u671F\u6743\u4E3B\u52A8\u6210\u4EA4\u548C\u533A\u5757\u6210\u4EA4\u7684\u7EDF\u8BA1\n## \u573A\u666F\uFF1A\u7528\u4E8E\u5206\u6790\u671F\u6743\u5E02\u573A\u7684Taker\u6210\u4EA4\u91CF\u548C\u533A\u5757\u6210\u4EA4\u91CF\n## \u5173\u952E\u8BCD\uFF1A\u671F\u6743\u6210\u4EA4\u91CF, option taker block, \u671F\u6743\u4E3B\u52A8\u4E70\u5356, \u671F\u6743\u5927\u5355\n## \u53C2\u6570\uFF1A\n## - ccy: \u5E01\u79CD\uFF0C\u5982 BTC\u3001ETH\u3002\u5FC5\u586B\n## \u9274\u6743\uFF1APUBLIC \u2014 \u516C\u5F00\u63A5\u53E3\uFF0C\u4E0D\u9700\u8981 API Key\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\u770B\u671F\u6743\u6210\u4EA4\u91CF \u2192 okx_get_option_open_interest \u770B\u6301\u4ED3 \u2192 \u5206\u6790\u6D3B\u8DC3\u5EA6",
|
|
24357
|
+
{ ccy: external_exports.string().describe("\u5E01\u79CD\uFF0C\u5982 BTC\u3001ETH\u3002\u5FC5\u586B") },
|
|
24358
|
+
async ({ ccy }) => {
|
|
24359
|
+
try {
|
|
24360
|
+
const data = await publicApi.getOptionTakerBlockVolume(ccy);
|
|
24361
|
+
return toResult(data);
|
|
24362
|
+
} catch (e) {
|
|
24363
|
+
return toError(e);
|
|
24364
|
+
}
|
|
24365
|
+
}
|
|
24366
|
+
);
|
|
24367
|
+
server.tool(
|
|
24368
|
+
"okx_get_taker_volume_contract",
|
|
24369
|
+
"## \u529F\u80FD\uFF1A\u83B7\u53D6\u5408\u7EA6\u4E3B\u52A8\u4E70\u5356\u91CF\u7EDF\u8BA1\uFF08\u6309\u5408\u7EA6\uFF09\n## \u573A\u666F\uFF1A\u7528\u4E8E\u67E5\u770B\u5177\u4F53\u5408\u7EA6\u7684\u4E3B\u52A8\u4E70\u5356\u529B\u91CF\n## \u5173\u952E\u8BCD\uFF1A\u5408\u7EA6\u4E70\u5356\u91CF, taker volume contract, \u4E3B\u52A8\u6210\u4EA4\n## \u53C2\u6570\uFF1A\n## - ccy: \u5E01\u79CD\uFF0C\u5982 BTC\u3002\u5FC5\u586B\n## - instId: \u5408\u7EA6\u4EA7\u54C1ID\uFF0C\u5982 BTC-USDT-SWAP\u3002\u5FC5\u586B\n## \u9274\u6743\uFF1APUBLIC \u2014 \u516C\u5F00\u63A5\u53E3\uFF0C\u4E0D\u9700\u8981 API Key\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\u5355\u5408\u7EA6\u4E70\u5356\u91CF \u2192 okx_get_contracts_taker_volume \u67E5\u6C47\u603B",
|
|
24370
|
+
{
|
|
24371
|
+
ccy: external_exports.string().describe("\u5E01\u79CD\uFF0C\u5982 BTC\u3002\u5FC5\u586B"),
|
|
24372
|
+
instId: external_exports.string().describe("\u5408\u7EA6\u4EA7\u54C1ID\uFF0C\u5982 BTC-USDT-SWAP\u3002\u5FC5\u586B")
|
|
24373
|
+
},
|
|
24374
|
+
async ({ ccy, instId }) => {
|
|
24375
|
+
try {
|
|
24376
|
+
const data = await publicApi.getTakerVolumeContract(ccy, instId);
|
|
24377
|
+
const enriched = data.map((item) => ({
|
|
24378
|
+
...item,
|
|
24379
|
+
tsIso: item.ts ? new Date(parseInt(item.ts)).toISOString() : void 0
|
|
24380
|
+
}));
|
|
24381
|
+
return toResult(enriched);
|
|
24382
|
+
} catch (e) {
|
|
24383
|
+
return toError(e);
|
|
24384
|
+
}
|
|
24385
|
+
}
|
|
24386
|
+
);
|
|
24232
24387
|
}
|
|
24233
24388
|
|
|
24234
24389
|
// src/tools/subaccount.ts
|
|
@@ -25587,6 +25742,148 @@ function registerCopyTools(server, auth) {
|
|
|
25587
25742
|
}
|
|
25588
25743
|
}
|
|
25589
25744
|
);
|
|
25745
|
+
server.tool(
|
|
25746
|
+
"okx_get_public_lead_traders",
|
|
25747
|
+
"## \u529F\u80FD\uFF1A\u516C\u5F00\u67E5\u8BE2\u5E26\u5355\u5458\u6392\u884C\u699C\n## \u573A\u666F\uFF1A\u7528\u4E8E\u53D1\u73B0\u4F18\u79C0\u5E26\u5355\u5458\u3001\u8BC4\u4F30\u5E26\u5355\u5458\u7EFC\u5408\u8868\u73B0\n## \u5173\u952E\u8BCD\uFF1A\u5E26\u5355\u5458\u6392\u884C, public lead traders, \u5E26\u5355\u6392\u884C\u699C, \u8DDF\u5355\u63A8\u8350\n## \u53C2\u6570\uFF1A\u65E0\n## \u9274\u6743\uFF1APUBLIC \u2014 \u516C\u5F00\u63A5\u53E3\uFF0C\u4E0D\u9700\u8981 API Key\n## \u98CE\u9669\uFF1AREAD \u2014 \u53EA\u8BFB\u67E5\u8BE2\uFF0CAgent \u53EF\u81EA\u52A8\u8C03\u7528\n## \u8FD4\u56DE\u91CF\uFF1A\u4E2D\u7B49 ~10KB\n## \u5173\u8054\uFF1A\u672C\u5DE5\u5177\u770B\u6392\u884C\u699C \u2192 okx_get_lead_trader_stats \u770B\u8BE6\u60C5 \u2192 \u9009\u62E9\u8DDF\u5355",
|
|
25748
|
+
{},
|
|
25749
|
+
async () => {
|
|
25750
|
+
try {
|
|
25751
|
+
const data = await publicApi.getPublicLeadTraders();
|
|
25752
|
+
return toResult(data);
|
|
25753
|
+
} catch (e) {
|
|
25754
|
+
return toError(e);
|
|
25755
|
+
}
|
|
25756
|
+
}
|
|
25757
|
+
);
|
|
25758
|
+
server.tool(
|
|
25759
|
+
"okx_get_public_copy_config",
|
|
25760
|
+
"## \u529F\u80FD\uFF1A\u516C\u5F00\u67E5\u8BE2\u8DDF\u5355\u7CFB\u7EDF\u914D\u7F6E\n## \u573A\u666F\uFF1A\u7528\u4E8E\u4E86\u89E3\u8DDF\u5355\u89C4\u5219\u3001\u6700\u4F4E\u8DDF\u5355\u91D1\u989D\u3001\u6700\u5927\u8DDF\u5355\u6BD4\u4F8B\u7B49\n## \u5173\u952E\u8BCD\uFF1A\u8DDF\u5355\u914D\u7F6E, copy config, \u8DDF\u5355\u89C4\u5219, \u8DDF\u5355\u9650\u5236\n## \u53C2\u6570\uFF1A\u65E0\n## \u9274\u6743\uFF1APUBLIC \u2014 \u516C\u5F00\u63A5\u53E3\uFF0C\u4E0D\u9700\u8981 API Key\n## \u98CE\u9669\uFF1AREAD \u2014 \u53EA\u8BFB\u67E5\u8BE2\uFF0CAgent \u53EF\u81EA\u52A8\u8C03\u7528\n## \u8FD4\u56DE\u91CF\uFF1A\u5FAE\u5C0F ~1KB\n## \u5173\u8054\uFF1A\u672C\u5DE5\u5177\u67E5\u770B\u89C4\u5219 \u2192 \u8BBE\u7F6E\u8DDF\u5355\u53C2\u6570",
|
|
25761
|
+
{},
|
|
25762
|
+
async () => {
|
|
25763
|
+
try {
|
|
25764
|
+
const data = await publicApi.getPublicCopyConfig();
|
|
25765
|
+
return toResult(data);
|
|
25766
|
+
} catch (e) {
|
|
25767
|
+
return toError(e);
|
|
25768
|
+
}
|
|
25769
|
+
}
|
|
25770
|
+
);
|
|
25771
|
+
server.tool(
|
|
25772
|
+
"okx_get_public_lead_trader_pnl",
|
|
25773
|
+
"## \u529F\u80FD\uFF1A\u516C\u5F00\u67E5\u8BE2\u5E26\u5355\u5458\u6536\u76CA\u6570\u636E\n## \u573A\u666F\uFF1A\u7528\u4E8E\u8BC4\u4F30\u5E26\u5355\u5458\u7684\u5386\u53F2\u6536\u76CA\u8868\u73B0\n## \u5173\u952E\u8BCD\uFF1A\u5E26\u5355\u6536\u76CA, lead trader pnl, \u8DDF\u5355\u6536\u76CA, \u5E26\u5355\u76C8\u5229\u7387\n## \u53C2\u6570\uFF1A\n## - uniqueCode: \u5E26\u5355\u5458\u552F\u4E00\u6807\u8BC6\u7801\u3002\u5FC5\u586B\n## - lastDays: \u7EDF\u8BA1\u5468\u671F\uFF08\u5929\uFF09\uFF1A7/30/90/180\u3002\u5FC5\u586B\n## \u9274\u6743\uFF1APUBLIC \u2014 \u516C\u5F00\u63A5\u53E3\uFF0C\u4E0D\u9700\u8981 API Key\n## \u98CE\u9669\uFF1AREAD \u2014 \u53EA\u8BFB\u67E5\u8BE2\uFF0CAgent \u53EF\u81EA\u52A8\u8C03\u7528\n## \u8FD4\u56DE\u91CF\uFF1A\u5FAE\u5F31 ~500B\n## \u5173\u8054\uFF1A\u672C\u5DE5\u5177\u770B\u6536\u76CA \u2192 okx_get_lead_trader_stats \u770B\u7EDF\u8BA1 \u2192 \u51B3\u5B9A\u662F\u5426\u8DDF\u5355",
|
|
25774
|
+
{
|
|
25775
|
+
uniqueCode: external_exports.string().describe("\u5E26\u5355\u5458\u552F\u4E00\u6807\u8BC6\u7801\u3002\u5FC5\u586B"),
|
|
25776
|
+
lastDays: external_exports.enum(["7", "30", "90", "180"]).describe("\u7EDF\u8BA1\u5468\u671F\uFF08\u5929\uFF09\uFF1A7/30/90/180")
|
|
25777
|
+
},
|
|
25778
|
+
async ({ uniqueCode, lastDays }) => {
|
|
25779
|
+
try {
|
|
25780
|
+
const data = await publicApi.getPublicLeadTraderPnl(uniqueCode, lastDays);
|
|
25781
|
+
return toResult(data);
|
|
25782
|
+
} catch (e) {
|
|
25783
|
+
return toError(e);
|
|
25784
|
+
}
|
|
25785
|
+
}
|
|
25786
|
+
);
|
|
25787
|
+
server.tool(
|
|
25788
|
+
"okx_get_copy_traders",
|
|
25789
|
+
"## \u529F\u80FD\uFF1A\u67E5\u8BE2\u8DDF\u5355\u6211\u7684\u4EA4\u6613\u5458\u5217\u8868\n## \u573A\u666F\uFF1A\u7528\u4E8E\u67E5\u770B\u6709\u54EA\u4E9B\u4EA4\u6613\u5458\u5728\u8DDF\u5355\u81EA\u5DF1\u3001\u7BA1\u7406\u8DDF\u5355\u5173\u7CFB\n## \u5173\u952E\u8BCD\uFF1A\u6211\u7684\u8DDF\u5355\u8005, copy traders, \u8DDF\u5355\u5458, \u7C89\u4E1D\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\u8DDF\u5355\u8005 \u2192 \u7BA1\u7406\u8DDF\u5355\u5173\u7CFB",
|
|
25790
|
+
{},
|
|
25791
|
+
async () => {
|
|
25792
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
25793
|
+
try {
|
|
25794
|
+
const data = await privateApi.getCopyTraders(auth);
|
|
25795
|
+
return toResult(data);
|
|
25796
|
+
} catch (e) {
|
|
25797
|
+
return toError(e);
|
|
25798
|
+
}
|
|
25799
|
+
}
|
|
25800
|
+
);
|
|
25801
|
+
server.tool(
|
|
25802
|
+
"okx_first_copy_settings",
|
|
25803
|
+
"## \u529F\u80FD\uFF1A\u9996\u6B21\u8BBE\u7F6E\u8DDF\u5355\uFF08\u521D\u59CB\u914D\u7F6E\u8DDF\u5355\u53C2\u6570\uFF09\n## \u573A\u666F\uFF1A\u7528\u4E8E\u9996\u6B21\u5F00\u59CB\u8DDF\u5355\u65F6\u8BBE\u7F6E\u5168\u90E8\u53C2\u6570\n## \u5173\u952E\u8BCD\uFF1A\u9996\u6B21\u8DDF\u5355, first copy, \u521D\u6B21\u8DDF\u5355, \u8DDF\u5355\u521D\u59CB\u5316\n## \u53C2\u6570\uFF1A\n## - uniqueCode: \u5E26\u5355\u5458\u552F\u4E00\u6807\u8BC6\u7801\u3002\u5FC5\u586B\n## - instType: \u4EA7\u54C1\u7C7B\u578B\u3002SWAP/FUTURES\u3002\u5FC5\u586B\n## - amount: \u8DDF\u5355\u6570\u91CF\u3002\u5FC5\u586B\n## - amountType: \u6570\u91CF\u7C7B\u578B\u3002\u53EF\u9009\n## \u9274\u6743\uFF1A\u{1F534} \u9700\u8981 API Key\uFF08\u4EA4\u6613\uFF09- \u5C06\u5F00\u59CB\u8DDF\u5355\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u98CE\u9669\uFF1AWRITE \u2014 \u9996\u6B21\u8DDF\u5355\u8BBE\u7F6E\u540E\u5C06\u81EA\u52A8\u590D\u5236\u4EA4\u6613\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u8FD4\u56DE\u91CF\uFF1A\u5FAE\u5C0F ~500B\n## \u5173\u8054\uFF1Aokx_get_lead_trader_stats \u8BC4\u4F30 \u2192 \u672C\u5DE5\u5177\u9996\u6B21\u8DDF\u5355 \u2192 okx_get_copy_settings \u786E\u8BA4",
|
|
25804
|
+
{
|
|
25805
|
+
uniqueCode: external_exports.string().describe("\u5E26\u5355\u5458\u552F\u4E00\u6807\u8BC6\u7801\u3002\u5FC5\u586B"),
|
|
25806
|
+
instType: external_exports.enum(INST_TYPE_SWAP_FUT).describe("\u4EA7\u54C1\u7C7B\u578B\u3002SWAP=\u6C38\u7EED, FUTURES=\u4EA4\u5272"),
|
|
25807
|
+
amount: external_exports.string().describe("\u8DDF\u5355\u6570\u91CF\u3002\u5FC5\u586B"),
|
|
25808
|
+
amountType: external_exports.string().optional().describe("\u6570\u91CF\u7C7B\u578B\u30021=\u56FA\u5B9A\u5F20\u6570, 2=\u56FA\u5B9A\u91D1\u989D, 3=\u6BD4\u4F8B")
|
|
25809
|
+
},
|
|
25810
|
+
async ({ uniqueCode, instType, amount, amountType }) => {
|
|
25811
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
25812
|
+
try {
|
|
25813
|
+
const body = { uniqueCode, instType, amount };
|
|
25814
|
+
if (amountType) body.amountType = amountType;
|
|
25815
|
+
const data = await privateApi.firstCopySettings(auth, body);
|
|
25816
|
+
return toResult(data);
|
|
25817
|
+
} catch (e) {
|
|
25818
|
+
return toError(e);
|
|
25819
|
+
}
|
|
25820
|
+
}
|
|
25821
|
+
);
|
|
25822
|
+
server.tool(
|
|
25823
|
+
"okx_get_unrealized_profit_sharing",
|
|
25824
|
+
"## \u529F\u80FD\uFF1A\u67E5\u8BE2\u5E26\u5355\u672A\u5B9E\u73B0\u7684\u5206\u6210\u91D1\u989D\n## \u573A\u666F\uFF1A\u7528\u4E8E\u67E5\u770B\u5F53\u524D\u6301\u4ED3\u4E2D\u5C1A\u672A\u7ED3\u7B97\u7684\u6F5C\u5728\u5206\u6210\u6536\u5165\n## \u5173\u952E\u8BCD\uFF1A\u672A\u5B9E\u73B0\u5206\u6210, unrealized profit, \u5F85\u7ED3\u7B97\u5206\u6210, \u6301\u4ED3\u5206\u6210\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\u5FAE\u5F31 ~300B\n## \u5173\u8054\uFF1A\u672C\u5DE5\u5177\u770B\u672A\u5B9E\u73B0\u5206\u6210 \u2192 okx_get_profit_sharing_total \u770B\u5DF2\u5B9E\u73B0\u5206\u6210",
|
|
25825
|
+
{},
|
|
25826
|
+
async () => {
|
|
25827
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
25828
|
+
try {
|
|
25829
|
+
const data = await privateApi.getUnrealizedProfitSharing(auth);
|
|
25830
|
+
return toResult(data);
|
|
25831
|
+
} catch (e) {
|
|
25832
|
+
return toError(e);
|
|
25833
|
+
}
|
|
25834
|
+
}
|
|
25835
|
+
);
|
|
25836
|
+
server.tool(
|
|
25837
|
+
"okx_get_total_unrealized_profit_sharing",
|
|
25838
|
+
"## \u529F\u80FD\uFF1A\u67E5\u8BE2\u5E26\u5355\u7D2F\u8BA1\u672A\u5B9E\u73B0\u5206\u6210\u603B\u989D\n## \u573A\u666F\uFF1A\u7528\u4E8E\u67E5\u770B\u6240\u6709\u5E26\u5355\u7684\u7D2F\u8BA1\u6F5C\u5728\u5206\u6210\u6536\u5165\n## \u5173\u952E\u8BCD\uFF1A\u7D2F\u8BA1\u672A\u5B9E\u73B0, total unrealized, \u672A\u5B9E\u73B0\u603B\u989D, \u6F5C\u5728\u5206\u6210\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\u5FAE\u5F31 ~300B\n## \u5173\u8054\uFF1A\u672C\u5DE5\u5177\u770B\u7D2F\u8BA1\u672A\u5B9E\u73B0 \u2192 okx_get_unrealized_profit_sharing \u770B\u660E\u7EC6",
|
|
25839
|
+
{},
|
|
25840
|
+
async () => {
|
|
25841
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
25842
|
+
try {
|
|
25843
|
+
const data = await privateApi.getTotalUnrealizedProfitSharing(auth);
|
|
25844
|
+
return toResult(data);
|
|
25845
|
+
} catch (e) {
|
|
25846
|
+
return toError(e);
|
|
25847
|
+
}
|
|
25848
|
+
}
|
|
25849
|
+
);
|
|
25850
|
+
server.tool(
|
|
25851
|
+
"okx_amend_profit_sharing_ratio",
|
|
25852
|
+
"## \u529F\u80FD\uFF1A\u4FEE\u6539\u5E26\u5355\u5206\u6210\u6BD4\u4F8B\n## \u573A\u666F\uFF1A\u7528\u4E8E\u8C03\u6574\u8DDF\u5355\u8005\u7684\u76C8\u5229\u5206\u6210\u6BD4\u4F8B\n## \u5173\u952E\u8BCD\uFF1A\u4FEE\u6539\u5206\u6210, profit ratio, \u5206\u6210\u6BD4\u4F8B, \u8C03\u6574\u5206\u6210\n## \u53C2\u6570\uFF1A\n## - profitSharingRatio: \u5206\u6210\u6BD4\u4F8B\u3002\u5FC5\u586B\n## \u9274\u6743\uFF1A\u{1F534} \u9700\u8981 API Key\uFF08\u4EA4\u6613\uFF09- \u5C06\u4FEE\u6539\u5206\u6210\u6BD4\u4F8B\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u98CE\u9669\uFF1AWRITE \u2014 \u4FEE\u6539\u5206\u6210\u6BD4\u4F8B\u5F71\u54CD\u6536\u5165\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u8FD4\u56DE\u91CF\uFF1A\u5FAE\u5C0F ~300B\n## \u5173\u8054\uFF1Aokx_get_profit_sharing_total \u770B\u5F53\u524D\u5206\u6210 \u2192 \u672C\u5DE5\u5177\u4FEE\u6539\u6BD4\u4F8B",
|
|
25853
|
+
{
|
|
25854
|
+
profitSharingRatio: external_exports.string().describe("\u5206\u6210\u6BD4\u4F8B\u3002\u5FC5\u586B")
|
|
25855
|
+
},
|
|
25856
|
+
async ({ profitSharingRatio }) => {
|
|
25857
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
25858
|
+
try {
|
|
25859
|
+
const data = await privateApi.amendProfitSharingRatio(auth, { profitSharingRatio });
|
|
25860
|
+
return toResult(data);
|
|
25861
|
+
} catch (e) {
|
|
25862
|
+
return toError(e);
|
|
25863
|
+
}
|
|
25864
|
+
}
|
|
25865
|
+
);
|
|
25866
|
+
server.tool(
|
|
25867
|
+
"okx_amend_copy_settings",
|
|
25868
|
+
"## \u529F\u80FD\uFF1A\u4FEE\u6539\u8DDF\u5355\u8BBE\u7F6E\n## \u573A\u666F\uFF1A\u7528\u4E8E\u8C03\u6574\u5DF2\u6709\u8DDF\u5355\u7684\u53C2\u6570\u3001\u66F4\u65B0\u8DDF\u5355\u6570\u91CF\u6216\u7C7B\u578B\n## \u5173\u952E\u8BCD\uFF1A\u4FEE\u6539\u8DDF\u5355, amend copy, \u8DDF\u5355\u8C03\u6574, \u8DDF\u5355\u53C2\u6570\u4FEE\u6539\n## \u53C2\u6570\uFF1A\n## - subPosId: \u5B50\u6301\u4ED3ID\u3002\u5FC5\u586B\n## - amount: \u65B0\u8DDF\u5355\u6570\u91CF\u3002\u53EF\u9009\n## - amountType: \u65B0\u6570\u91CF\u7C7B\u578B\u3002\u53EF\u9009\n## \u9274\u6743\uFF1A\u{1F534} \u9700\u8981 API Key\uFF08\u4EA4\u6613\uFF09- \u5C06\u4FEE\u6539\u8DDF\u5355\u8BBE\u7F6E\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u98CE\u9669\uFF1AWRITE \u2014 \u4FEE\u6539\u8DDF\u5355\u53C2\u6570\u5F71\u54CD\u540E\u7EED\u8DDF\u5355\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u8FD4\u56DE\u91CF\uFF1A\u5FAE\u5C0F ~500B\n## \u5173\u8054\uFF1Aokx_get_copy_settings \u67E5\u770B\u5F53\u524D \u2192 \u672C\u5DE5\u5177\u4FEE\u6539 \u2192 \u786E\u8BA4\u53D8\u66F4",
|
|
25869
|
+
{
|
|
25870
|
+
subPosId: external_exports.string().describe("\u5B50\u6301\u4ED3ID\u3002\u5FC5\u586B"),
|
|
25871
|
+
amount: external_exports.string().optional().describe("\u65B0\u8DDF\u5355\u6570\u91CF"),
|
|
25872
|
+
amountType: external_exports.string().optional().describe("\u65B0\u6570\u91CF\u7C7B\u578B\u30021=\u56FA\u5B9A\u5F20\u6570, 2=\u56FA\u5B9A\u91D1\u989D, 3=\u6BD4\u4F8B")
|
|
25873
|
+
},
|
|
25874
|
+
async ({ subPosId, amount, amountType }) => {
|
|
25875
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
25876
|
+
try {
|
|
25877
|
+
const body = { subPosId };
|
|
25878
|
+
if (amount) body.amount = amount;
|
|
25879
|
+
if (amountType) body.amountType = amountType;
|
|
25880
|
+
const data = await privateApi.amendCopySettings(auth, body);
|
|
25881
|
+
return toResult(data);
|
|
25882
|
+
} catch (e) {
|
|
25883
|
+
return toError(e);
|
|
25884
|
+
}
|
|
25885
|
+
}
|
|
25886
|
+
);
|
|
25590
25887
|
}
|
|
25591
25888
|
|
|
25592
25889
|
// src/tools/signal.ts
|
|
@@ -25870,6 +26167,116 @@ function registerRfqTools(server, auth) {
|
|
|
25870
26167
|
}
|
|
25871
26168
|
}
|
|
25872
26169
|
);
|
|
26170
|
+
server.tool(
|
|
26171
|
+
"okx_get_rfq_counterparties",
|
|
26172
|
+
"## \u529F\u80FD\uFF1A\u83B7\u53D6RFQ\u5BF9\u624B\u65B9\u5217\u8868\n## \u573A\u666F\uFF1A\u7528\u4E8E\u67E5\u770B\u53EF\u8BE2\u4EF7\u7684\u505A\u5E02\u5546\u548C\u5BF9\u624B\u65B9\n## \u5173\u952E\u8BCD\uFF1ARFQ\u5BF9\u624B\u65B9, counterparties, \u62A5\u4EF7\u5BF9\u624B, \u8BE2\u4EF7\u5BF9\u624B\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\u5BF9\u624B\u65B9 \u2192 okx_create_rfq \u53D1\u8D77\u8BE2\u4EF7",
|
|
26173
|
+
{},
|
|
26174
|
+
async () => {
|
|
26175
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
26176
|
+
try {
|
|
26177
|
+
const data = await privateApi.getRfqCounterparties(auth);
|
|
26178
|
+
return toResult(data);
|
|
26179
|
+
} catch (e) {
|
|
26180
|
+
return toError(e);
|
|
26181
|
+
}
|
|
26182
|
+
}
|
|
26183
|
+
);
|
|
26184
|
+
server.tool(
|
|
26185
|
+
"okx_cancel_rfq",
|
|
26186
|
+
"## \u529F\u80FD\uFF1A\u53D6\u6D88RFQ\u62A5\u4EF7\u8BF7\u6C42\n## \u573A\u666F\uFF1A\u7528\u4E8E\u53D6\u6D88\u5DF2\u53D1\u9001\u4F46\u672A\u6536\u5230\u62A5\u4EF7\u7684\u8BE2\u4EF7\n## \u5173\u952E\u8BCD\uFF1A\u53D6\u6D88\u8BE2\u4EF7, cancel rfq, \u64A4\u9500\u8BE2\u4EF7\n## \u53C2\u6570\uFF1A\n## - rfqId: RFQ ID\u3002\u5FC5\u586B\n## \u9274\u6743\uFF1A\u{1F534} \u9700\u8981 API Key\uFF08\u4EA4\u6613\uFF09- \u5C06\u53D6\u6D88\u8BE2\u4EF7\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u98CE\u9669\uFF1AWRITE \u2014 \u53D6\u6D88\u8BE2\u4EF7\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u8FD4\u56DE\u91CF\uFF1A\u5FAE\u5C0F ~300B\n## \u5173\u8054\uFF1Aokx_get_rfqs \u67E5\u770B\u8BE2\u4EF7 \u2192 \u672C\u5DE5\u5177\u53D6\u6D88 \u2192 \u91CD\u65B0\u8BE2\u4EF7",
|
|
26187
|
+
{
|
|
26188
|
+
rfqId: external_exports.string().describe("RFQ ID\u3002\u5FC5\u586B")
|
|
26189
|
+
},
|
|
26190
|
+
async ({ rfqId }) => {
|
|
26191
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
26192
|
+
try {
|
|
26193
|
+
const data = await privateApi.cancelRfq(auth, { rfqId });
|
|
26194
|
+
return toResult(data);
|
|
26195
|
+
} catch (e) {
|
|
26196
|
+
return toError(e);
|
|
26197
|
+
}
|
|
26198
|
+
}
|
|
26199
|
+
);
|
|
26200
|
+
server.tool(
|
|
26201
|
+
"okx_cancel_batch_rfqs",
|
|
26202
|
+
"## \u529F\u80FD\uFF1A\u6279\u91CF\u53D6\u6D88RFQ\u62A5\u4EF7\u8BF7\u6C42\n## \u573A\u666F\uFF1A\u7528\u4E8E\u540C\u65F6\u53D6\u6D88\u591A\u4E2A\u8BE2\u4EF7\n## \u5173\u952E\u8BCD\uFF1A\u6279\u91CF\u53D6\u6D88, cancel batch rfqs, \u6279\u91CF\u64A4\u9500\u8BE2\u4EF7\n## \u53C2\u6570\uFF1A\n## - rfqIds: RFQ ID\u6570\u7EC4\uFF08JSON\u6570\u7EC4\u5B57\u7B26\u4E32\uFF09\u3002\u5FC5\u586B\n## \u9274\u6743\uFF1A\u{1F534} \u9700\u8981 API Key\uFF08\u4EA4\u6613\uFF09- \u5C06\u6279\u91CF\u53D6\u6D88\u8BE2\u4EF7\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u98CE\u9669\uFF1AWRITE \u2014 \u6279\u91CF\u53D6\u6D88\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u8FD4\u56DE\u91CF\uFF1A\u4E2D\u7B49 ~2KB\n## \u5173\u8054\uFF1Aokx_get_rfqs \u67E5\u770B\u8BE2\u4EF7 \u2192 \u672C\u5DE5\u5177\u6279\u91CF\u53D6\u6D88",
|
|
26203
|
+
{
|
|
26204
|
+
rfqIds: external_exports.string().describe(`RFQ ID\u6570\u7EC4JSON\u5B57\u7B26\u4E32\uFF0C\u5982 '["123","456"]'`)
|
|
26205
|
+
},
|
|
26206
|
+
async ({ rfqIds }) => {
|
|
26207
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
26208
|
+
try {
|
|
26209
|
+
const parsed = JSON.parse(rfqIds);
|
|
26210
|
+
const data = await privateApi.cancelBatchRfqs(auth, parsed);
|
|
26211
|
+
return toResult(data);
|
|
26212
|
+
} catch (e) {
|
|
26213
|
+
return toError(e);
|
|
26214
|
+
}
|
|
26215
|
+
}
|
|
26216
|
+
);
|
|
26217
|
+
server.tool(
|
|
26218
|
+
"okx_cancel_all_rfqs",
|
|
26219
|
+
"## \u529F\u80FD\uFF1A\u53D6\u6D88\u6240\u6709RFQ\u62A5\u4EF7\u8BF7\u6C42\n## \u573A\u666F\uFF1A\u7528\u4E8E\u4E00\u952E\u6E05\u7A7A\u6240\u6709\u672A\u5B8C\u6210\u7684\u8BE2\u4EF7\n## \u5173\u952E\u8BCD\uFF1A\u5168\u90E8\u53D6\u6D88, cancel all rfqs, \u6E05\u7A7A\u8BE2\u4EF7\n## \u53C2\u6570\uFF1A\u65E0\n## \u9274\u6743\uFF1A\u{1F534} \u9700\u8981 API Key\uFF08\u4EA4\u6613\uFF09- \u5C06\u53D6\u6D88\u6240\u6709\u8BE2\u4EF7\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u98CE\u9669\uFF1AWRITE \u2014 \u53D6\u6D88\u5168\u90E8\u8BE2\u4EF7\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u8FD4\u56DE\u91CF\uFF1A\u5FAE\u5C0F ~300B\n## \u5173\u8054\uFF1A\u672C\u5DE5\u5177\u4E00\u952E\u53D6\u6D88\u6240\u6709 \u2192 okx_create_rfq \u91CD\u65B0\u8BE2\u4EF7",
|
|
26220
|
+
{},
|
|
26221
|
+
async () => {
|
|
26222
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
26223
|
+
try {
|
|
26224
|
+
const data = await privateApi.cancelAllRfqs(auth);
|
|
26225
|
+
return toResult(data);
|
|
26226
|
+
} catch (e) {
|
|
26227
|
+
return toError(e);
|
|
26228
|
+
}
|
|
26229
|
+
}
|
|
26230
|
+
);
|
|
26231
|
+
server.tool(
|
|
26232
|
+
"okx_create_quote",
|
|
26233
|
+
"## \u529F\u80FD\uFF1A\u521B\u5EFA\u62A5\u4EF7\uFF08\u56DE\u590DRFQ\u8BE2\u4EF7\uFF09\n## \u573A\u666F\uFF1A\u7528\u4E8E\u505A\u5E02\u5546\u56DE\u590D\u8BE2\u4EF7\u3001\u63D0\u4F9B\u62A5\u4EF7\n## \u53C2\u6570\uFF1A\n## - rfqId: RFQ ID\u3002\u5FC5\u586B\n## - quotePx: \u62A5\u4EF7\u4EF7\u683C\u3002\u5FC5\u586B\n## - sz: \u62A5\u4EF7\u6570\u91CF\u3002\u5FC5\u586B\n## \u9274\u6743\uFF1A\u{1F534} \u9700\u8981 API Key\uFF08\u4EA4\u6613\uFF09- \u5C06\u53D1\u9001\u62A5\u4EF7\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u98CE\u9669\uFF1AWRITE \u2014 \u53D1\u9001\u62A5\u4EF7\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u8FD4\u56DE\u91CF\uFF1A\u5FAE\u5C0F ~500B\n## \u5173\u8054\uFF1Aokx_get_rfqs \u67E5\u770B\u8BE2\u4EF7 \u2192 \u672C\u5DE5\u5177\u62A5\u4EF7 \u2192 okx_get_quotes \u67E5\u770B\u62A5\u4EF7",
|
|
26234
|
+
{
|
|
26235
|
+
rfqId: external_exports.string().describe("RFQ ID\u3002\u5FC5\u586B"),
|
|
26236
|
+
quotePx: external_exports.string().describe("\u62A5\u4EF7\u4EF7\u683C\u3002\u5FC5\u586B"),
|
|
26237
|
+
sz: external_exports.string().describe("\u62A5\u4EF7\u6570\u91CF\u3002\u5FC5\u586B")
|
|
26238
|
+
},
|
|
26239
|
+
async ({ rfqId, quotePx, sz }) => {
|
|
26240
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
26241
|
+
try {
|
|
26242
|
+
const data = await privateApi.createRfqQuote(auth, { rfqId, quotePx, sz });
|
|
26243
|
+
return toResult(data);
|
|
26244
|
+
} catch (e) {
|
|
26245
|
+
return toError(e);
|
|
26246
|
+
}
|
|
26247
|
+
}
|
|
26248
|
+
);
|
|
26249
|
+
server.tool(
|
|
26250
|
+
"okx_cancel_quote",
|
|
26251
|
+
"## \u529F\u80FD\uFF1A\u53D6\u6D88\u5DF2\u53D1\u9001\u7684\u62A5\u4EF7\n## \u573A\u666F\uFF1A\u7528\u4E8E\u53D6\u6D88\u5C1A\u672A\u88AB\u63A5\u53D7\u7684\u62A5\u4EF7\n## \u53C2\u6570\uFF1A\n## - rfqId: RFQ ID\u3002\u5FC5\u586B\n## - quoteId: \u62A5\u4EF7ID\u3002\u5FC5\u586B\n## \u9274\u6743\uFF1A\u{1F534} \u9700\u8981 API Key\uFF08\u4EA4\u6613\uFF09- \u5C06\u53D6\u6D88\u62A5\u4EF7\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u98CE\u9669\uFF1AWRITE \u2014 \u53D6\u6D88\u62A5\u4EF7\uFF0C\u8C03\u7528\u524D\u5FC5\u987B\u786E\u8BA4\n## \u8FD4\u56DE\u91CF\uFF1A\u5FAE\u5C0F ~300B\n## \u5173\u8054\uFF1Aokx_get_quotes \u67E5\u770B\u62A5\u4EF7 \u2192 \u672C\u5DE5\u5177\u53D6\u6D88 \u2192 \u91CD\u65B0\u62A5\u4EF7",
|
|
26252
|
+
{
|
|
26253
|
+
rfqId: external_exports.string().describe("RFQ ID\u3002\u5FC5\u586B"),
|
|
26254
|
+
quoteId: external_exports.string().describe("\u62A5\u4EF7ID\u3002\u5FC5\u586B")
|
|
26255
|
+
},
|
|
26256
|
+
async ({ rfqId, quoteId }) => {
|
|
26257
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
26258
|
+
try {
|
|
26259
|
+
const data = await privateApi.cancelRfqQuote(auth, { rfqId, quoteId });
|
|
26260
|
+
return toResult(data);
|
|
26261
|
+
} catch (e) {
|
|
26262
|
+
return toError(e);
|
|
26263
|
+
}
|
|
26264
|
+
}
|
|
26265
|
+
);
|
|
26266
|
+
server.tool(
|
|
26267
|
+
"okx_get_rfq_trades",
|
|
26268
|
+
"## \u529F\u80FD\uFF1A\u67E5\u8BE2RFQ\u6210\u4EA4\u8BB0\u5F55\n## \u573A\u666F\uFF1A\u7528\u4E8E\u67E5\u770B\u5927\u5B97\u4EA4\u6613\u7684\u6210\u4EA4\u5386\u53F2\n## \u5173\u952E\u8BCD\uFF1ARFQ\u6210\u4EA4, rfq trades, \u5927\u5B97\u6210\u4EA4, \u8BE2\u4EF7\u6210\u4EA4\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_get_rfqs \u67E5\u8BE2\u4EF7 \u2192 \u672C\u5DE5\u5177\u67E5\u6210\u4EA4 \u2192 \u6838\u5BF9\u5927\u5B97\u4EA4\u6613",
|
|
26269
|
+
{},
|
|
26270
|
+
async () => {
|
|
26271
|
+
if (!auth) return toError(AUTH_REQUIRED);
|
|
26272
|
+
try {
|
|
26273
|
+
const data = await privateApi.getRfqTrades(auth);
|
|
26274
|
+
return toResult(data);
|
|
26275
|
+
} catch (e) {
|
|
26276
|
+
return toError(e);
|
|
26277
|
+
}
|
|
26278
|
+
}
|
|
26279
|
+
);
|
|
25873
26280
|
}
|
|
25874
26281
|
|
|
25875
26282
|
// src/tools/affiliate.ts
|