@pear-protocol/types 1.1.0 → 1.3.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.
@@ -32,6 +32,7 @@ declare const BaseTrigger: z.ZodObject<{
32
32
  POSITION_CLOSED: "POSITION_CLOSED";
33
33
  SYSTEM: "SYSTEM";
34
34
  POSITION_NETTED: "POSITION_NETTED";
35
+ POSITION_REVERSED: "POSITION_REVERSED";
35
36
  }>>;
36
37
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
37
38
  id: z.ZodUUID;
@@ -77,6 +78,16 @@ declare const BaseTrigger: z.ZodObject<{
77
78
  createdAt: z.ZodString;
78
79
  updatedAt: z.ZodString;
79
80
  }, z.core.$strip>;
81
+ export declare const TriggerMarketOpenAttachedTrigger: z.ZodObject<{
82
+ kind: z.ZodEnum<{
83
+ STATIC: "STATIC";
84
+ TRAILING: "TRAILING";
85
+ }>;
86
+ bracketType: z.ZodEnum<{
87
+ STOP_LOSS: "STOP_LOSS";
88
+ TAKE_PROFIT: "TAKE_PROFIT";
89
+ }>;
90
+ }, z.core.$strip>;
80
91
  export declare const TriggerMarketOpen: z.ZodObject<{
81
92
  id: z.ZodUUID;
82
93
  tradeAccountId: z.ZodUUID;
@@ -99,6 +110,7 @@ export declare const TriggerMarketOpen: z.ZodObject<{
99
110
  POSITION_CLOSED: "POSITION_CLOSED";
100
111
  SYSTEM: "SYSTEM";
101
112
  POSITION_NETTED: "POSITION_NETTED";
113
+ POSITION_REVERSED: "POSITION_REVERSED";
102
114
  }>>;
103
115
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
104
116
  id: z.ZodUUID;
@@ -262,6 +274,16 @@ export declare const TriggerMarketOpen: z.ZodObject<{
262
274
  }>;
263
275
  amount: z.ZodString;
264
276
  }, z.core.$strip>>;
277
+ attachedTriggers: z.ZodArray<z.ZodObject<{
278
+ kind: z.ZodEnum<{
279
+ STATIC: "STATIC";
280
+ TRAILING: "TRAILING";
281
+ }>;
282
+ bracketType: z.ZodEnum<{
283
+ STOP_LOSS: "STOP_LOSS";
284
+ TAKE_PROFIT: "TAKE_PROFIT";
285
+ }>;
286
+ }, z.core.$strip>>;
265
287
  }, z.core.$strip>;
266
288
  }, z.core.$strip>;
267
289
  export declare const TriggerMarketAdjust: z.ZodObject<{
@@ -286,6 +308,7 @@ export declare const TriggerMarketAdjust: z.ZodObject<{
286
308
  POSITION_CLOSED: "POSITION_CLOSED";
287
309
  SYSTEM: "SYSTEM";
288
310
  POSITION_NETTED: "POSITION_NETTED";
311
+ POSITION_REVERSED: "POSITION_REVERSED";
289
312
  }>>;
290
313
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
291
314
  id: z.ZodUUID;
@@ -529,6 +552,7 @@ export declare const TriggerMarketClose: z.ZodObject<{
529
552
  POSITION_CLOSED: "POSITION_CLOSED";
530
553
  SYSTEM: "SYSTEM";
531
554
  POSITION_NETTED: "POSITION_NETTED";
555
+ POSITION_REVERSED: "POSITION_REVERSED";
532
556
  }>>;
533
557
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
534
558
  id: z.ZodUUID;
@@ -806,6 +830,7 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
806
830
  POSITION_CLOSED: "POSITION_CLOSED";
807
831
  SYSTEM: "SYSTEM";
808
832
  POSITION_NETTED: "POSITION_NETTED";
833
+ POSITION_REVERSED: "POSITION_REVERSED";
809
834
  }>>;
810
835
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
811
836
  id: z.ZodUUID;
@@ -969,6 +994,16 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
969
994
  }>;
