@gbozee/ultimate 0.0.2-112 → 0.0.2-114
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.cjs +362 -396
- package/dist/index.d.ts +113 -27
- package/dist/index.js +362 -396
- package/dist/mcp-server.cjs +356 -357
- package/dist/mcp-server.js +356 -357
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -302,14 +302,42 @@ export interface CandlestickAnalysisResult {
|
|
|
302
302
|
}
|
|
303
303
|
declare abstract class BaseExchange {
|
|
304
304
|
client: any;
|
|
305
|
+
getCredentials: (owner: string) => {
|
|
306
|
+
api_key: string;
|
|
307
|
+
api_secret: string;
|
|
308
|
+
email: string;
|
|
309
|
+
};
|
|
310
|
+
proxyAgent?: any;
|
|
305
311
|
constructor(client: any);
|
|
306
|
-
abstract
|
|
312
|
+
protected abstract getPositionInfo(symbol: string): Promise<any>;
|
|
313
|
+
abstract cancelAllOrders(symbol: string, payload: {
|
|
314
|
+
type?: "limit" | "stop" | "tp";
|
|
315
|
+
side?: "buy" | "sell";
|
|
316
|
+
kind?: "long" | "short";
|
|
317
|
+
}): Promise<any>;
|
|
318
|
+
protected abstract getCurrentPrice(symbol: string): Promise<any>;
|
|
319
|
+
protected abstract getExchangeInfo(options: {
|
|
320
|
+
price_places?: string;
|
|
321
|
+
decimal_places?: string;
|
|
322
|
+
account: {
|
|
323
|
+
owner: string;
|
|
324
|
+
exchange: string;
|
|
325
|
+
};
|
|
326
|
+
symbol: string;
|
|
327
|
+
}): Promise<any>;
|
|
328
|
+
protected abstract _createLimitPurchaseOrders(payload: {
|
|
329
|
+
symbol: string;
|
|
330
|
+
orders: any[];
|
|
331
|
+
price_places?: string;
|
|
332
|
+
decimal_places?: string;
|
|
333
|
+
}): Promise<any>;
|
|
334
|
+
rawCreateLimitPurchaseOrders(payload: {
|
|
307
335
|
symbol: string;
|
|
308
336
|
orders: Order$1[];
|
|
309
337
|
price_places?: string;
|
|
310
338
|
decimal_places?: string;
|
|
311
339
|
}): Promise<any>;
|
|
312
|
-
|
|
340
|
+
placeStopOrders(payload: {
|
|
313
341
|
symbol: string;
|
|
314
342
|
quantity: number;
|
|
315
343
|
kind: "long" | "short";
|
|
@@ -318,22 +346,22 @@ declare abstract class BaseExchange {
|
|
|
318
346
|
decimal_places?: string;
|
|
319
347
|
place?: boolean;
|
|
320
348
|
}): Promise<any>;
|
|
321
|
-
|
|
322
|
-
orders:
|
|
349
|
+
bulkPlaceLimitOrders(payload: {
|
|
350
|
+
orders: Order$1[];
|
|
323
351
|
kind: "long" | "short";
|
|
324
352
|
decimal_places?: string;
|
|
325
353
|
price_places?: string;
|
|
326
354
|
symbol: string;
|
|
327
355
|
place?: boolean;
|
|
328
|
-
}): Promise<any>;
|
|
329
|
-
|
|
356
|
+
}): Promise<any[]>;
|
|
357
|
+
get_current_price(symbol: string): Promise<any>;
|
|
330
358
|
abstract analyzeCharts(payload: {
|
|
331
359
|
symbol: string;
|
|
332
360
|
chartType: any;
|
|
333
361
|
limit: number;
|
|
334
362
|
raw?: boolean;
|
|
335
363
|
}): Promise<any>;
|
|
336
|
-
|
|
364
|
+
getExchangeAccountInfo(options: {
|
|
337
365
|
price_places?: string;
|
|
338
366
|
decimal_places?: string;
|
|
339
367
|
account: {
|
|
@@ -342,11 +370,26 @@ declare abstract class BaseExchange {
|
|
|
342
370
|
};
|
|
343
371
|
symbol: string;
|
|
344
372
|
}): Promise<any>;
|
|
345
|
-
abstract
|
|
373
|
+
protected abstract _cancelOrders(payload: {
|
|
374
|
+
symbol: string;
|
|
375
|
+
orders: Array<{
|
|
376
|
+
orderId: number;
|
|
377
|
+
}>;
|
|
378
|
+
}): Promise<any>;
|
|
379
|
+
cancelOrders(payload: {
|
|
346
380
|
symbol: string;
|
|
347
381
|
orders: number[];
|
|
348
382
|
}): Promise<any>;
|
|
349
|
-
abstract
|
|
383
|
+
protected abstract _placeTpOrder(payload: {
|
|
384
|
+
symbol: string;
|
|
385
|
+
tp: number;
|
|
386
|
+
kind: "long" | "short";
|
|
387
|
+
cancel?: boolean;
|
|
388
|
+
quantity?: number;
|
|
389
|
+
price_places?: string;
|
|
390
|
+
decimal_places?: string;
|
|
391
|
+
}): Promise<any>;
|
|
392
|
+
placeTpOrder(payload: {
|
|
350
393
|
symbol: string;
|
|
351
394
|
take_profit: number;
|
|
352
395
|
kind: "long" | "short";
|
|
@@ -355,7 +398,18 @@ declare abstract class BaseExchange {
|
|
|
355
398
|
price_places?: string;
|
|
356
399
|
decimal_places?: string;
|
|
357
400
|
}): Promise<any>;
|
|
358
|
-
abstract
|
|
401
|
+
protected abstract placeLimitOrders(payload: {
|
|
402
|
+
symbol: string;
|
|
403
|
+
orders: Array<{
|
|
404
|
+
entry: number;
|
|
405
|
+
quantity: number;
|
|
406
|
+
}>;
|
|
407
|
+
kind: "long" | "short";
|
|
408
|
+
cancel?: boolean;
|
|
409
|
+
price_places?: string;
|
|
410
|
+
decimal_places?: string;
|
|
411
|
+
}): Promise<any>;
|
|
412
|
+
placeLimitOrder(payload: {
|
|
359
413
|
symbol: string;
|
|
360
414
|
quantity: number;
|
|
361
415
|
kind: "long" | "short";
|
|
@@ -363,7 +417,19 @@ declare abstract class BaseExchange {
|
|
|
363
417
|
price_places?: string;
|
|
364
418
|
decimal_places?: string;
|
|
365
419
|
}): Promise<any>;
|
|
366
|
-
abstract
|
|
420
|
+
protected abstract _placeStopOrder(payload: {
|
|
421
|
+
symbol: string;
|
|
422
|
+
stop: number;
|
|
423
|
+
quantity: number;
|
|
424
|
+
kind: "long" | "short";
|
|
425
|
+
price_places?: string;
|
|
426
|
+
decimal_places?: string;
|
|
427
|
+
final_stop: number;
|
|
428
|
+
cancel?: boolean;
|
|
429
|
+
is_limit?: boolean;
|
|
430
|
+
current_price: number;
|
|
431
|
+
}): Promise<any>;
|
|
432
|
+
placeStopOrder(payload: {
|
|
367
433
|
symbol: string;
|
|
368
434
|
stop: number;
|
|
369
435
|
quantity: number;
|
|
@@ -384,14 +450,15 @@ declare abstract class BaseExchange {
|
|
|
384
450
|
movePercent: number;
|
|
385
451
|
include_delisted?: boolean;
|
|
386
452
|
}): Promise<any>;
|
|
387
|
-
|
|
453
|
+
closePosition(payload: {
|
|
388
454
|
symbol: string;
|
|
389
455
|
kind: "long" | "short";
|
|
390
456
|
price_places?: string;
|
|
391
457
|
decimal_places?: string;
|
|
392
458
|
}): Promise<any>;
|
|
393
|
-
abstract
|
|
394
|
-
|
|
459
|
+
protected abstract getAllOpenOrders(): Promise<any>;
|
|
460
|
+
getAllOpenSymbols(): Promise<unknown[]>;
|
|
461
|
+
createLimitPurchaseOrders(payload: {
|
|
395
462
|
orders: any[];
|
|
396
463
|
kind: "long" | "short";
|
|
397
464
|
decimal_places?: string;
|
|
@@ -412,7 +479,7 @@ declare abstract class BaseExchange {
|
|
|
412
479
|
asset: string;
|
|
413
480
|
amount: number;
|
|
414
481
|
}): Promise<any>;
|
|
415
|
-
|
|
482
|
+
placeMarketOrder(payload: {
|
|
416
483
|
symbol: string;
|
|
417
484
|
kind: "long" | "short";
|
|
418
485
|
quantity: number;
|
|
@@ -431,7 +498,7 @@ declare abstract class BaseExchange {
|
|
|
431
498
|
abstract getOpenOrders(payload: {
|
|
432
499
|
symbol: string;
|
|
433
500
|
}): Promise<any>;
|
|
434
|
-
|
|
501
|
+
placeBadStopEntry(payload: {
|
|
435
502
|
symbol: string;
|
|
436
503
|
orders: Order$1[];
|
|
437
504
|
price_places?: string;
|
|
@@ -440,6 +507,14 @@ declare abstract class BaseExchange {
|
|
|
440
507
|
analyzeCandlesticks(payload: {
|
|
441
508
|
symbol: string;
|
|
442
509
|
}): Promise<CandlestickAnalysisResult>;
|
|
510
|
+
setAccountDetails(payload: {
|
|
511
|
+
getCredentials: (owner: string) => {
|
|
512
|
+
api_key: string;
|
|
513
|
+
api_secret: string;
|
|
514
|
+
email: string;
|
|
515
|
+
};
|
|
516
|
+
proxyAgent?: any;
|
|
517
|
+
}): void;
|
|
443
518
|
}
|
|
444
519
|
declare function initPocketBaseClient(proxy_credentials: {
|
|
445
520
|
host: string;
|
|
@@ -2251,11 +2326,15 @@ declare class ExchangeAccount$1 {
|
|
|
2251
2326
|
declare function getExchangeAccount(payload: {
|
|
2252
2327
|
account: ExchangeType;
|
|
2253
2328
|
app_db: AppDatabase;
|
|
2254
|
-
getCredentials: (
|
|
2329
|
+
getCredentials: (payload: {
|
|
2330
|
+
account: string;
|
|
2331
|
+
exchange: string;
|
|
2332
|
+
app_db: AppDatabase;
|
|
2333
|
+
}) => Promise<{
|
|
2255
2334
|
api_key: string;
|
|
2256
2335
|
api_secret: string;
|
|
2257
2336
|
email: string;
|
|
2258
|
-
}
|
|
2337
|
+
}>;
|
|
2259
2338
|
proxyOptions?: {
|
|
2260
2339
|
proxy?: any;
|
|
2261
2340
|
ignore_proxy?: boolean;
|
|
@@ -2270,11 +2349,14 @@ declare class App {
|
|
|
2270
2349
|
canWithdraw?: boolean;
|
|
2271
2350
|
};
|
|
2272
2351
|
private getCredentials;
|
|
2273
|
-
constructor(app_db: AppDatabase, getCredentials: (
|
|
2352
|
+
constructor(app_db: AppDatabase, getCredentials: (payload: {
|
|
2353
|
+
account: string;
|
|
2354
|
+
exchange: string;
|
|
2355
|
+
}) => Promise<{
|
|
2274
2356
|
api_key: string;
|
|
2275
2357
|
api_secret: string;
|
|
2276
2358
|
email: string;
|
|
2277
|
-
}
|
|
2359
|
+
}>, proxyOptions?: {
|
|
2278
2360
|
proxy?: any;
|
|
2279
2361
|
ignore_proxy?: boolean;
|
|
2280
2362
|
canWithdraw?: boolean;
|
|
@@ -2491,21 +2573,25 @@ export declare function initApp(payload: {
|
|
|
2491
2573
|
password?: string;
|
|
2492
2574
|
salt?: string;
|
|
2493
2575
|
email?: string;
|
|
2494
|
-
getCredentials: (
|
|
2576
|
+
getCredentials: (payload: {
|
|
2577
|
+
account: string;
|
|
2578
|
+
exchange: string;
|
|
2579
|
+
app_db: AppDatabase;
|
|
2580
|
+
}) => Promise<{
|
|
2495
2581
|
api_key: string;
|
|
2496
2582
|
api_secret: string;
|
|
2497
2583
|
email: string;
|
|
2498
|
-
}
|
|
2584
|
+
}>;
|
|
2499
2585
|
proxy?: any;
|
|
2500
2586
|
ignore_proxy?: boolean;
|
|
2501
2587
|
canWithdraw?: boolean;
|
|
2502
2588
|
triggerToken?: string;
|
|
2503
2589
|
}): Promise<App>;
|
|
2504
|
-
declare function getCredentials(
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
}
|
|
2590
|
+
declare function getCredentials(payload: {
|
|
2591
|
+
account: string;
|
|
2592
|
+
exchange: string;
|
|
2593
|
+
app_db: AppDatabase;
|
|
2594
|
+
}): Promise<any>;
|
|
2509
2595
|
export declare function initialize(payload: {
|
|
2510
2596
|
password?: string;
|
|
2511
2597
|
proxy?: any;
|