@gbozee/ultimate 0.0.2-113 → 0.0.2-115
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 +335 -350
- package/dist/index.d.ts +91 -16
- package/dist/index.js +335 -350
- package/dist/mcp-server.cjs +335 -350
- package/dist/mcp-server.js +335 -350
- 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;
|