970
995
  amount: z.ZodString;
971
996
  }, z.core.$strip>>;
997
+ attachedTriggers: z.ZodArray<z.ZodObject<{
998
+ kind: z.ZodEnum<{
999
+ STATIC: "STATIC";
1000
+ TRAILING: "TRAILING";
1001
+ }>;
1002
+ bracketType: z.ZodEnum<{
1003
+ STOP_LOSS: "STOP_LOSS";
1004
+ TAKE_PROFIT: "TAKE_PROFIT";
1005
+ }>;
1006
+ }, z.core.$strip>>;
972
1007
  }, z.core.$strip>;
973
1008
  }, z.core.$strip>, z.ZodObject<{
974
1009
  id: z.ZodUUID;
@@ -992,6 +1027,7 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
992
1027
  POSITION_CLOSED: "POSITION_CLOSED";
993
1028
  SYSTEM: "SYSTEM";
994
1029
  POSITION_NETTED: "POSITION_NETTED";
1030
+ POSITION_REVERSED: "POSITION_REVERSED";
995
1031
  }>>;
996
1032
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
997
1033
  id: z.ZodUUID;
@@ -1234,6 +1270,7 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1234
1270
  POSITION_CLOSED: "POSITION_CLOSED";
1235
1271
  SYSTEM: "SYSTEM";
1236
1272
  POSITION_NETTED: "POSITION_NETTED";
1273
+ POSITION_REVERSED: "POSITION_REVERSED";
1237
1274
  }>>;
1238
1275
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1239
1276
  id: z.ZodUUID;
@@ -1511,6 +1548,7 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1511
1548
  POSITION_CLOSED: "POSITION_CLOSED";
1512
1549
  SYSTEM: "SYSTEM";
1513
1550
  POSITION_NETTED: "POSITION_NETTED";
1551
+ POSITION_REVERSED: "POSITION_REVERSED";
1514
1552
  }>>;
1515
1553
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1516
1554
  id: z.ZodUUID;
@@ -1674,6 +1712,16 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1674
1712
  }>;
1675
1713
  amount: z.ZodString;
1676
1714
  }, z.core.$strip>>;
1715
+ attachedTriggers: z.ZodArray<z.ZodObject<{
1716
+ kind: z.ZodEnum<{
1717
+ STATIC: "STATIC";
1718
+ TRAILING: "TRAILING";
1719
+ }>;
1720
+ bracketType: z.ZodEnum<{
1721
+ STOP_LOSS: "STOP_LOSS";
1722
+ TAKE_PROFIT: "TAKE_PROFIT";
1723
+ }>;
1724
+ }, z.core.$strip>>;
1677
1725
  }, z.core.$strip>;
1678
1726
  }, z.core.$strip>, z.ZodObject<{
1679
1727
  id: z.ZodUUID;
@@ -1697,6 +1745,7 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1697
1745
  POSITION_CLOSED: "POSITION_CLOSED";
1698
1746
  SYSTEM: "SYSTEM";
1699
1747
  POSITION_NETTED: "POSITION_NETTED";
1748
+ POSITION_REVERSED: "POSITION_REVERSED";
1700
1749
  }>>;
1701
1750
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1702
1751
  id: z.ZodUUID;
@@ -1939,6 +1988,7 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1939
1988
  POSITION_CLOSED: "POSITION_CLOSED";
1940
1989
  SYSTEM: "SYSTEM";
1941
1990
  POSITION_NETTED: "POSITION_NETTED";
1991
+ POSITION_REVERSED: "POSITION_REVERSED";
1942
1992
  }>>;
1943
1993
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1944
1994
  id: z.ZodUUID;
@@ -2195,6 +2245,7 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
2195
2245
  }, z.core.$strip>>;
2196
2246
  }, z.core.$strip>], "intent">], "type">;
2197
2247
  export type BaseTrigger = z.output<typeof BaseTrigger>;
2248
+ export type TriggerMarketOpenAttachedTrigger = z.output<typeof TriggerMarketOpenAttachedTrigger>;
2198
2249
  export type TriggerMarketOpen = z.output<typeof TriggerMarketOpen>;
