@pear-protocol/types 2.23.0 → 2.25.0
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/copy/entities.d.ts +162 -10
- package/dist/copy/responses.d.ts +96 -11
- package/dist/execution/entities.d.ts +260 -43
- package/dist/execution/queries.d.ts +3 -2
- package/dist/execution/responses.d.ts +144 -24
- package/dist/fill/entities.d.ts +60 -1
- package/dist/fill/queries.d.ts +1 -0
- package/dist/fill/responses.d.ts +34 -4
- package/dist/index.js +743 -411
- package/dist/ladder/entities.d.ts +141 -24
- package/dist/ladder/payloads.d.ts +60 -24
- package/dist/ladder/queries.d.ts +2 -2
- package/dist/ladder/responses.d.ts +420 -69
- package/dist/leverage/payloads.d.ts +6 -1
- package/dist/notification/entities.d.ts +209 -7
- package/dist/notification/responses.d.ts +99 -2
- package/dist/order/entities.d.ts +3 -3
- package/dist/position/entities.d.ts +5 -5
- package/dist/position/responses.d.ts +4 -4
- package/dist/realtime/frames.d.ts +38 -6
- package/dist/realtime/public-events.d.ts +19 -3
- package/dist/rewards/entities.d.ts +18 -0
- package/dist/rewards/index.d.ts +1 -0
- package/dist/rewards/queries.d.ts +7 -0
- package/dist/rewards/responses.d.ts +52 -0
- package/dist/schedule/entities.d.ts +155 -19
- package/dist/schedule/index.d.ts +1 -0
- package/dist/schedule/queries.d.ts +3 -2
- package/dist/schedule/responses.d.ts +142 -19
- package/dist/sync/payloads.d.ts +56 -88
- package/dist/tca/responses.d.ts +12 -12
- package/dist/trade/payloads.d.ts +60 -24
- package/dist/trade/responses.d.ts +360 -60
- package/dist/traders/performance.d.ts +4 -0
- package/dist/traders/public.d.ts +537 -285
- package/dist/trigger/common/index.d.ts +8 -2
- package/dist/trigger/entities/conditions.d.ts +40 -0
- package/dist/trigger/entities/index.d.ts +339 -32
- package/dist/trigger/payloads/conditions.d.ts +70 -38
- package/dist/trigger/payloads/index.d.ts +408 -216
- package/dist/trigger/queries.d.ts +2 -2
- package/dist/trigger/responses.d.ts +218 -20
- package/dist/users/entities.d.ts +1 -0
- package/dist/users/payloads.d.ts +1 -0
- package/dist/users/response.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
export declare const LadderStatus: z.ZodEnum<{
|
|
3
3
|
ACTIVE: "ACTIVE";
|
|
4
|
-
CANCELLED: "CANCELLED";
|
|
5
4
|
COMPLETED: "COMPLETED";
|
|
5
|
+
CANCELLED: "CANCELLED";
|
|
6
6
|
}>;
|
|
7
7
|
export type LadderStatus = z.infer<typeof LadderStatus>;
|
|
8
8
|
export declare const Ladder: z.ZodObject<{
|
|
@@ -24,8 +24,8 @@ export declare const Ladder: z.ZodObject<{
|
|
|
24
24
|
}, z.core.$strip>;
|
|
25
25
|
status: z.ZodEnum<{
|
|
26
26
|
ACTIVE: "ACTIVE";
|
|
27
|
-
CANCELLED: "CANCELLED";
|
|
28
27
|
COMPLETED: "COMPLETED";
|
|
28
|
+
CANCELLED: "CANCELLED";
|
|
29
29
|
}>;
|
|
30
30
|
attachTriggers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
31
31
|
intent: z.ZodLiteral<"CLOSE">;
|
|
@@ -34,6 +34,7 @@ export declare const Ladder: z.ZodObject<{
|
|
|
34
34
|
STOP_LOSS: "STOP_LOSS";
|
|
35
35
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
36
36
|
}>;
|
|
37
|
+
closePercent: z.ZodOptional<z.ZodNumber>;
|
|
37
38
|
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
38
39
|
type: z.ZodLiteral<"notional">;
|
|
39
40
|
data: z.ZodObject<{
|
|
@@ -42,8 +43,12 @@ export declare const Ladder: z.ZodObject<{
|
|
|
42
43
|
mark: "mark";
|
|
43
44
|
}>;
|
|
44
45
|
threshold: z.ZodNumber;
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
onPositionResize: z.ZodDefault<z.ZodEnum<{
|
|
47
|
+
cancel: "cancel";
|
|
48
|
+
keep: "keep";
|
|
49
|
+
}>>;
|
|
50
|
+
}, z.core.$strict>;
|
|
51
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
47
52
|
type: z.ZodLiteral<"upnl">;
|
|
48
53
|
data: z.ZodObject<{
|
|
49
54
|
priceSource: z.ZodEnum<{
|
|
@@ -51,8 +56,12 @@ export declare const Ladder: z.ZodObject<{
|
|
|
51
56
|
mark: "mark";
|
|
52
57
|
}>;
|
|
53
58
|
threshold: z.ZodNumber;
|
|
54
|
-
|
|
55
|
-
|
|
59
|
+
onPositionResize: z.ZodDefault<z.ZodEnum<{
|
|
60
|
+
cancel: "cancel";
|
|
61
|
+
keep: "keep";
|
|
62
|
+
}>>;
|
|
63
|
+
}, z.core.$strict>;
|
|
64
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
56
65
|
type: z.ZodLiteral<"upnl_bps">;
|
|
57
66
|
data: z.ZodObject<{
|
|
58
67
|
priceSource: z.ZodEnum<{
|
|
@@ -60,11 +69,12 @@ export declare const Ladder: z.ZodObject<{
|
|
|
60
69
|
mark: "mark";
|
|
61
70
|
}>;
|
|
62
71
|
threshold: z.ZodNumber;
|
|
63
|
-
}, z.core.$
|
|
64
|
-
}, z.core.$
|
|
72
|
+
}, z.core.$strict>;
|
|
73
|
+
}, z.core.$strict>], "type">;
|
|
65
74
|
}, z.core.$strip>, z.ZodObject<{
|
|
66
75
|
intent: z.ZodLiteral<"CLOSE">;
|
|
67
76
|
type: z.ZodLiteral<"MARKET">;
|
|
77
|
+
closePercent: z.ZodOptional<z.ZodNumber>;
|
|
68
78
|
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
69
79
|
type: z.ZodLiteral<"notional_trailing">;
|
|
70
80
|
data: z.ZodObject<{
|
|
@@ -72,24 +82,32 @@ export declare const Ladder: z.ZodObject<{
|
|
|
72
82
|
mid: "mid";
|
|
73
83
|
mark: "mark";
|
|
74
84
|
}>;
|
|
75
|
-
|
|
76
|
-
|
|
85
|
+
onPositionResize: z.ZodDefault<z.ZodEnum<{
|
|
86
|
+
cancel: "cancel";
|
|
87
|
+
keep: "keep";
|
|
88
|
+
}>>;
|
|
89
|
+
}, z.core.$strict>;
|
|
90
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
77
91
|
type: z.ZodLiteral<"upnl_trailing">;
|
|
78
92
|
data: z.ZodObject<{
|
|
79
93
|
priceSource: z.ZodEnum<{
|
|
80
94
|
mid: "mid";
|
|
81
95
|
mark: "mark";
|
|
82
96
|
}>;
|
|
83
|
-
|
|
84
|
-
|
|
97
|
+
onPositionResize: z.ZodDefault<z.ZodEnum<{
|
|
98
|
+
cancel: "cancel";
|
|
99
|
+
keep: "keep";
|
|
100
|
+
}>>;
|
|
101
|
+
}, z.core.$strict>;
|
|
102
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
85
103
|
type: z.ZodLiteral<"upnl_bps_trailing">;
|
|
86
104
|
data: z.ZodObject<{
|
|
87
105
|
priceSource: z.ZodEnum<{
|
|
88
106
|
mid: "mid";
|
|
89
107
|
mark: "mark";
|
|
90
108
|
}>;
|
|
91
|
-
}, z.core.$
|
|
92
|
-
}, z.core.$
|
|
109
|
+
}, z.core.$strict>;
|
|
110
|
+
}, z.core.$strict>], "type">;
|
|
93
111
|
trailing: z.ZodObject<{
|
|
94
112
|
mode: z.ZodEnum<{
|
|
95
113
|
RELATIVE_BPS: "RELATIVE_BPS";
|
|
@@ -121,12 +139,13 @@ export declare const Ladder: z.ZodObject<{
|
|
|
121
139
|
triggeredAt: z.ZodOptional<z.ZodString>;
|
|
122
140
|
cancelledAt: z.ZodOptional<z.ZodString>;
|
|
123
141
|
cancelledReason: z.ZodOptional<z.ZodEnum<{
|
|
124
|
-
USER: "USER";
|
|
125
142
|
POSITION_CLOSED: "POSITION_CLOSED";
|
|
143
|
+
USER: "USER";
|
|
126
144
|
SYSTEM: "SYSTEM";
|
|
127
145
|
POSITION_NETTED: "POSITION_NETTED";
|
|
128
146
|
POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
|
|
129
147
|
POSITION_REVERSED: "POSITION_REVERSED";
|
|
148
|
+
POSITION_RESIZED: "POSITION_RESIZED";
|
|
130
149
|
}>>;
|
|
131
150
|
fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
132
151
|
id: z.ZodUUID;
|
|
@@ -139,7 +158,9 @@ export declare const Ladder: z.ZodObject<{
|
|
|
139
158
|
}>;
|
|
140
159
|
tradeAccountId: z.ZodUUID;
|
|
141
160
|
symbol: z.ZodString;
|
|
142
|
-
|
|
161
|
+
executionId: z.ZodOptional<z.ZodUUID>;
|
|
162
|
+
scheduleId: z.ZodOptional<z.ZodUUID>;
|
|
163
|
+
triggerId: z.ZodOptional<z.ZodUUID>;
|
|
143
164
|
connector: z.ZodEnum<{
|
|
144
165
|
hyperliquid: "hyperliquid";
|
|
145
166
|
binance: "binance";
|
|
@@ -165,6 +186,13 @@ export declare const Ladder: z.ZodObject<{
|
|
|
165
186
|
exchangeFillId: z.ZodString;
|
|
166
187
|
quantity: z.ZodString;
|
|
167
188
|
}, z.core.$strip>>;
|
|
189
|
+
assignments: z.ZodArray<z.ZodObject<{
|
|
190
|
+
positionId: z.ZodUUID;
|
|
191
|
+
quantity: z.ZodString;
|
|
192
|
+
usd: z.ZodString;
|
|
193
|
+
tradeFee: z.ZodOptional<z.ZodString>;
|
|
194
|
+
pearFee: z.ZodOptional<z.ZodString>;
|
|
195
|
+
}, z.core.$strip>>;
|
|
168
196
|
}, z.core.$strip>>>;
|
|
169
197
|
bracketType: z.ZodEnum<{
|
|
170
198
|
NONE: "NONE";
|
|
@@ -333,12 +361,13 @@ export declare const Ladder: z.ZodObject<{
|
|
|
333
361
|
triggeredAt: z.ZodOptional<z.ZodString>;
|
|
334
362
|
cancelledAt: z.ZodOptional<z.ZodString>;
|
|
335
363
|
cancelledReason: z.ZodOptional<z.ZodEnum<{
|
|
336
|
-
USER: "USER";
|
|
337
364
|
POSITION_CLOSED: "POSITION_CLOSED";
|
|
365
|
+
USER: "USER";
|
|
338
366
|
SYSTEM: "SYSTEM";
|
|
339
367
|
POSITION_NETTED: "POSITION_NETTED";
|
|
340
368
|
POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
|
|
341
369
|
POSITION_REVERSED: "POSITION_REVERSED";
|
|
370
|
+
POSITION_RESIZED: "POSITION_RESIZED";
|
|
342
371
|
}>>;
|
|
343
372
|
fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
344
373
|
id: z.ZodUUID;
|
|
@@ -351,7 +380,9 @@ export declare const Ladder: z.ZodObject<{
|
|
|
351
380
|
}>;
|
|
352
381
|
tradeAccountId: z.ZodUUID;
|
|
353
382
|
symbol: z.ZodString;
|
|
354
|
-
|
|
383
|
+
executionId: z.ZodOptional<z.ZodUUID>;
|
|
384
|
+
scheduleId: z.ZodOptional<z.ZodUUID>;
|
|
385
|
+
triggerId: z.ZodOptional<z.ZodUUID>;
|
|
355
386
|
connector: z.ZodEnum<{
|
|
356
387
|
hyperliquid: "hyperliquid";
|
|
357
388
|
binance: "binance";
|
|
@@ -377,6 +408,13 @@ export declare const Ladder: z.ZodObject<{
|
|
|
377
408
|
exchangeFillId: z.ZodString;
|
|
378
409
|
quantity: z.ZodString;
|
|
379
410
|
}, z.core.$strip>>;
|
|
411
|
+
assignments: z.ZodArray<z.ZodObject<{
|
|
412
|
+
positionId: z.ZodUUID;
|
|
413
|
+
quantity: z.ZodString;
|
|
414
|
+
usd: z.ZodString;
|
|
415
|
+
tradeFee: z.ZodOptional<z.ZodString>;
|
|
416
|
+
pearFee: z.ZodOptional<z.ZodString>;
|
|
417
|
+
}, z.core.$strip>>;
|
|
380
418
|
}, z.core.$strip>>>;
|
|
381
419
|
bracketType: z.ZodEnum<{
|
|
382
420
|
NONE: "NONE";
|
|
@@ -454,6 +492,10 @@ export declare const Ladder: z.ZodObject<{
|
|
|
454
492
|
TROUGH: "TROUGH";
|
|
455
493
|
}>;
|
|
456
494
|
threshold: z.ZodNumber;
|
|
495
|
+
onPositionResize: z.ZodEnum<{
|
|
496
|
+
cancel: "cancel";
|
|
497
|
+
keep: "keep";
|
|
498
|
+
}>;
|
|
457
499
|
}, z.core.$strip>;
|
|
458
500
|
}, z.core.$strip>, z.ZodObject<{
|
|
459
501
|
type: z.ZodLiteral<"upnl">;
|
|
@@ -467,6 +509,10 @@ export declare const Ladder: z.ZodObject<{
|
|
|
467
509
|
TROUGH: "TROUGH";
|
|
468
510
|
}>;
|
|
469
511
|
threshold: z.ZodNumber;
|
|
512
|
+
onPositionResize: z.ZodEnum<{
|
|
513
|
+
cancel: "cancel";
|
|
514
|
+
keep: "keep";
|
|
515
|
+
}>;
|
|
470
516
|
}, z.core.$strip>;
|
|
471
517
|
}, z.core.$strip>, z.ZodObject<{
|
|
472
518
|
type: z.ZodLiteral<"upnl_bps">;
|
|
@@ -591,12 +637,13 @@ export declare const Ladder: z.ZodObject<{
|
|
|
591
637
|
triggeredAt: z.ZodOptional<z.ZodString>;
|
|
592
638
|
cancelledAt: z.ZodOptional<z.ZodString>;
|
|
593
639
|
cancelledReason: z.ZodOptional<z.ZodEnum<{
|
|
594
|
-
USER: "USER";
|
|
595
640
|
POSITION_CLOSED: "POSITION_CLOSED";
|
|
641
|
+
USER: "USER";
|
|
596
642
|
SYSTEM: "SYSTEM";
|
|
597
643
|
POSITION_NETTED: "POSITION_NETTED";
|
|
598
644
|
POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
|
|
599
645
|
POSITION_REVERSED: "POSITION_REVERSED";
|
|
646
|
+
POSITION_RESIZED: "POSITION_RESIZED";
|
|
600
647
|
}>>;
|
|
601
648
|
fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
602
649
|
id: z.ZodUUID;
|
|
@@ -609,7 +656,9 @@ export declare const Ladder: z.ZodObject<{
|
|
|
609
656
|
}>;
|
|
610
657
|
tradeAccountId: z.ZodUUID;
|
|
611
658
|
symbol: z.ZodString;
|
|
612
|
-
|
|
659
|
+
executionId: z.ZodOptional<z.ZodUUID>;
|
|
660
|
+
scheduleId: z.ZodOptional<z.ZodUUID>;
|
|
661
|
+
triggerId: z.ZodOptional<z.ZodUUID>;
|
|
613
662
|
connector: z.ZodEnum<{
|
|
614
663
|
hyperliquid: "hyperliquid";
|
|
615
664
|
binance: "binance";
|
|
@@ -635,6 +684,13 @@ export declare const Ladder: z.ZodObject<{
|
|
|
635
684
|
exchangeFillId: z.ZodString;
|
|
636
685
|
quantity: z.ZodString;
|
|
637
686
|
}, z.core.$strip>>;
|
|
687
|
+
assignments: z.ZodArray<z.ZodObject<{
|
|
688
|
+
positionId: z.ZodUUID;
|
|
689
|
+
quantity: z.ZodString;
|
|
690
|
+
usd: z.ZodString;
|
|
691
|
+
tradeFee: z.ZodOptional<z.ZodString>;
|
|
692
|
+
pearFee: z.ZodOptional<z.ZodString>;
|
|
693
|
+
}, z.core.$strip>>;
|
|
638
694
|
}, z.core.$strip>>>;
|
|
639
695
|
bracketType: z.ZodEnum<{
|
|
640
696
|
NONE: "NONE";
|
|
@@ -712,6 +768,10 @@ export declare const Ladder: z.ZodObject<{
|
|
|
712
768
|
TROUGH: "TROUGH";
|
|
713
769
|
}>;
|
|
714
770
|
threshold: z.ZodNumber;
|
|
771
|
+
onPositionResize: z.ZodEnum<{
|
|
772
|
+
cancel: "cancel";
|
|
773
|
+
keep: "keep";
|
|
774
|
+
}>;
|
|
715
775
|
}, z.core.$strip>;
|
|
716
776
|
}, z.core.$strip>, z.ZodObject<{
|
|
717
777
|
type: z.ZodLiteral<"upnl">;
|
|
@@ -725,6 +785,10 @@ export declare const Ladder: z.ZodObject<{
|
|
|
725
785
|
TROUGH: "TROUGH";
|
|
726
786
|
}>;
|
|
727
787
|
threshold: z.ZodNumber;
|
|
788
|
+
onPositionResize: z.ZodEnum<{
|
|
789
|
+
cancel: "cancel";
|
|
790
|
+
keep: "keep";
|
|
791
|
+
}>;
|
|
728
792
|
}, z.core.$strip>;
|
|
729
793
|
}, z.core.$strip>, z.ZodObject<{
|
|
730
794
|
type: z.ZodLiteral<"upnl_bps">;
|
|
@@ -781,6 +845,10 @@ export declare const Ladder: z.ZodObject<{
|
|
|
781
845
|
mid: "mid";
|
|
782
846
|
mark: "mark";
|
|
783
847
|
}>;
|
|
848
|
+
onPositionResize: z.ZodEnum<{
|
|
849
|
+
cancel: "cancel";
|
|
850
|
+
keep: "keep";
|
|
851
|
+
}>;
|
|
784
852
|
}, z.core.$strip>;
|
|
785
853
|
}, z.core.$strip>, z.ZodObject<{
|
|
786
854
|
type: z.ZodLiteral<"upnl_trailing">;
|
|
@@ -789,6 +857,10 @@ export declare const Ladder: z.ZodObject<{
|
|
|
789
857
|
mid: "mid";
|
|
790
858
|
mark: "mark";
|
|
791
859
|
}>;
|
|
860
|
+
onPositionResize: z.ZodEnum<{
|
|
861
|
+
cancel: "cancel";
|
|
862
|
+
keep: "keep";
|
|
863
|
+
}>;
|
|
792
864
|
}, z.core.$strip>;
|
|
793
865
|
}, z.core.$strip>, z.ZodObject<{
|
|
794
866
|
type: z.ZodLiteral<"upnl_bps_trailing">;
|
|
@@ -841,6 +913,7 @@ export declare const Ladder: z.ZodObject<{
|
|
|
841
913
|
threshold: z.ZodNumber;
|
|
842
914
|
}, z.core.$strip>;
|
|
843
915
|
}, z.core.$strip>], "type">;
|
|
916
|
+
closePercent: z.ZodOptional<z.ZodNumber>;
|
|
844
917
|
context: z.ZodObject<{
|
|
845
918
|
type: z.ZodLiteral<"MARKET">;
|
|
846
919
|
position: z.ZodObject<{
|
|
@@ -881,12 +954,13 @@ export declare const Ladder: z.ZodObject<{
|
|
|
881
954
|
triggeredAt: z.ZodOptional<z.ZodString>;
|
|
882
955
|
cancelledAt: z.ZodOptional<z.ZodString>;
|
|
883
956
|
cancelledReason: z.ZodOptional<z.ZodEnum<{
|
|
884
|
-
USER: "USER";
|
|
885
957
|
POSITION_CLOSED: "POSITION_CLOSED";
|
|
958
|
+
USER: "USER";
|
|
886
959
|
SYSTEM: "SYSTEM";
|
|
887
960
|
POSITION_NETTED: "POSITION_NETTED";
|
|
888
961
|
POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
|
|
889
962
|
POSITION_REVERSED: "POSITION_REVERSED";
|
|
963
|
+
POSITION_RESIZED: "POSITION_RESIZED";
|
|
890
964
|
}>>;
|
|
891
965
|
fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
892
966
|
id: z.ZodUUID;
|
|
@@ -899,7 +973,9 @@ export declare const Ladder: z.ZodObject<{
|
|
|
899
973
|
}>;
|
|
900
974
|
tradeAccountId: z.ZodUUID;
|
|
901
975
|
symbol: z.ZodString;
|
|
902
|
-
|
|
976
|
+
executionId: z.ZodOptional<z.ZodUUID>;
|
|
977
|
+
scheduleId: z.ZodOptional<z.ZodUUID>;
|
|
978
|
+
triggerId: z.ZodOptional<z.ZodUUID>;
|
|
903
979
|
connector: z.ZodEnum<{
|
|
904
980
|
hyperliquid: "hyperliquid";
|
|
905
981
|
binance: "binance";
|
|
@@ -925,6 +1001,13 @@ export declare const Ladder: z.ZodObject<{
|
|
|
925
1001
|
exchangeFillId: z.ZodString;
|
|
926
1002
|
quantity: z.ZodString;
|
|
927
1003
|
}, z.core.$strip>>;
|
|
1004
|
+
assignments: z.ZodArray<z.ZodObject<{
|
|
1005
|
+
positionId: z.ZodUUID;
|
|
1006
|
+
quantity: z.ZodString;
|
|
1007
|
+
usd: z.ZodString;
|
|
1008
|
+
tradeFee: z.ZodOptional<z.ZodString>;
|
|
1009
|
+
pearFee: z.ZodOptional<z.ZodString>;
|
|
1010
|
+
}, z.core.$strip>>;
|
|
928
1011
|
}, z.core.$strip>>>;
|
|
929
1012
|
bracketType: z.ZodEnum<{
|
|
930
1013
|
NONE: "NONE";
|
|
@@ -1003,6 +1086,10 @@ export declare const Ladder: z.ZodObject<{
|
|
|
1003
1086
|
TROUGH: "TROUGH";
|
|
1004
1087
|
}>;
|
|
1005
1088
|
threshold: z.ZodNumber;
|
|
1089
|
+
onPositionResize: z.ZodEnum<{
|
|
1090
|
+
cancel: "cancel";
|
|
1091
|
+
keep: "keep";
|
|
1092
|
+
}>;
|
|
1006
1093
|
}, z.core.$strip>;
|
|
1007
1094
|
}, z.core.$strip>, z.ZodObject<{
|
|
1008
1095
|
type: z.ZodLiteral<"upnl">;
|
|
@@ -1016,6 +1103,10 @@ export declare const Ladder: z.ZodObject<{
|
|
|
1016
1103
|
TROUGH: "TROUGH";
|
|
1017
1104
|
}>;
|
|
1018
1105
|
threshold: z.ZodNumber;
|
|
1106
|
+
onPositionResize: z.ZodEnum<{
|
|
1107
|
+
cancel: "cancel";
|
|
1108
|
+
keep: "keep";
|
|
1109
|
+
}>;
|
|
1019
1110
|
}, z.core.$strip>;
|
|
1020
1111
|
}, z.core.$strip>, z.ZodObject<{
|
|
1021
1112
|
type: z.ZodLiteral<"upnl_bps">;
|
|
@@ -1137,12 +1228,13 @@ export declare const Ladder: z.ZodObject<{
|
|
|
1137
1228
|
triggeredAt: z.ZodOptional<z.ZodString>;
|
|
1138
1229
|
cancelledAt: z.ZodOptional<z.ZodString>;
|
|
1139
1230
|
cancelledReason: z.ZodOptional<z.ZodEnum<{
|
|
1140
|
-
USER: "USER";
|
|
1141
1231
|
POSITION_CLOSED: "POSITION_CLOSED";
|
|
1232
|
+
USER: "USER";
|
|
1142
1233
|
SYSTEM: "SYSTEM";
|
|
1143
1234
|
POSITION_NETTED: "POSITION_NETTED";
|
|
1144
1235
|
POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
|
|
1145
1236
|
POSITION_REVERSED: "POSITION_REVERSED";
|
|
1237
|
+
POSITION_RESIZED: "POSITION_RESIZED";
|
|
1146
1238
|
}>>;
|
|
1147
1239
|
fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1148
1240
|
id: z.ZodUUID;
|
|
@@ -1155,7 +1247,9 @@ export declare const Ladder: z.ZodObject<{
|
|
|
1155
1247
|
}>;
|
|
1156
1248
|
tradeAccountId: z.ZodUUID;
|
|
1157
1249
|
symbol: z.ZodString;
|
|
1158
|
-
|
|
1250
|
+
executionId: z.ZodOptional<z.ZodUUID>;
|
|
1251
|
+
scheduleId: z.ZodOptional<z.ZodUUID>;
|
|
1252
|
+
triggerId: z.ZodOptional<z.ZodUUID>;
|
|
1159
1253
|
connector: z.ZodEnum<{
|
|
1160
1254
|
hyperliquid: "hyperliquid";
|
|
1161
1255
|
binance: "binance";
|
|
@@ -1181,6 +1275,13 @@ export declare const Ladder: z.ZodObject<{
|
|
|
1181
1275
|
exchangeFillId: z.ZodString;
|
|
1182
1276
|
quantity: z.ZodString;
|
|
1183
1277
|
}, z.core.$strip>>;
|
|
1278
|
+
assignments: z.ZodArray<z.ZodObject<{
|
|
1279
|
+
positionId: z.ZodUUID;
|
|
1280
|
+
quantity: z.ZodString;
|
|
1281
|
+
usd: z.ZodString;
|
|
1282
|
+
tradeFee: z.ZodOptional<z.ZodString>;
|
|
1283
|
+
pearFee: z.ZodOptional<z.ZodString>;
|
|
1284
|
+
}, z.core.$strip>>;
|
|
1184
1285
|
}, z.core.$strip>>>;
|
|
1185
1286
|
bracketType: z.ZodEnum<{
|
|
1186
1287
|
NONE: "NONE";
|
|
@@ -1259,6 +1360,10 @@ export declare const Ladder: z.ZodObject<{
|
|
|
1259
1360
|
TROUGH: "TROUGH";
|
|
1260
1361
|
}>;
|
|
1261
1362
|
threshold: z.ZodNumber;
|
|
1363
|
+
onPositionResize: z.ZodEnum<{
|
|
1364
|
+
cancel: "cancel";
|
|
1365
|
+
keep: "keep";
|
|
1366
|
+
}>;
|
|
1262
1367
|
}, z.core.$strip>;
|
|
1263
1368
|
}, z.core.$strip>, z.ZodObject<{
|
|
1264
1369
|
type: z.ZodLiteral<"upnl">;
|
|
@@ -1272,6 +1377,10 @@ export declare const Ladder: z.ZodObject<{
|
|
|
1272
1377
|
TROUGH: "TROUGH";
|
|
1273
1378
|
}>;
|
|
1274
1379
|
threshold: z.ZodNumber;
|
|
1380
|
+
onPositionResize: z.ZodEnum<{
|
|
1381
|
+
cancel: "cancel";
|
|
1382
|
+
keep: "keep";
|
|
1383
|
+
}>;
|
|
1275
1384
|
}, z.core.$strip>;
|
|
1276
1385
|
}, z.core.$strip>, z.ZodObject<{
|
|
1277
1386
|
type: z.ZodLiteral<"upnl_bps">;
|
|
@@ -1328,6 +1437,10 @@ export declare const Ladder: z.ZodObject<{
|
|
|
1328
1437
|
mid: "mid";
|
|
1329
1438
|
mark: "mark";
|
|
1330
1439
|
}>;
|
|
1440
|
+
onPositionResize: z.ZodEnum<{
|
|
1441
|
+
cancel: "cancel";
|
|
1442
|
+
keep: "keep";
|
|
1443
|
+
}>;
|
|
1331
1444
|
}, z.core.$strip>;
|
|
1332
1445
|
}, z.core.$strip>, z.ZodObject<{
|
|
1333
1446
|
type: z.ZodLiteral<"upnl_trailing">;
|
|
@@ -1336,6 +1449,10 @@ export declare const Ladder: z.ZodObject<{
|
|
|
1336
1449
|
mid: "mid";
|
|
1337
1450
|
mark: "mark";
|
|
1338
1451
|
}>;
|
|
1452
|
+
onPositionResize: z.ZodEnum<{
|
|
1453
|
+
cancel: "cancel";
|
|
1454
|
+
keep: "keep";
|
|
1455
|
+
}>;
|
|
1339
1456
|
}, z.core.$strip>;
|
|
1340
1457
|
}, z.core.$strip>, z.ZodObject<{
|
|
1341
1458
|
type: z.ZodLiteral<"upnl_bps_trailing">;
|
|
@@ -118,6 +118,7 @@ export declare const CreateLadderMarketOpen: z.ZodObject<{
|
|
|
118
118
|
STOP_LOSS: "STOP_LOSS";
|
|
119
119
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
120
120
|
}>;
|
|
121
|
+
closePercent: z.ZodOptional<z.ZodNumber>;
|
|
121
122
|
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
122
123
|
type: z.ZodLiteral<"notional">;
|
|
123
124
|
data: z.ZodObject<{
|
|
@@ -126,8 +127,12 @@ export declare const CreateLadderMarketOpen: z.ZodObject<{
|
|
|
126
127
|
mark: "mark";
|
|
127
128
|
}>;
|
|
128
129
|
threshold: z.ZodNumber;
|
|
129
|
-
|
|
130
|
-
|
|
130
|
+
onPositionResize: z.ZodDefault<z.ZodEnum<{
|
|
131
|
+
cancel: "cancel";
|
|
132
|
+
keep: "keep";
|
|
133
|
+
}>>;
|
|
134
|
+
}, z.core.$strict>;
|
|
135
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
131
136
|
type: z.ZodLiteral<"upnl">;
|
|
132
137
|
data: z.ZodObject<{
|
|
133
138
|
priceSource: z.ZodEnum<{
|
|
@@ -135,8 +140,12 @@ export declare const CreateLadderMarketOpen: z.ZodObject<{
|
|
|
135
140
|
mark: "mark";
|
|
136
141
|
}>;
|
|
137
142
|
threshold: z.ZodNumber;
|
|
138
|
-
|
|
139
|
-
|
|
143
|
+
onPositionResize: z.ZodDefault<z.ZodEnum<{
|
|
144
|
+
cancel: "cancel";
|
|
145
|
+
keep: "keep";
|
|
146
|
+
}>>;
|
|
147
|
+
}, z.core.$strict>;
|
|
148
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
140
149
|
type: z.ZodLiteral<"upnl_bps">;
|
|
141
150
|
data: z.ZodObject<{
|
|
142
151
|
priceSource: z.ZodEnum<{
|
|
@@ -144,11 +153,12 @@ export declare const CreateLadderMarketOpen: z.ZodObject<{
|
|
|
144
153
|
mark: "mark";
|
|
145
154
|
}>;
|
|
146
155
|
threshold: z.ZodNumber;
|
|
147
|
-
}, z.core.$
|
|
148
|
-
}, z.core.$
|
|
156
|
+
}, z.core.$strict>;
|
|
157
|
+
}, z.core.$strict>], "type">;
|
|
149
158
|
}, z.core.$strip>, z.ZodObject<{
|
|
150
159
|
intent: z.ZodLiteral<"CLOSE">;
|
|
151
160
|
type: z.ZodLiteral<"MARKET">;
|
|
161
|
+
closePercent: z.ZodOptional<z.ZodNumber>;
|
|
152
162
|
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
153
163
|
type: z.ZodLiteral<"notional_trailing">;
|
|
154
164
|
data: z.ZodObject<{
|
|
@@ -156,24 +166,32 @@ export declare const CreateLadderMarketOpen: z.ZodObject<{
|
|
|
156
166
|
mid: "mid";
|
|
157
167
|
mark: "mark";
|
|
158
168
|
}>;
|
|
159
|
-
|
|
160
|
-
|
|
169
|
+
onPositionResize: z.ZodDefault<z.ZodEnum<{
|
|
170
|
+
cancel: "cancel";
|
|
171
|
+
keep: "keep";
|
|
172
|
+
}>>;
|
|
173
|
+
}, z.core.$strict>;
|
|
174
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
161
175
|
type: z.ZodLiteral<"upnl_trailing">;
|
|
162
176
|
data: z.ZodObject<{
|
|
163
177
|
priceSource: z.ZodEnum<{
|
|
164
178
|
mid: "mid";
|
|
165
179
|
mark: "mark";
|
|
166
180
|
}>;
|
|
167
|
-
|
|
168
|
-
|
|
181
|
+
onPositionResize: z.ZodDefault<z.ZodEnum<{
|
|
182
|
+
cancel: "cancel";
|
|
183
|
+
keep: "keep";
|
|
184
|
+
}>>;
|
|
185
|
+
}, z.core.$strict>;
|
|
186
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
169
187
|
type: z.ZodLiteral<"upnl_bps_trailing">;
|
|
170
188
|
data: z.ZodObject<{
|
|
171
189
|
priceSource: z.ZodEnum<{
|
|
172
190
|
mid: "mid";
|
|
173
191
|
mark: "mark";
|
|
174
192
|
}>;
|
|
175
|
-
}, z.core.$
|
|
176
|
-
}, z.core.$
|
|
193
|
+
}, z.core.$strict>;
|
|
194
|
+
}, z.core.$strict>], "type">;
|
|
177
195
|
trailing: z.ZodObject<{
|
|
178
196
|
mode: z.ZodEnum<{
|
|
179
197
|
RELATIVE_BPS: "RELATIVE_BPS";
|
|
@@ -277,6 +295,7 @@ export declare const CreateLadder: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
277
295
|
STOP_LOSS: "STOP_LOSS";
|
|
278
296
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
279
297
|
}>;
|
|
298
|
+
closePercent: z.ZodOptional<z.ZodNumber>;
|
|
280
299
|
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
281
300
|
type: z.ZodLiteral<"notional">;
|
|
282
301
|
data: z.ZodObject<{
|
|
@@ -285,8 +304,12 @@ export declare const CreateLadder: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
285
304
|
mark: "mark";
|
|
286
305
|
}>;
|
|
287
306
|
threshold: z.ZodNumber;
|
|
288
|
-
|
|
289
|
-
|
|
307
|
+
onPositionResize: z.ZodDefault<z.ZodEnum<{
|
|
308
|
+
cancel: "cancel";
|
|
309
|
+
keep: "keep";
|
|
310
|
+
}>>;
|
|
311
|
+
}, z.core.$strict>;
|
|
312
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
290
313
|
type: z.ZodLiteral<"upnl">;
|
|
291
314
|
data: z.ZodObject<{
|
|
292
315
|
priceSource: z.ZodEnum<{
|
|
@@ -294,8 +317,12 @@ export declare const CreateLadder: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
294
317
|
mark: "mark";
|
|
295
318
|
}>;
|
|
296
319
|
threshold: z.ZodNumber;
|
|
297
|
-
|
|
298
|
-
|
|
320
|
+
onPositionResize: z.ZodDefault<z.ZodEnum<{
|
|
321
|
+
cancel: "cancel";
|
|
322
|
+
keep: "keep";
|
|
323
|
+
}>>;
|
|
324
|
+
}, z.core.$strict>;
|
|
325
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
299
326
|
type: z.ZodLiteral<"upnl_bps">;
|
|
300
327
|
data: z.ZodObject<{
|
|
301
328
|
priceSource: z.ZodEnum<{
|
|
@@ -303,11 +330,12 @@ export declare const CreateLadder: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
303
330
|
mark: "mark";
|
|
304
331
|
}>;
|
|
305
332
|
threshold: z.ZodNumber;
|
|
306
|
-
}, z.core.$
|
|
307
|
-
}, z.core.$
|
|
333
|
+
}, z.core.$strict>;
|
|
334
|
+
}, z.core.$strict>], "type">;
|
|
308
335
|
}, z.core.$strip>, z.ZodObject<{
|
|
309
336
|
intent: z.ZodLiteral<"CLOSE">;
|
|
310
337
|
type: z.ZodLiteral<"MARKET">;
|
|
338
|
+
closePercent: z.ZodOptional<z.ZodNumber>;
|
|
311
339
|
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
312
340
|
type: z.ZodLiteral<"notional_trailing">;
|
|
313
341
|
data: z.ZodObject<{
|
|
@@ -315,24 +343,32 @@ export declare const CreateLadder: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
315
343
|
mid: "mid";
|
|
316
344
|
mark: "mark";
|
|
317
345
|
}>;
|
|
318
|
-
|
|
319
|
-
|
|
346
|
+
onPositionResize: z.ZodDefault<z.ZodEnum<{
|
|
347
|
+
cancel: "cancel";
|
|
348
|
+
keep: "keep";
|
|
349
|
+
}>>;
|
|
350
|
+
}, z.core.$strict>;
|
|
351
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
320
352
|
type: z.ZodLiteral<"upnl_trailing">;
|
|
321
353
|
data: z.ZodObject<{
|
|
322
354
|
priceSource: z.ZodEnum<{
|
|
323
355
|
mid: "mid";
|
|
324
356
|
mark: "mark";
|
|
325
357
|
}>;
|
|
326
|
-
|
|
327
|
-
|
|
358
|
+
onPositionResize: z.ZodDefault<z.ZodEnum<{
|
|
359
|
+
cancel: "cancel";
|
|
360
|
+
keep: "keep";
|
|
361
|
+
}>>;
|
|
362
|
+
}, z.core.$strict>;
|
|
363
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
328
364
|
type: z.ZodLiteral<"upnl_bps_trailing">;
|
|
329
365
|
data: z.ZodObject<{
|
|
330
366
|
priceSource: z.ZodEnum<{
|
|
331
367
|
mid: "mid";
|
|
332
368
|
mark: "mark";
|
|
333
369
|
}>;
|
|
334
|
-
}, z.core.$
|
|
335
|
-
}, z.core.$
|
|
370
|
+
}, z.core.$strict>;
|
|
371
|
+
}, z.core.$strict>], "type">;
|
|
336
372
|
trailing: z.ZodObject<{
|
|
337
373
|
mode: z.ZodEnum<{
|
|
338
374
|
RELATIVE_BPS: "RELATIVE_BPS";
|
package/dist/ladder/queries.d.ts
CHANGED
|
@@ -10,10 +10,10 @@ export declare const LadderListParams: z.ZodObject<{
|
|
|
10
10
|
lighter: "lighter";
|
|
11
11
|
lighter_rhc: "lighter_rhc";
|
|
12
12
|
}>>;
|
|
13
|
-
status: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[] | (("ACTIVE" | "
|
|
13
|
+
status: z.ZodOptional<z.ZodPipe<z.ZodTransform<string[] | (("ACTIVE" | "COMPLETED" | "CANCELLED")[] & any[]) | undefined, ("ACTIVE" | "COMPLETED" | "CANCELLED")[]>, z.ZodArray<z.ZodEnum<{
|
|
14
14
|
ACTIVE: "ACTIVE";
|
|
15
|
-
CANCELLED: "CANCELLED";
|
|
16
15
|
COMPLETED: "COMPLETED";
|
|
16
|
+
CANCELLED: "CANCELLED";
|
|
17
17
|
}>>>>;
|
|
18
18
|
}, z.core.$strip>;
|
|
19
19
|
export type LadderListParamsInput = z.input<typeof LadderListParams>;
|