@pear-protocol/core-sdk 0.0.15 → 0.0.17
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/core/index.d.ts +66 -63
- package/package.json +3 -3
package/dist/core/index.d.ts
CHANGED
|
@@ -10,13 +10,14 @@ declare class Core {
|
|
|
10
10
|
accounts: {
|
|
11
11
|
id: string;
|
|
12
12
|
alias: string;
|
|
13
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
13
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
14
14
|
exchangeIdentifier: string;
|
|
15
15
|
createdAt: string;
|
|
16
16
|
updatedAt: string;
|
|
17
17
|
metadata?: {
|
|
18
18
|
agentWalletAddress: string;
|
|
19
19
|
isSubaccount: boolean;
|
|
20
|
+
mainAccountAddress: string;
|
|
20
21
|
} | undefined;
|
|
21
22
|
deletedAt?: string | undefined;
|
|
22
23
|
}[];
|
|
@@ -25,13 +26,14 @@ declare class Core {
|
|
|
25
26
|
account: {
|
|
26
27
|
id: string;
|
|
27
28
|
alias: string;
|
|
28
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
29
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
29
30
|
exchangeIdentifier: string;
|
|
30
31
|
createdAt: string;
|
|
31
32
|
updatedAt: string;
|
|
32
33
|
metadata?: {
|
|
33
34
|
agentWalletAddress: string;
|
|
34
35
|
isSubaccount: boolean;
|
|
36
|
+
mainAccountAddress: string;
|
|
35
37
|
} | undefined;
|
|
36
38
|
deletedAt?: string | undefined;
|
|
37
39
|
};
|
|
@@ -40,13 +42,14 @@ declare class Core {
|
|
|
40
42
|
account: {
|
|
41
43
|
id: string;
|
|
42
44
|
alias: string;
|
|
43
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
45
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
44
46
|
exchangeIdentifier: string;
|
|
45
47
|
createdAt: string;
|
|
46
48
|
updatedAt: string;
|
|
47
49
|
metadata?: {
|
|
48
50
|
agentWalletAddress: string;
|
|
49
51
|
isSubaccount: boolean;
|
|
52
|
+
mainAccountAddress: string;
|
|
50
53
|
} | undefined;
|
|
51
54
|
deletedAt?: string | undefined;
|
|
52
55
|
};
|
|
@@ -91,7 +94,7 @@ declare class Core {
|
|
|
91
94
|
nextCursor: string | undefined;
|
|
92
95
|
executions: ({
|
|
93
96
|
id: string;
|
|
94
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
97
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
95
98
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
96
99
|
createdAt: string;
|
|
97
100
|
updatedAt: string;
|
|
@@ -113,7 +116,7 @@ declare class Core {
|
|
|
113
116
|
error?: string | undefined;
|
|
114
117
|
orders?: {
|
|
115
118
|
id: string;
|
|
116
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
119
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
117
120
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
118
121
|
createdAt: string;
|
|
119
122
|
updatedAt: string;
|
|
@@ -130,7 +133,7 @@ declare class Core {
|
|
|
130
133
|
}[] | undefined;
|
|
131
134
|
} | {
|
|
132
135
|
id: string;
|
|
133
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
136
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
134
137
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
135
138
|
createdAt: string;
|
|
136
139
|
updatedAt: string;
|
|
@@ -156,7 +159,7 @@ declare class Core {
|
|
|
156
159
|
error?: string | undefined;
|
|
157
160
|
orders?: {
|
|
158
161
|
id: string;
|
|
159
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
162
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
160
163
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
161
164
|
createdAt: string;
|
|
162
165
|
updatedAt: string;
|
|
@@ -173,7 +176,7 @@ declare class Core {
|
|
|
173
176
|
}[] | undefined;
|
|
174
177
|
} | {
|
|
175
178
|
id: string;
|
|
176
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
179
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
177
180
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
178
181
|
createdAt: string;
|
|
179
182
|
updatedAt: string;
|
|
@@ -186,7 +189,7 @@ declare class Core {
|
|
|
186
189
|
error?: string | undefined;
|
|
187
190
|
orders?: {
|
|
188
191
|
id: string;
|
|
189
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
192
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
190
193
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
191
194
|
createdAt: string;
|
|
192
195
|
updatedAt: string;
|
|
@@ -211,7 +214,7 @@ declare class Core {
|
|
|
211
214
|
tradeAccountId: string;
|
|
212
215
|
symbol: string;
|
|
213
216
|
positionId: string;
|
|
214
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
217
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
215
218
|
side: "BUY" | "SELL";
|
|
216
219
|
reduceOnly: boolean;
|
|
217
220
|
quantity: string;
|
|
@@ -230,7 +233,7 @@ declare class Core {
|
|
|
230
233
|
tradeAccountId: string;
|
|
231
234
|
symbol: string;
|
|
232
235
|
positionId: string;
|
|
233
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
236
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
234
237
|
side: "BUY" | "SELL";
|
|
235
238
|
reduceOnly: boolean;
|
|
236
239
|
quantity: string;
|
|
@@ -256,7 +259,7 @@ declare class Core {
|
|
|
256
259
|
id: string;
|
|
257
260
|
base: string;
|
|
258
261
|
quote: string;
|
|
259
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
262
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
260
263
|
type: "spot" | "perp" | "hip3";
|
|
261
264
|
leverage: number;
|
|
262
265
|
precision: {
|
|
@@ -283,7 +286,7 @@ declare class Core {
|
|
|
283
286
|
positions: {
|
|
284
287
|
id: string;
|
|
285
288
|
tradeAccountId: string;
|
|
286
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
289
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
287
290
|
status: "OPEN" | "CLOSED";
|
|
288
291
|
exposure: Record<string, string>;
|
|
289
292
|
initialExposureUSD: Record<string, string>;
|
|
@@ -306,7 +309,7 @@ declare class Core {
|
|
|
306
309
|
nextCursor: string | undefined;
|
|
307
310
|
schedules: ({
|
|
308
311
|
id: string;
|
|
309
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
312
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
310
313
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "FAILED";
|
|
311
314
|
positionKey: string;
|
|
312
315
|
executionType: "MARKET";
|
|
@@ -333,7 +336,7 @@ declare class Core {
|
|
|
333
336
|
tradeAccountId: string;
|
|
334
337
|
symbol: string;
|
|
335
338
|
positionId: string;
|
|
336
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
339
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
337
340
|
side: "BUY" | "SELL";
|
|
338
341
|
reduceOnly: boolean;
|
|
339
342
|
quantity: string;
|
|
@@ -345,7 +348,7 @@ declare class Core {
|
|
|
345
348
|
}[] | undefined;
|
|
346
349
|
} | {
|
|
347
350
|
id: string;
|
|
348
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
351
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
349
352
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "FAILED";
|
|
350
353
|
positionKey: string;
|
|
351
354
|
executionType: "MARKET";
|
|
@@ -370,7 +373,7 @@ declare class Core {
|
|
|
370
373
|
tradeAccountId: string;
|
|
371
374
|
symbol: string;
|
|
372
375
|
positionId: string;
|
|
373
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
376
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
374
377
|
side: "BUY" | "SELL";
|
|
375
378
|
reduceOnly: boolean;
|
|
376
379
|
quantity: string;
|
|
@@ -385,7 +388,7 @@ declare class Core {
|
|
|
385
388
|
create: (body: HttpTypes.CreateSchedule, headers?: ClientHeaders) => Promise<{
|
|
386
389
|
schedule: {
|
|
387
390
|
id: string;
|
|
388
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
391
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
389
392
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "FAILED";
|
|
390
393
|
positionKey: string;
|
|
391
394
|
executionType: "MARKET";
|
|
@@ -412,7 +415,7 @@ declare class Core {
|
|
|
412
415
|
tradeAccountId: string;
|
|
413
416
|
symbol: string;
|
|
414
417
|
positionId: string;
|
|
415
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
418
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
416
419
|
side: "BUY" | "SELL";
|
|
417
420
|
reduceOnly: boolean;
|
|
418
421
|
quantity: string;
|
|
@@ -424,7 +427,7 @@ declare class Core {
|
|
|
424
427
|
}[] | undefined;
|
|
425
428
|
} | {
|
|
426
429
|
id: string;
|
|
427
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
430
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
428
431
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "FAILED";
|
|
429
432
|
positionKey: string;
|
|
430
433
|
executionType: "MARKET";
|
|
@@ -449,7 +452,7 @@ declare class Core {
|
|
|
449
452
|
tradeAccountId: string;
|
|
450
453
|
symbol: string;
|
|
451
454
|
positionId: string;
|
|
452
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
455
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
453
456
|
side: "BUY" | "SELL";
|
|
454
457
|
reduceOnly: boolean;
|
|
455
458
|
quantity: string;
|
|
@@ -472,7 +475,7 @@ declare class Core {
|
|
|
472
475
|
open: (body: HttpTypes.CreateTradeOpen, headers?: ClientHeaders) => Promise<{
|
|
473
476
|
execution: {
|
|
474
477
|
id: string;
|
|
475
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
478
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
476
479
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
477
480
|
createdAt: string;
|
|
478
481
|
updatedAt: string;
|
|
@@ -494,7 +497,7 @@ declare class Core {
|
|
|
494
497
|
error?: string | undefined;
|
|
495
498
|
orders?: {
|
|
496
499
|
id: string;
|
|
497
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
500
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
498
501
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
499
502
|
createdAt: string;
|
|
500
503
|
updatedAt: string;
|
|
@@ -511,7 +514,7 @@ declare class Core {
|
|
|
511
514
|
}[] | undefined;
|
|
512
515
|
} | {
|
|
513
516
|
id: string;
|
|
514
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
517
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
515
518
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
516
519
|
createdAt: string;
|
|
517
520
|
updatedAt: string;
|
|
@@ -537,7 +540,7 @@ declare class Core {
|
|
|
537
540
|
error?: string | undefined;
|
|
538
541
|
orders?: {
|
|
539
542
|
id: string;
|
|
540
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
543
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
541
544
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
542
545
|
createdAt: string;
|
|
543
546
|
updatedAt: string;
|
|
@@ -554,7 +557,7 @@ declare class Core {
|
|
|
554
557
|
}[] | undefined;
|
|
555
558
|
} | {
|
|
556
559
|
id: string;
|
|
557
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
560
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
558
561
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
559
562
|
createdAt: string;
|
|
560
563
|
updatedAt: string;
|
|
@@ -567,7 +570,7 @@ declare class Core {
|
|
|
567
570
|
error?: string | undefined;
|
|
568
571
|
orders?: {
|
|
569
572
|
id: string;
|
|
570
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
573
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
571
574
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
572
575
|
createdAt: string;
|
|
573
576
|
updatedAt: string;
|
|
@@ -587,7 +590,7 @@ declare class Core {
|
|
|
587
590
|
adjust: (positionId: string, body: HttpTypes.CreateTradeAdjust, headers?: ClientHeaders) => Promise<{
|
|
588
591
|
execution: {
|
|
589
592
|
id: string;
|
|
590
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
593
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
591
594
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
592
595
|
createdAt: string;
|
|
593
596
|
updatedAt: string;
|
|
@@ -609,7 +612,7 @@ declare class Core {
|
|
|
609
612
|
error?: string | undefined;
|
|
610
613
|
orders?: {
|
|
611
614
|
id: string;
|
|
612
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
615
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
613
616
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
614
617
|
createdAt: string;
|
|
615
618
|
updatedAt: string;
|
|
@@ -626,7 +629,7 @@ declare class Core {
|
|
|
626
629
|
}[] | undefined;
|
|
627
630
|
} | {
|
|
628
631
|
id: string;
|
|
629
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
632
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
630
633
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
631
634
|
createdAt: string;
|
|
632
635
|
updatedAt: string;
|
|
@@ -652,7 +655,7 @@ declare class Core {
|
|
|
652
655
|
error?: string | undefined;
|
|
653
656
|
orders?: {
|
|
654
657
|
id: string;
|
|
655
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
658
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
656
659
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
657
660
|
createdAt: string;
|
|
658
661
|
updatedAt: string;
|
|
@@ -669,7 +672,7 @@ declare class Core {
|
|
|
669
672
|
}[] | undefined;
|
|
670
673
|
} | {
|
|
671
674
|
id: string;
|
|
672
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
675
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
673
676
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
674
677
|
createdAt: string;
|
|
675
678
|
updatedAt: string;
|
|
@@ -682,7 +685,7 @@ declare class Core {
|
|
|
682
685
|
error?: string | undefined;
|
|
683
686
|
orders?: {
|
|
684
687
|
id: string;
|
|
685
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
688
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
686
689
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
687
690
|
createdAt: string;
|
|
688
691
|
updatedAt: string;
|
|
@@ -702,7 +705,7 @@ declare class Core {
|
|
|
702
705
|
close: (positionId: string, body: HttpTypes.CreateTradeClose, headers?: ClientHeaders) => Promise<{
|
|
703
706
|
execution: {
|
|
704
707
|
id: string;
|
|
705
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
708
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
706
709
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
707
710
|
createdAt: string;
|
|
708
711
|
updatedAt: string;
|
|
@@ -724,7 +727,7 @@ declare class Core {
|
|
|
724
727
|
error?: string | undefined;
|
|
725
728
|
orders?: {
|
|
726
729
|
id: string;
|
|
727
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
730
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
728
731
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
729
732
|
createdAt: string;
|
|
730
733
|
updatedAt: string;
|
|
@@ -741,7 +744,7 @@ declare class Core {
|
|
|
741
744
|
}[] | undefined;
|
|
742
745
|
} | {
|
|
743
746
|
id: string;
|
|
744
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
747
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
745
748
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
746
749
|
createdAt: string;
|
|
747
750
|
updatedAt: string;
|
|
@@ -767,7 +770,7 @@ declare class Core {
|
|
|
767
770
|
error?: string | undefined;
|
|
768
771
|
orders?: {
|
|
769
772
|
id: string;
|
|
770
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
773
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
771
774
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
772
775
|
createdAt: string;
|
|
773
776
|
updatedAt: string;
|
|
@@ -784,7 +787,7 @@ declare class Core {
|
|
|
784
787
|
}[] | undefined;
|
|
785
788
|
} | {
|
|
786
789
|
id: string;
|
|
787
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
790
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
788
791
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
789
792
|
createdAt: string;
|
|
790
793
|
updatedAt: string;
|
|
@@ -797,7 +800,7 @@ declare class Core {
|
|
|
797
800
|
error?: string | undefined;
|
|
798
801
|
orders?: {
|
|
799
802
|
id: string;
|
|
800
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
803
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
801
804
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
802
805
|
createdAt: string;
|
|
803
806
|
updatedAt: string;
|
|
@@ -817,7 +820,7 @@ declare class Core {
|
|
|
817
820
|
closeAll: (body: HttpTypes.CreateTradeCloseAll, headers?: ClientHeaders) => Promise<{
|
|
818
821
|
executions: ({
|
|
819
822
|
id: string;
|
|
820
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
823
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
821
824
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
822
825
|
createdAt: string;
|
|
823
826
|
updatedAt: string;
|
|
@@ -839,7 +842,7 @@ declare class Core {
|
|
|
839
842
|
error?: string | undefined;
|
|
840
843
|
orders?: {
|
|
841
844
|
id: string;
|
|
842
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
845
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
843
846
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
844
847
|
createdAt: string;
|
|
845
848
|
updatedAt: string;
|
|
@@ -856,7 +859,7 @@ declare class Core {
|
|
|
856
859
|
}[] | undefined;
|
|
857
860
|
} | {
|
|
858
861
|
id: string;
|
|
859
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
862
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
860
863
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
861
864
|
createdAt: string;
|
|
862
865
|
updatedAt: string;
|
|
@@ -882,7 +885,7 @@ declare class Core {
|
|
|
882
885
|
error?: string | undefined;
|
|
883
886
|
orders?: {
|
|
884
887
|
id: string;
|
|
885
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
888
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
886
889
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
887
890
|
createdAt: string;
|
|
888
891
|
updatedAt: string;
|
|
@@ -899,7 +902,7 @@ declare class Core {
|
|
|
899
902
|
}[] | undefined;
|
|
900
903
|
} | {
|
|
901
904
|
id: string;
|
|
902
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
905
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
903
906
|
status: "CANCELLED" | "ACTIVE" | "COMPLETED" | "IDLE" | "FAILED";
|
|
904
907
|
createdAt: string;
|
|
905
908
|
updatedAt: string;
|
|
@@ -912,7 +915,7 @@ declare class Core {
|
|
|
912
915
|
error?: string | undefined;
|
|
913
916
|
orders?: {
|
|
914
917
|
id: string;
|
|
915
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
918
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
916
919
|
status: "CANCELLED" | "PENDING" | "PARTIAL" | "FILLED" | "REJECTED";
|
|
917
920
|
createdAt: string;
|
|
918
921
|
updatedAt: string;
|
|
@@ -938,7 +941,7 @@ declare class Core {
|
|
|
938
941
|
triggers: ({
|
|
939
942
|
id: string;
|
|
940
943
|
tradeAccountId: string;
|
|
941
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
944
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
942
945
|
status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
|
|
943
946
|
createdAt: string;
|
|
944
947
|
updatedAt: string;
|
|
@@ -1007,7 +1010,7 @@ declare class Core {
|
|
|
1007
1010
|
tradeAccountId: string;
|
|
1008
1011
|
symbol: string;
|
|
1009
1012
|
positionId: string;
|
|
1010
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1013
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1011
1014
|
side: "BUY" | "SELL";
|
|
1012
1015
|
reduceOnly: boolean;
|
|
1013
1016
|
quantity: string;
|
|
@@ -1021,7 +1024,7 @@ declare class Core {
|
|
|
1021
1024
|
} | {
|
|
1022
1025
|
id: string;
|
|
1023
1026
|
tradeAccountId: string;
|
|
1024
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1027
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1025
1028
|
status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
|
|
1026
1029
|
createdAt: string;
|
|
1027
1030
|
updatedAt: string;
|
|
@@ -1117,7 +1120,7 @@ declare class Core {
|
|
|
1117
1120
|
tradeAccountId: string;
|
|
1118
1121
|
symbol: string;
|
|
1119
1122
|
positionId: string;
|
|
1120
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1123
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1121
1124
|
side: "BUY" | "SELL";
|
|
1122
1125
|
reduceOnly: boolean;
|
|
1123
1126
|
quantity: string;
|
|
@@ -1131,7 +1134,7 @@ declare class Core {
|
|
|
1131
1134
|
} | {
|
|
1132
1135
|
id: string;
|
|
1133
1136
|
tradeAccountId: string;
|
|
1134
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1137
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1135
1138
|
status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
|
|
1136
1139
|
createdAt: string;
|
|
1137
1140
|
updatedAt: string;
|
|
@@ -1214,7 +1217,7 @@ declare class Core {
|
|
|
1214
1217
|
tradeAccountId: string;
|
|
1215
1218
|
symbol: string;
|
|
1216
1219
|
positionId: string;
|
|
1217
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1220
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1218
1221
|
side: "BUY" | "SELL";
|
|
1219
1222
|
reduceOnly: boolean;
|
|
1220
1223
|
quantity: string;
|
|
@@ -1231,7 +1234,7 @@ declare class Core {
|
|
|
1231
1234
|
trigger: {
|
|
1232
1235
|
id: string;
|
|
1233
1236
|
tradeAccountId: string;
|
|
1234
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1237
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1235
1238
|
status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
|
|
1236
1239
|
createdAt: string;
|
|
1237
1240
|
updatedAt: string;
|
|
@@ -1300,7 +1303,7 @@ declare class Core {
|
|
|
1300
1303
|
tradeAccountId: string;
|
|
1301
1304
|
symbol: string;
|
|
1302
1305
|
positionId: string;
|
|
1303
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1306
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1304
1307
|
side: "BUY" | "SELL";
|
|
1305
1308
|
reduceOnly: boolean;
|
|
1306
1309
|
quantity: string;
|
|
@@ -1314,7 +1317,7 @@ declare class Core {
|
|
|
1314
1317
|
} | {
|
|
1315
1318
|
id: string;
|
|
1316
1319
|
tradeAccountId: string;
|
|
1317
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1320
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1318
1321
|
status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
|
|
1319
1322
|
createdAt: string;
|
|
1320
1323
|
updatedAt: string;
|
|
@@ -1410,7 +1413,7 @@ declare class Core {
|
|
|
1410
1413
|
tradeAccountId: string;
|
|
1411
1414
|
symbol: string;
|
|
1412
1415
|
positionId: string;
|
|
1413
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1416
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1414
1417
|
side: "BUY" | "SELL";
|
|
1415
1418
|
reduceOnly: boolean;
|
|
1416
1419
|
quantity: string;
|
|
@@ -1424,7 +1427,7 @@ declare class Core {
|
|
|
1424
1427
|
} | {
|
|
1425
1428
|
id: string;
|
|
1426
1429
|
tradeAccountId: string;
|
|
1427
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1430
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1428
1431
|
status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
|
|
1429
1432
|
createdAt: string;
|
|
1430
1433
|
updatedAt: string;
|
|
@@ -1507,7 +1510,7 @@ declare class Core {
|
|
|
1507
1510
|
tradeAccountId: string;
|
|
1508
1511
|
symbol: string;
|
|
1509
1512
|
positionId: string;
|
|
1510
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1513
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1511
1514
|
side: "BUY" | "SELL";
|
|
1512
1515
|
reduceOnly: boolean;
|
|
1513
1516
|
quantity: string;
|
|
@@ -1524,7 +1527,7 @@ declare class Core {
|
|
|
1524
1527
|
trigger: {
|
|
1525
1528
|
id: string;
|
|
1526
1529
|
tradeAccountId: string;
|
|
1527
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1530
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1528
1531
|
status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
|
|
1529
1532
|
createdAt: string;
|
|
1530
1533
|
updatedAt: string;
|
|
@@ -1593,7 +1596,7 @@ declare class Core {
|
|
|
1593
1596
|
tradeAccountId: string;
|
|
1594
1597
|
symbol: string;
|
|
1595
1598
|
positionId: string;
|
|
1596
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1599
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1597
1600
|
side: "BUY" | "SELL";
|
|
1598
1601
|
reduceOnly: boolean;
|
|
1599
1602
|
quantity: string;
|
|
@@ -1607,7 +1610,7 @@ declare class Core {
|
|
|
1607
1610
|
} | {
|
|
1608
1611
|
id: string;
|
|
1609
1612
|
tradeAccountId: string;
|
|
1610
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1613
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1611
1614
|
status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
|
|
1612
1615
|
createdAt: string;
|
|
1613
1616
|
updatedAt: string;
|
|
@@ -1703,7 +1706,7 @@ declare class Core {
|
|
|
1703
1706
|
tradeAccountId: string;
|
|
1704
1707
|
symbol: string;
|
|
1705
1708
|
positionId: string;
|
|
1706
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1709
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1707
1710
|
side: "BUY" | "SELL";
|
|
1708
1711
|
reduceOnly: boolean;
|
|
1709
1712
|
quantity: string;
|
|
@@ -1717,7 +1720,7 @@ declare class Core {
|
|
|
1717
1720
|
} | {
|
|
1718
1721
|
id: string;
|
|
1719
1722
|
tradeAccountId: string;
|
|
1720
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1723
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1721
1724
|
status: "CANCELLED" | "ACTIVE" | "TRIGGERED";
|
|
1722
1725
|
createdAt: string;
|
|
1723
1726
|
updatedAt: string;
|
|
@@ -1800,7 +1803,7 @@ declare class Core {
|
|
|
1800
1803
|
tradeAccountId: string;
|
|
1801
1804
|
symbol: string;
|
|
1802
1805
|
positionId: string;
|
|
1803
|
-
connector: "hyperliquid" | "binance" | "bybit" | "okx";
|
|
1806
|
+
connector: "hyperliquid" | "binance" | "bybit" | "okx" | "lighter";
|
|
1804
1807
|
side: "BUY" | "SELL";
|
|
1805
1808
|
reduceOnly: boolean;
|
|
1806
1809
|
quantity: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pear-protocol/core-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"description": "Pear Protocol Core SDK",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -25,8 +25,8 @@
|
|
|
25
25
|
"typecheck": "tsc --noEmit"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@pear-protocol/types": "0.0.
|
|
29
|
-
"@pear-protocol/utils": "0.0.
|
|
28
|
+
"@pear-protocol/types": "0.0.15",
|
|
29
|
+
"@pear-protocol/utils": "0.0.15",
|
|
30
30
|
"qs": "^6.14.0"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|