2199
2250
  export type TriggerMarketAdjust = z.output<typeof TriggerMarketAdjust>;
2200
2251
  export type TriggerMarketClose = z.output<typeof TriggerMarketClose>;
@@ -4,7 +4,7 @@ import { TradeLegPostOnly, TradeLeg } from '../../common/trade-legs';
4
4
  import { Connector } from '../../connector';
5
5
  import { Fill } from '../../fill';
6
6
  import { InstrumentId } from '../../instrument';
7
- import { TrailingMode, BracketType, TriggerStatus, TriggerCancelledReason } from '../common';
7
+ import { TrailingMode, BracketType, TriggerStatus, TriggerCancelledReason, TpSlBracketType } from '../common';
8
8
  import { TriggerConditionOpen, TriggerConditionAdjust, TriggerConditionClose } from './conditions';
9
9
 
10
10
  const Trailing = z.object({
@@ -80,6 +80,10 @@ const BaseTrigger = z.object({
80
80
  */
81
81
  updatedAt: z.string()
82
82
  });
83
+ const TriggerMarketOpenAttachedTrigger = z.object({
84
+ kind: z.enum(["STATIC", "TRAILING"]),
85
+ bracketType: TpSlBracketType
86
+ });
83
87
  const TriggerMarketOpen = BaseTrigger.extend({
84
88
  /**
85
89
  * Intent
@@ -98,7 +102,11 @@ const TriggerMarketOpen = BaseTrigger.extend({
98
102
  */
99
103
  context: z.object({
100
104
  type: z.literal("MARKET"),
101
- legs: z.tuple([TradeLegPostOnly]).rest(TradeLegPostOnly)
105
+ legs: z.tuple([TradeLegPostOnly]).rest(TradeLegPostOnly),
106
+ /**
107
+ * Close triggers configured to attach after this open trigger fires.
108
+ */
109
+ attachedTriggers: z.array(TriggerMarketOpenAttachedTrigger)
102
110
  })
103
111
  });
104
112
  const TriggerMarketAdjust = BaseTrigger.extend({
@@ -165,4 +173,4 @@ const TriggerMarket = z.discriminatedUnion("intent", [
165
173
  ]);
166
174
  const Trigger = z.discriminatedUnion("type", [TriggerMarket]);
167
175
 
168
- export { Trailing, Trigger, TriggerMarket, TriggerMarketAdjust, TriggerMarketClose, TriggerMarketOpen };
176
+ export { Trailing, Trigger, TriggerMarket, TriggerMarketAdjust, TriggerMarketClose, TriggerMarketOpen, TriggerMarketOpenAttachedTrigger };
@@ -0,0 +1 @@
1
+ export declare const MAX_ATTACH_TRIGGERS = 5;
@@ -0,0 +1,3 @@
1
+ const MAX_ATTACH_TRIGGERS = 5;
2
+
3
+ export { MAX_ATTACH_TRIGGERS };
@@ -7,6 +7,151 @@ export declare const TrailingConfig: z.ZodObject<{
7
7
  deltaValue: z.ZodNumber;
8
8
  activationValue: z.ZodOptional<z.ZodNumber>;
9
9
  }, z.core.$strip>;
10
+ export declare const AttachTriggerMarketCloseStatic: z.ZodObject<{
11
+ intent: z.ZodLiteral<"CLOSE">;
12
+ type: z.ZodLiteral<"MARKET">;
13
+ bracketType: z.ZodEnum<{
14
+ STOP_LOSS: "STOP_LOSS";
15
+ TAKE_PROFIT: "TAKE_PROFIT";
16
+ }>;
17
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
18
+ type: z.ZodLiteral<"notional">;
19
+ data: z.ZodObject<{
20
+ priceSource: z.ZodEnum<{
21
+ mid: "mid";
22
+ mark: "mark";
23
+ }>;
24
+ threshold: z.ZodNumber;
25
+ }, z.core.$strip>;
26
+ }, z.core.$strip>, z.ZodObject<{
27
+ type: z.ZodLiteral<"upnl">;
28
+ data: z.ZodObject<{
29
+ priceSource: z.ZodEnum<{
30
+ mid: "mid";
31
+ mark: "mark";
32
+ }>;
33
+ threshold: z.ZodNumber;
34
+ }, z.core.$strip>;
35
+ }, z.core.$strip>, z.ZodObject<{
36
+ type: z.ZodLiteral<"upnl_bps">;
37
+ data: z.ZodObject<{
38
+ priceSource: z.ZodEnum<{
39
+ mid: "mid";
40
+ mark: "mark";
41
+ }>;
42
+ threshold: z.ZodNumber;
43
+ }, z.core.$strip>;
44
+ }, z.core.$strip>], "type">;
45
+ }, z.core.$strip>;
46
+ export declare const AttachTriggerMarketCloseTrailing: z.ZodObject<{
47
+ intent: z.ZodLiteral<"CLOSE">;
48
+ type: z.ZodLiteral<"MARKET">;
49
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
50
+ type: z.ZodLiteral<"notional_trailing">;
51
+ data: z.ZodObject<{
52
+ priceSource: z.ZodEnum<{
53
+ mid: "mid";
54
+ mark: "mark";
55
+ }>;
56
+ }, z.core.$strip>;
57
+ }, z.core.$strip>, z.ZodObject<{
58
+ type: z.ZodLiteral<"upnl_trailing">;
59
+ data: z.ZodObject<{
60
+ priceSource: z.ZodEnum<{
61
+ mid: "mid";
62
+ mark: "mark";
63
+ }>;
64
+ }, z.core.$strip>;
65
+ }, z.core.$strip>, z.ZodObject<{
66
+ type: z.ZodLiteral<"upnl_bps_trailing">;
67
+ data: z.ZodObject<{
68
+ priceSource: z.ZodEnum<{
69
+ mid: "mid";
70
+ mark: "mark";
71
+ }>;
72
+ }, z.core.$strip>;
73
+ }, z.core.$strip>], "type">;
74
+ trailing: z.ZodObject<{
75
+ mode: z.ZodEnum<{
76
+ RELATIVE_BPS: "RELATIVE_BPS";
77
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
78
+ }>;
79
+ deltaValue: z.ZodNumber;
80
+ activationValue: z.ZodOptional<z.ZodNumber>;
81
+ }, z.core.$strip>;
82
+ }, z.core.$strip>;
83
+ export declare const AttachTriggerMarketClose: z.ZodUnion<readonly [z.ZodObject<{
84
+ intent: z.ZodLiteral<"CLOSE">;
85
+ type: z.ZodLiteral<"MARKET">;
86
+ bracketType: z.ZodEnum<{
87
+ STOP_LOSS: "STOP_LOSS";
88
+ TAKE_PROFIT: "TAKE_PROFIT";
89
+ }>;
90
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
91
+ type: z.ZodLiteral<"notional">;
92
+ data: z.ZodObject<{
93
+ priceSource: z.ZodEnum<{
94
+ mid: "mid";
95
+ mark: "mark";
96
+ }>;
97
+ threshold: z.ZodNumber;
98
+ }, z.core.$strip>;
99
+ }, z.core.$strip>, z.ZodObject<{
100
+ type: z.ZodLiteral<"upnl">;
101
+ data: z.ZodObject<{
102
+ priceSource: z.ZodEnum<{
103
+ mid: "mid";
104
+ mark: "mark";
105
+ }>;
106
+ threshold: z.ZodNumber;
107
+ }, z.core.$strip>;
108
+ }, z.core.$strip>, z.ZodObject<{
109
+ type: z.ZodLiteral<"upnl_bps">;
110
+ data: z.ZodObject<{
111
+ priceSource: z.ZodEnum<{
112
+ mid: "mid";
113
+ mark: "mark";
114
+ }>;
115
+ threshold: z.ZodNumber;
116
+ }, z.core.$strip>;
117
+ }, z.core.$strip>], "type">;
118
+ }, z.core.$strip>, z.ZodObject<{
119
+ intent: z.ZodLiteral<"CLOSE">;
120
+ type: z.ZodLiteral<"MARKET">;
121
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
122
+ type: z.ZodLiteral<"notional_trailing">;
123
+ data: z.ZodObject<{
124
+ priceSource: z.ZodEnum<{
125
+ mid: "mid";
126
+ mark: "mark";
127
+ }>;
128
+ }, z.core.$strip>;
129
+ }, z.core.$strip>, z.ZodObject<{
130
+ type: z.ZodLiteral<"upnl_trailing">;
131
+ data: z.ZodObject<{
132
+ priceSource: z.ZodEnum<{
133
+ mid: "mid";
134
+ mark: "mark";
135
+ }>;
136
+ }, z.core.$strip>;
137
+ }, z.core.$strip>, z.ZodObject<{
138
+ type: z.ZodLiteral<"upnl_bps_trailing">;
139
+ data: z.ZodObject<{
140
+ priceSource: z.ZodEnum<{
141
+ mid: "mid";
142
+ mark: "mark";
143
+ }>;
144
+ }, z.core.$strip>;
145
+ }, z.core.$strip>], "type">;
146
+ trailing: z.ZodObject<{
147
+ mode: z.ZodEnum<{
148
+ RELATIVE_BPS: "RELATIVE_BPS";
149
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
150
+ }>;
151
+ deltaValue: z.ZodNumber;
152
+ activationValue: z.ZodOptional<z.ZodNumber>;
153
+ }, z.core.$strip>;
154
+ }, z.core.$strip>]>;
10
155
  export declare const CreateTriggerMarketOpen: z.ZodObject<{
11
156
  intent: z.ZodLiteral<"OPEN">;
12
157
  type: z.ZodLiteral<"MARKET">;
@@ -102,6 +247,78 @@ export declare const CreateTriggerMarketOpen: z.ZodObject<{
102
247
  threshold: z.ZodNumber;
103
248
  }, z.core.$strip>;
104
249
  }, z.core.$strip>], "type">;
