@aicoin/opendata-mcp 1.0.26 → 1.0.28
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/build/index.js +40 -18
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -501,9 +501,7 @@ function registerCoinTools(server2) {
|
|
|
501
501
|
"Get aggregated stablecoin-margined open interest history",
|
|
502
502
|
{
|
|
503
503
|
symbol: z2.string().describe("Coin symbol, e.g. BTC"),
|
|
504
|
-
interval: z2.string().describe(
|
|
505
|
-
"Interval: 1m,3m,5m,15m,30m,1h,4h,6h,8h,12h,1d,1w"
|
|
506
|
-
),
|
|
504
|
+
interval: z2.string().describe("Interval: 1m,2m,15m,30m"),
|
|
507
505
|
limit: z2.string().optional().describe("Number of records, default 100"),
|
|
508
506
|
start_time: z2.string().optional().describe("Start time in ms"),
|
|
509
507
|
end_time: z2.string().optional().describe("End time in ms")
|
|
@@ -533,9 +531,7 @@ function registerCoinTools(server2) {
|
|
|
533
531
|
"Get aggregated coin-margined open interest history",
|
|
534
532
|
{
|
|
535
533
|
symbol: z2.string().describe("Coin symbol, e.g. BTC"),
|
|
536
|
-
interval: z2.string().describe(
|
|
537
|
-
"Interval: 1m,3m,5m,15m,30m,1h,4h,6h,8h,12h,1d,1w"
|
|
538
|
-
),
|
|
534
|
+
interval: z2.string().describe("Interval: 1m,2m,15m,30m"),
|
|
539
535
|
limit: z2.string().optional().describe("Number of records, default 100"),
|
|
540
536
|
start_time: z2.string().optional().describe("Start time in ms"),
|
|
541
537
|
end_time: z2.string().optional().describe("End time in ms")
|
|
@@ -2362,13 +2358,15 @@ function registerHyperliquidTools(server2) {
|
|
|
2362
2358
|
"Get current position PnL for a coin",
|
|
2363
2359
|
{
|
|
2364
2360
|
address: z6.string().describe("Wallet address"),
|
|
2365
|
-
coin: z6.string().describe("Coin, e.g. BTC")
|
|
2361
|
+
coin: z6.string().describe("Coin, e.g. BTC"),
|
|
2362
|
+
interval: z6.string().describe("Interval, e.g. 1h, 4h, 1d")
|
|
2366
2363
|
},
|
|
2367
|
-
async ({ address, coin }) => {
|
|
2364
|
+
async ({ address, coin, interval }) => {
|
|
2368
2365
|
try {
|
|
2369
2366
|
return ok(
|
|
2370
2367
|
await apiGet(
|
|
2371
|
-
`/api/upgrade/v2/hl/traders/${address}/current-position-pnl/${coin}
|
|
2368
|
+
`/api/upgrade/v2/hl/traders/${address}/current-position-pnl/${coin}`,
|
|
2369
|
+
{ interval }
|
|
2372
2370
|
)
|
|
2373
2371
|
);
|
|
2374
2372
|
} catch (e) {
|
|
@@ -2381,13 +2379,24 @@ function registerHyperliquidTools(server2) {
|
|
|
2381
2379
|
"Get completed position PnL for a coin",
|
|
2382
2380
|
{
|
|
2383
2381
|
address: z6.string().describe("Wallet address"),
|
|
2384
|
-
coin: z6.string().describe("Coin, e.g. BTC")
|
|
2382
|
+
coin: z6.string().describe("Coin, e.g. BTC"),
|
|
2383
|
+
interval: z6.string().describe("Interval, e.g. 1h, 4h, 1d"),
|
|
2384
|
+
startTime: z6.string().optional().describe(
|
|
2385
|
+
"Start time in ms, at least one of startTime/endTime required"
|
|
2386
|
+
),
|
|
2387
|
+
endTime: z6.string().optional().describe(
|
|
2388
|
+
"End time in ms, at least one of startTime/endTime required"
|
|
2389
|
+
)
|
|
2385
2390
|
},
|
|
2386
|
-
async ({ address, coin }) => {
|
|
2391
|
+
async ({ address, coin, interval, startTime, endTime }) => {
|
|
2387
2392
|
try {
|
|
2393
|
+
const params = { interval };
|
|
2394
|
+
if (startTime) params.startTime = startTime;
|
|
2395
|
+
if (endTime) params.endTime = endTime;
|
|
2388
2396
|
return ok(
|
|
2389
2397
|
await apiGet(
|
|
2390
|
-
`/api/upgrade/v2/hl/traders/${address}/completed-position-pnl/${coin}
|
|
2398
|
+
`/api/upgrade/v2/hl/traders/${address}/completed-position-pnl/${coin}`,
|
|
2399
|
+
params
|
|
2391
2400
|
)
|
|
2392
2401
|
);
|
|
2393
2402
|
} catch (e) {
|
|
@@ -2400,13 +2409,15 @@ function registerHyperliquidTools(server2) {
|
|
|
2400
2409
|
"Get current position execution trace",
|
|
2401
2410
|
{
|
|
2402
2411
|
address: z6.string().describe("Wallet address"),
|
|
2403
|
-
coin: z6.string().describe("Coin, e.g. BTC")
|
|
2412
|
+
coin: z6.string().describe("Coin, e.g. BTC"),
|
|
2413
|
+
interval: z6.string().describe("Interval, e.g. 1h, 4h, 1d")
|
|
2404
2414
|
},
|
|
2405
|
-
async ({ address, coin }) => {
|
|
2415
|
+
async ({ address, coin, interval }) => {
|
|
2406
2416
|
try {
|
|
2407
2417
|
return ok(
|
|
2408
2418
|
await apiGet(
|
|
2409
|
-
`/api/upgrade/v2/hl/traders/${address}/current-position-executions/${coin}
|
|
2419
|
+
`/api/upgrade/v2/hl/traders/${address}/current-position-executions/${coin}`,
|
|
2420
|
+
{ interval }
|
|
2410
2421
|
)
|
|
2411
2422
|
);
|
|
2412
2423
|
} catch (e) {
|
|
@@ -2419,13 +2430,24 @@ function registerHyperliquidTools(server2) {
|
|
|
2419
2430
|
"Get completed position execution trace",
|
|
2420
2431
|
{
|
|
2421
2432
|
address: z6.string().describe("Wallet address"),
|
|
2422
|
-
coin: z6.string().describe("Coin, e.g. BTC")
|
|
2433
|
+
coin: z6.string().describe("Coin, e.g. BTC"),
|
|
2434
|
+
interval: z6.string().describe("Interval, e.g. 1h, 4h, 1d"),
|
|
2435
|
+
startTime: z6.string().optional().describe(
|
|
2436
|
+
"Start time in ms, at least one of startTime/endTime required"
|
|
2437
|
+
),
|
|
2438
|
+
endTime: z6.string().optional().describe(
|
|
2439
|
+
"End time in ms, at least one of startTime/endTime required"
|
|
2440
|
+
)
|
|
2423
2441
|
},
|
|
2424
|
-
async ({ address, coin }) => {
|
|
2442
|
+
async ({ address, coin, interval, startTime, endTime }) => {
|
|
2425
2443
|
try {
|
|
2444
|
+
const params = { interval };
|
|
2445
|
+
if (startTime) params.startTime = startTime;
|
|
2446
|
+
if (endTime) params.endTime = endTime;
|
|
2426
2447
|
return ok(
|
|
2427
2448
|
await apiGet(
|
|
2428
|
-
`/api/upgrade/v2/hl/traders/${address}/completed-position-executions/${coin}
|
|
2449
|
+
`/api/upgrade/v2/hl/traders/${address}/completed-position-executions/${coin}`,
|
|
2450
|
+
params
|
|
2429
2451
|
)
|
|
2430
2452
|
);
|
|
2431
2453
|
} catch (e) {
|