250
+ attachTriggers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
251
+ intent: z.ZodLiteral<"CLOSE">;
252
+ type: z.ZodLiteral<"MARKET">;
253
+ bracketType: z.ZodEnum<{
254
+ STOP_LOSS: "STOP_LOSS";
255
+ TAKE_PROFIT: "TAKE_PROFIT";
256
+ }>;
257
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
258
+ type: z.ZodLiteral<"notional">;
259
+ data: z.ZodObject<{
260
+ priceSource: z.ZodEnum<{
261
+ mid: "mid";
262
+ mark: "mark";
263
+ }>;
264
+ threshold: z.ZodNumber;
265
+ }, z.core.$strip>;
266
+ }, z.core.$strip>, z.ZodObject<{
267
+ type: z.ZodLiteral<"upnl">;
268
+ data: z.ZodObject<{
269
+ priceSource: z.ZodEnum<{
270
+ mid: "mid";
271
+ mark: "mark";
272
+ }>;
273
+ threshold: z.ZodNumber;
274
+ }, z.core.$strip>;
275
+ }, z.core.$strip>, z.ZodObject<{
276
+ type: z.ZodLiteral<"upnl_bps">;
277
+ data: z.ZodObject<{
278
+ priceSource: z.ZodEnum<{
279
+ mid: "mid";
280
+ mark: "mark";
281
+ }>;
282
+ threshold: z.ZodNumber;
283
+ }, z.core.$strip>;
284
+ }, z.core.$strip>], "type">;
285
+ }, z.core.$strip>, z.ZodObject<{
286
+ intent: z.ZodLiteral<"CLOSE">;
287
+ type: z.ZodLiteral<"MARKET">;
288
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
289
+ type: z.ZodLiteral<"notional_trailing">;
290
+ data: z.ZodObject<{
291
+ priceSource: z.ZodEnum<{
292
+ mid: "mid";
293
+ mark: "mark";
294
+ }>;
295
+ }, z.core.$strip>;
296
+ }, z.core.$strip>, z.ZodObject<{
297
+ type: z.ZodLiteral<"upnl_trailing">;
298
+ data: z.ZodObject<{
299
+ priceSource: z.ZodEnum<{
300
+ mid: "mid";
301
+ mark: "mark";
302
+ }>;
303
+ }, z.core.$strip>;
304
+ }, z.core.$strip>, z.ZodObject<{
305
+ type: z.ZodLiteral<"upnl_bps_trailing">;
306
+ data: z.ZodObject<{
307
+ priceSource: z.ZodEnum<{
308
+ mid: "mid";
309
+ mark: "mark";
310
+ }>;
311
+ }, z.core.$strip>;
312
+ }, z.core.$strip>], "type">;
313
+ trailing: z.ZodObject<{
314
+ mode: z.ZodEnum<{
315
+ RELATIVE_BPS: "RELATIVE_BPS";
316
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
317
+ }>;
318
+ deltaValue: z.ZodNumber;
319
+ activationValue: z.ZodOptional<z.ZodNumber>;
320
+ }, z.core.$strip>;
321
+ }, z.core.$strip>]>>>;
105
322
  payload: z.ZodObject<{
106
323
  type: z.ZodLiteral<"MARKET">;
107
324
  legs: z.ZodTuple<[z.ZodObject<{
@@ -431,153 +648,6 @@ export declare const CreateTriggerMarketClose: z.ZodUnion<readonly [z.ZodObject<
431
648
  }, z.core.$strip>;
432
649
  clientId: z.ZodOptional<z.ZodString>;
433
650
  }, z.core.$strip>]>;
434
- export declare const AttachTriggerMarketCloseStatic: z.ZodObject<{
435
- intent: z.ZodLiteral<"CLOSE">;
436
- type: z.ZodLiteral<"MARKET">;
437
- bracketType: z.ZodEnum<{
438
- STOP_LOSS: "STOP_LOSS";
439
- TAKE_PROFIT: "TAKE_PROFIT";
440
- NONE: "NONE";
441
- }>;
442
- condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
443
- type: z.ZodLiteral<"notional">;
444
- data: z.ZodObject<{
445
- priceSource: z.ZodEnum<{
446
- mid: "mid";
447
- mark: "mark";
448
- }>;
449
- threshold: z.ZodNumber;
450
- }, z.core.$strip>;
451
- }, z.core.$strip>, z.ZodObject<{
452
- type: z.ZodLiteral<"upnl">;
453
- data: z.ZodObject<{
454
- priceSource: z.ZodEnum<{
455
- mid: "mid";
456
- mark: "mark";
457
- }>;
458
- threshold: z.ZodNumber;
459
- }, z.core.$strip>;
460
- }, z.core.$strip>, z.ZodObject<{
461
- type: z.ZodLiteral<"upnl_bps">;
462
- data: z.ZodObject<{
463
- priceSource: z.ZodEnum<{
464
- mid: "mid";
465
- mark: "mark";
466
- }>;
467
- threshold: z.ZodNumber;
468
- }, z.core.$strip>;
469
- }, z.core.$strip>], "type">;
470
- }, z.core.$strip>;
471
- export declare const AttachTriggerMarketCloseTrailing: z.ZodObject<{
472
- intent: z.ZodLiteral<"CLOSE">;
473
- type: z.ZodLiteral<"MARKET">;
474
- condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
475
- type: z.ZodLiteral<"notional_trailing">;
476
- data: z.ZodObject<{
477
- priceSource: z.ZodEnum<{
478
- mid: "mid";
479
- mark: "mark";
480
- }>;
481
- }, z.core.$strip>;
482
- }, z.core.$strip>, z.ZodObject<{
483
- type: z.ZodLiteral<"upnl_trailing">;
484
- data: z.ZodObject<{
485
- priceSource: z.ZodEnum<{
486
- mid: "mid";
487
- mark: "mark";
488
- }>;
489
- }, z.core.$strip>;
490
- }, z.core.$strip>, z.ZodObject<{
491
- type: z.ZodLiteral<"upnl_bps_trailing">;
492
- data: z.ZodObject<{
493
- priceSource: z.ZodEnum<{
494
- mid: "mid";
495
- mark: "mark";
496
- }>;
497
- }, z.core.$strip>;
498
- }, z.core.$strip>], "type">;
499
- trailing: z.ZodObject<{
500
- mode: z.ZodEnum<{
501
- RELATIVE_BPS: "RELATIVE_BPS";
502
- ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
503
- }>;
504
- deltaValue: z.ZodNumber;
505
- activationValue: z.ZodOptional<z.ZodNumber>;
506
- }, z.core.$strip>;
507
- }, z.core.$strip>;
508
- export declare const AttachTriggerMarketClose: z.ZodUnion<readonly [z.ZodObject<{
509
- intent: z.ZodLiteral<"CLOSE">;
510
- type: z.ZodLiteral<"MARKET">;
511
- bracketType: z.ZodEnum<{
512
- STOP_LOSS: "STOP_LOSS";
513
- TAKE_PROFIT: "TAKE_PROFIT";
514
- NONE: "NONE";
515
- }>;
516
- condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
517
- type: z.ZodLiteral<"notional">;
518
- data: z.ZodObject<{
519
- priceSource: z.ZodEnum<{
520
- mid: "mid";
521
- mark: "mark";
522
- }>;
523
- threshold: z.ZodNumber;
524
- }, z.core.$strip>;
525
- }, z.core.$strip>, z.ZodObject<{
526
- type: z.ZodLiteral<"upnl">;
527
- data: z.ZodObject<{
528
- priceSource: z.ZodEnum<{
529
- mid: "mid";
530
- mark: "mark";
531
- }>;
532
- threshold: z.ZodNumber;
533
- }, z.core.$strip>;
534
- }, z.core.$strip>, z.ZodObject<{
535
- type: z.ZodLiteral<"upnl_bps">;
536
- data: z.ZodObject<{
537
- priceSource: z.ZodEnum<{
538
- mid: "mid";
539
- mark: "mark";
540
- }>;
541
- threshold: z.ZodNumber;
542
- }, z.core.$strip>;
543
- }, z.core.$strip>], "type">;
544
- }, z.core.$strip>, z.ZodObject<{
545
- intent: z.ZodLiteral<"CLOSE">;
546
- type: z.ZodLiteral<"MARKET">;
547
- condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
548
- type: z.ZodLiteral<"notional_trailing">;
549
- data: z.ZodObject<{
550
- priceSource: z.ZodEnum<{
551
- mid: "mid";
552
- mark: "mark";
553
- }>;
554
- }, z.core.$strip>;
555
- }, z.core.$strip>, z.ZodObject<{
556
- type: z.ZodLiteral<"upnl_trailing">;
557
- data: z.ZodObject<{
558
- priceSource: z.ZodEnum<{
559
- mid: "mid";
560
- mark: "mark";
561
- }>;
562
- }, z.core.$strip>;
563
- }, z.core.$strip>, z.ZodObject<{
564
- type: z.ZodLiteral<"upnl_bps_trailing">;
565
- data: z.ZodObject<{
566
- priceSource: z.ZodEnum<{
567
- mid: "mid";
568
- mark: "mark";
569
- }>;
570
- }, z.core.$strip>;
571
- }, z.core.$strip>], "type">;
572
- trailing: z.ZodObject<{
573
- mode: z.ZodEnum<{
574
- RELATIVE_BPS: "RELATIVE_BPS";
575
- ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
576
- }>;
577
- deltaValue: z.ZodNumber;
578
- activationValue: z.ZodOptional<z.ZodNumber>;
579
- }, z.core.$strip>;
580
- }, z.core.$strip>]>;
581
651
  export declare const CreateTriggerOpen: z.ZodDiscriminatedUnion<[z.ZodObject<{
582
652
  intent: z.ZodLiteral<"OPEN">;
583
653
  type: z.ZodLiteral<"MARKET">;
@@ -673,6 +743,78 @@ export declare const CreateTriggerOpen: z.ZodDiscriminatedUnion<[z.ZodObject<{
673
743
  threshold: z.ZodNumber;
674
744
  }, z.core.$strip>;
675
745
  }, z.core.$strip>], "type">;
746
+ attachTriggers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
747
+ intent: z.ZodLiteral<"CLOSE">;
748
+ type: z.ZodLiteral<"MARKET">;
749
+ bracketType: z.ZodEnum<{
750
+ STOP_LOSS: "STOP_LOSS";
751
+ TAKE_PROFIT: "TAKE_PROFIT";
752
+ }>;
753
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
754
+ type: z.ZodLiteral<"notional">;
755
+ data: z.ZodObject<{
756
+ priceSource: z.ZodEnum<{
757
+ mid: "mid";
758
+ mark: "mark";
759
+ }>;
760
+ threshold: z.ZodNumber;
761
+ }, z.core.$strip>;
762
+ }, z.core.$strip>, z.ZodObject<{
763
+ type: z.ZodLiteral<"upnl">;
764
+ data: z.ZodObject<{
765
+ priceSource: z.ZodEnum<{
766
+ mid: "mid";
767
+ mark: "mark";
768
+ }>;
769
+ threshold: z.ZodNumber;
770
+ }, z.core.$strip>;
771
+ }, z.core.$strip>, z.ZodObject<{
772
+ type: z.ZodLiteral<"upnl_bps">;
773
+ data: z.ZodObject<{
774
+ priceSource: z.ZodEnum<{
775
+ mid: "mid";
776
+ mark: "mark";
777
+ }>;
778
+ threshold: z.ZodNumber;
779
+ }, z.core.$strip>;
780
+ }, z.core.$strip>], "type">;
781
+ }, z.core.$strip>, z.ZodObject<{
782
+ intent: z.ZodLiteral<"CLOSE">;
783
+ type: z.ZodLiteral<"MARKET">;
784
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
785
+ type: z.ZodLiteral<"notional_trailing">;
786
+ data: z.ZodObject<{
787
+ priceSource: z.ZodEnum<{
788
+ mid: "mid";
789
+ mark: "mark";
790
+ }>;
791
+ }, z.core.$strip>;
792
+ }, z.core.$strip>, z.ZodObject<{
793
+ type: z.ZodLiteral<"upnl_trailing">;
794
+ data: z.ZodObject<{
795
+ priceSource: z.ZodEnum<{
796
+ mid: "mid";
797
+ mark: "mark";
798
+ }>;
799
+ }, z.core.$strip>;
800
+ }, z.core.$strip>, z.ZodObject<{
801
+ type: z.ZodLiteral<"upnl_bps_trailing">;
802
+ data: z.ZodObject<{
803
+ priceSource: z.ZodEnum<{
804
+ mid: "mid";
805
+ mark: "mark";
806
+ }>;
807
+ }, z.core.$strip>;
808
+ }, z.core.$strip>], "type">;
809
+ trailing: z.ZodObject<{
810
+ mode: z.ZodEnum<{
811
+ RELATIVE_BPS: "RELATIVE_BPS";
812
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
813
+ }>;
814
+ deltaValue: z.ZodNumber;
815
+ activationValue: z.ZodOptional<z.ZodNumber>;
816
+ }, z.core.$strip>;
817
+ }, z.core.$strip>]>>>;
676
818
  payload: z.ZodObject<{
677
819
  type: z.ZodLiteral<"MARKET">;
678
820
  legs: z.ZodTuple<[z.ZodObject<{
@@ -861,3 +1003,4 @@ export type AttachTriggerMarketClose = z.output<typeof AttachTriggerMarketClose>
861
1003
  export type CreateTriggerOpen = z.output<typeof CreateTriggerOpen>;
862
1004
  export type CreateTriggerClose = z.output<typeof CreateTriggerClose>;
863
1005
  export type TrailingConfig = z.output<typeof TrailingConfig>;
1006
+ export declare function isAttachTriggerMarketCloseTrailing(attachedTrigger: AttachTriggerMarketClose): attachedTrigger is AttachTriggerMarketCloseTrailing;