@pear-protocol/types 0.0.18 → 0.0.19

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.
@@ -1,31 +1,14 @@
1
1
  import { z } from 'zod';
2
- export declare const TriggerIntent: z.ZodEnum<{
3
- OPEN: "OPEN";
4
- CLOSE: "CLOSE";
5
- }>;
6
- export type TriggerIntent = z.infer<typeof TriggerIntent>;
7
- export declare const TriggerStatus: z.ZodEnum<{
8
- CANCELLED: "CANCELLED";
9
- ACTIVE: "ACTIVE";
10
- TRIGGERED: "TRIGGERED";
11
- }>;
12
- export type TriggerStatus = z.infer<typeof TriggerStatus>;
13
- export declare const TriggerCancelledReason: z.ZodEnum<{
14
- USER: "USER";
15
- POSITION_CLOSED: "POSITION_CLOSED";
16
- SYSTEM: "SYSTEM";
17
- POSITION_NETTED: "POSITION_NETTED";
18
- }>;
19
- export type TriggerCancelledReason = z.infer<typeof TriggerCancelledReason>;
20
- export declare const BracketType: z.ZodEnum<{
21
- STOP_LOSS: "STOP_LOSS";
22
- TAKE_PROFIT: "TAKE_PROFIT";
23
- NONE: "NONE";
24
- }>;
25
- export type BracketType = z.infer<typeof BracketType>;
26
2
  export declare const Trailing: z.ZodObject<{
3
+ mode: z.ZodEnum<{
4
+ RELATIVE_BPS: "RELATIVE_BPS";
5
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
6
+ }>;
27
7
  deltaValue: z.ZodNumber;
28
- activationValue: z.ZodNumber;
8
+ activationValue: z.ZodOptional<z.ZodNumber>;
9
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
10
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
11
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
29
12
  }, z.core.$strip>;
30
13
  declare const BaseTrigger: z.ZodObject<{
31
14
  id: z.ZodUUID;
@@ -163,7 +146,7 @@ export declare const TriggerMarketOpen: z.ZodObject<{
163
146
  intent: z.ZodLiteral<"OPEN">;
164
147
  type: z.ZodLiteral<"MARKET">;
165
148
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
166
- type: z.ZodLiteral<"ratio_v1">;
149
+ type: z.ZodLiteral<"ratio">;
167
150
  data: z.ZodObject<{
168
151
  priceSource: z.ZodEnum<{
169
152
  mid: "mid";
@@ -171,45 +154,28 @@ export declare const TriggerMarketOpen: z.ZodObject<{
171
154
  }>;
172
155
  symbol_a: z.ZodString;
173
156
  symbol_b: z.ZodString;
174
- direction: z.ZodEnum<{
175
- ABOVE: "ABOVE";
176
- BELOW: "BELOW";
157
+ track: z.ZodEnum<{
158
+ PEAK: "PEAK";
159
+ TROUGH: "TROUGH";
177
160
  }>;
178
161
  threshold: z.ZodNumber;
179
162
  }, z.core.$strip>;
180
163
  }, z.core.$strip>, z.ZodObject<{
181
- type: z.ZodLiteral<"price_v1">;
164
+ type: z.ZodLiteral<"price">;
182
165
  data: z.ZodObject<{
183
166
  priceSource: z.ZodEnum<{
184
167
  mid: "mid";
185
168
  mark: "mark";
186
169
  }>;
187
170
  symbol: z.ZodString;
188
- direction: z.ZodEnum<{
189
- ABOVE: "ABOVE";
190
- BELOW: "BELOW";
191
- }>;
192
- threshold: z.ZodNumber;
193
- }, z.core.$strip>;
194
- }, z.core.$strip>, z.ZodObject<{
195
- type: z.ZodLiteral<"index_v1">;
196
- data: z.ZodObject<{
197
- priceSource: z.ZodEnum<{
198
- mid: "mid";
199
- mark: "mark";
200
- }>;
201
- basket: z.ZodArray<z.ZodObject<{
202
- symbol: z.ZodString;
203
- weight: z.ZodNumber;
204
- }, z.core.$strip>>;
205
- direction: z.ZodEnum<{
206
- ABOVE: "ABOVE";
207
- BELOW: "BELOW";
171
+ track: z.ZodEnum<{
172
+ PEAK: "PEAK";
173
+ TROUGH: "TROUGH";
208
174
  }>;
209
175
  threshold: z.ZodNumber;
210
176
  }, z.core.$strip>;
211
177
  }, z.core.$strip>, z.ZodObject<{
212
- type: z.ZodLiteral<"weighted_ratio_v1">;
178
+ type: z.ZodLiteral<"weighted_ratio">;
213
179
  data: z.ZodObject<{
214
180
  priceSource: z.ZodEnum<{
215
181
  mid: "mid";
@@ -223,9 +189,9 @@ export declare const TriggerMarketOpen: z.ZodObject<{
223
189
  }>;
224
190
  weight: z.ZodNumber;
225
191
  }, z.core.$strip>>;
226
- direction: z.ZodEnum<{
227
- ABOVE: "ABOVE";
228
- BELOW: "BELOW";
192
+ track: z.ZodEnum<{
193
+ PEAK: "PEAK";
194
+ TROUGH: "TROUGH";
229
195
  }>;
230
196
  threshold: z.ZodNumber;
231
197
  }, z.core.$strip>;
@@ -326,7 +292,7 @@ export declare const TriggerMarketAdjust: z.ZodObject<{
326
292
  intent: z.ZodLiteral<"ADJUST">;
327
293
  type: z.ZodLiteral<"MARKET">;
328
294
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
329
- type: z.ZodLiteral<"ratio_v1">;
295
+ type: z.ZodLiteral<"ratio">;
330
296
  data: z.ZodObject<{
331
297
  priceSource: z.ZodEnum<{
332
298
  mid: "mid";
@@ -334,45 +300,28 @@ export declare const TriggerMarketAdjust: z.ZodObject<{
334
300
  }>;
335
301
  symbol_a: z.ZodString;
336
302
  symbol_b: z.ZodString;
337
- direction: z.ZodEnum<{
338
- ABOVE: "ABOVE";
339
- BELOW: "BELOW";
303
+ track: z.ZodEnum<{
304
+ PEAK: "PEAK";
305
+ TROUGH: "TROUGH";
340
306
  }>;
341
307
  threshold: z.ZodNumber;
342
308
  }, z.core.$strip>;
343
309
  }, z.core.$strip>, z.ZodObject<{
344
- type: z.ZodLiteral<"price_v1">;
310
+ type: z.ZodLiteral<"price">;
345
311
  data: z.ZodObject<{
346
312
  priceSource: z.ZodEnum<{
347
313
  mid: "mid";
348
314
  mark: "mark";
349
315
  }>;
350
316
  symbol: z.ZodString;
351
- direction: z.ZodEnum<{
352
- ABOVE: "ABOVE";
353
- BELOW: "BELOW";
354
- }>;
355
- threshold: z.ZodNumber;
356
- }, z.core.$strip>;
357
- }, z.core.$strip>, z.ZodObject<{
358
- type: z.ZodLiteral<"index_v1">;
359
- data: z.ZodObject<{
360
- priceSource: z.ZodEnum<{
361
- mid: "mid";
362
- mark: "mark";
363
- }>;
364
- basket: z.ZodArray<z.ZodObject<{
365
- symbol: z.ZodString;
366
- weight: z.ZodNumber;
367
- }, z.core.$strip>>;
368
- direction: z.ZodEnum<{
369
- ABOVE: "ABOVE";
370
- BELOW: "BELOW";
317
+ track: z.ZodEnum<{
318
+ PEAK: "PEAK";
319
+ TROUGH: "TROUGH";
371
320
  }>;
372
321
  threshold: z.ZodNumber;
373
322
  }, z.core.$strip>;
374
323
  }, z.core.$strip>, z.ZodObject<{
375
- type: z.ZodLiteral<"weighted_ratio_v1">;
324
+ type: z.ZodLiteral<"weighted_ratio">;
376
325
  data: z.ZodObject<{
377
326
  priceSource: z.ZodEnum<{
378
327
  mid: "mid";
@@ -386,50 +335,50 @@ export declare const TriggerMarketAdjust: z.ZodObject<{
386
335
  }>;
387
336
  weight: z.ZodNumber;
388
337
  }, z.core.$strip>>;
389
- direction: z.ZodEnum<{
390
- ABOVE: "ABOVE";
391
- BELOW: "BELOW";
338
+ track: z.ZodEnum<{
339
+ PEAK: "PEAK";
340
+ TROUGH: "TROUGH";
392
341
  }>;
393
342
  threshold: z.ZodNumber;
394
343
  }, z.core.$strip>;
395
344
  }, z.core.$strip>, z.ZodObject<{
396
- type: z.ZodLiteral<"position_value_v1">;
345
+ type: z.ZodLiteral<"notional">;
397
346
  data: z.ZodObject<{
398
347
  priceSource: z.ZodEnum<{
399
348
  mid: "mid";
400
349
  mark: "mark";
401
350
  }>;
402
- direction: z.ZodEnum<{
403
- ABOVE: "ABOVE";
404
- BELOW: "BELOW";
351
+ track: z.ZodEnum<{
352
+ PEAK: "PEAK";
353
+ TROUGH: "TROUGH";
405
354
  }>;
406
355
  threshold: z.ZodNumber;
407
356
  }, z.core.$strip>;
408
357
  }, z.core.$strip>, z.ZodObject<{
409
- type: z.ZodLiteral<"position_upnl_value_v1">;
358
+ type: z.ZodLiteral<"upnl">;
410
359
  data: z.ZodObject<{
411
360
  priceSource: z.ZodEnum<{
412
361
  mid: "mid";
413
362
  mark: "mark";
414
363
  }>;
415
- direction: z.ZodEnum<{
416
- ABOVE: "ABOVE";
417
- BELOW: "BELOW";
364
+ track: z.ZodEnum<{
365
+ PEAK: "PEAK";
366
+ TROUGH: "TROUGH";
418
367
  }>;
419
368
  threshold: z.ZodNumber;
420
369
  }, z.core.$strip>;
421
370
  }, z.core.$strip>, z.ZodObject<{
422
- type: z.ZodLiteral<"position_upnl_percentage_v1">;
371
+ type: z.ZodLiteral<"upnl_bps">;
423
372
  data: z.ZodObject<{
424
373
  priceSource: z.ZodEnum<{
425
374
  mid: "mid";
426
375
  mark: "mark";
427
376
  }>;
428
- direction: z.ZodEnum<{
429
- ABOVE: "ABOVE";
430
- BELOW: "BELOW";
377
+ track: z.ZodEnum<{
378
+ PEAK: "PEAK";
379
+ TROUGH: "TROUGH";
431
380
  }>;
432
- threshold_bps: z.ZodNumber;
381
+ threshold: z.ZodNumber;
433
382
  }, z.core.$strip>;
434
383
  }, z.core.$strip>], "type">;
435
384
  context: z.ZodObject<{
@@ -465,8 +414,15 @@ export declare const TriggerMarketAdjust: z.ZodObject<{
465
414
  }, z.core.$strip>>;
466
415
  }, z.core.$strip>;
467
416
  trailing: z.ZodOptional<z.ZodObject<{
417
+ mode: z.ZodEnum<{
418
+ RELATIVE_BPS: "RELATIVE_BPS";
419
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
420
+ }>;
468
421
  deltaValue: z.ZodNumber;
469
- activationValue: z.ZodNumber;
422
+ activationValue: z.ZodOptional<z.ZodNumber>;
423
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
424
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
425
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
470
426
  }, z.core.$strip>>;
471
427
  }, z.core.$strip>;
472
428
  export declare const TriggerMarketClose: z.ZodObject<{
@@ -538,7 +494,7 @@ export declare const TriggerMarketClose: z.ZodObject<{
538
494
  intent: z.ZodLiteral<"CLOSE">;
539
495
  type: z.ZodLiteral<"MARKET">;
540
496
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
541
- type: z.ZodLiteral<"ratio_v1">;
497
+ type: z.ZodLiteral<"ratio">;
542
498
  data: z.ZodObject<{
543
499
  priceSource: z.ZodEnum<{
544
500
  mid: "mid";
@@ -546,28 +502,28 @@ export declare const TriggerMarketClose: z.ZodObject<{
546
502
  }>;
547
503
  symbol_a: z.ZodString;
548
504
  symbol_b: z.ZodString;
549
- direction: z.ZodEnum<{
550
- ABOVE: "ABOVE";
551
- BELOW: "BELOW";
505
+ track: z.ZodEnum<{
506
+ PEAK: "PEAK";
507
+ TROUGH: "TROUGH";
552
508
  }>;
553
509
  threshold: z.ZodNumber;
554
510
  }, z.core.$strip>;
555
511
  }, z.core.$strip>, z.ZodObject<{
556
- type: z.ZodLiteral<"price_v1">;
512
+ type: z.ZodLiteral<"price">;
557
513
  data: z.ZodObject<{
558
514
  priceSource: z.ZodEnum<{
559
515
  mid: "mid";
560
516
  mark: "mark";
561
517
  }>;
562
518
  symbol: z.ZodString;
563
- direction: z.ZodEnum<{
564
- ABOVE: "ABOVE";
565
- BELOW: "BELOW";
519
+ track: z.ZodEnum<{
520
+ PEAK: "PEAK";
521
+ TROUGH: "TROUGH";
566
522
  }>;
567
523
  threshold: z.ZodNumber;
568
524
  }, z.core.$strip>;
569
525
  }, z.core.$strip>, z.ZodObject<{
570
- type: z.ZodLiteral<"index_v1">;
526
+ type: z.ZodLiteral<"weighted_ratio">;
571
527
  data: z.ZodObject<{
572
528
  priceSource: z.ZodEnum<{
573
529
  mid: "mid";
@@ -575,16 +531,78 @@ export declare const TriggerMarketClose: z.ZodObject<{
575
531
  }>;
576
532
  basket: z.ZodArray<z.ZodObject<{
577
533
  symbol: z.ZodString;
534
+ side: z.ZodEnum<{
535
+ BUY: "BUY";
536
+ SELL: "SELL";
537
+ }>;
578
538
  weight: z.ZodNumber;
579
539
  }, z.core.$strip>>;
580
- direction: z.ZodEnum<{
581
- ABOVE: "ABOVE";
582
- BELOW: "BELOW";
540
+ track: z.ZodEnum<{
541
+ PEAK: "PEAK";
542
+ TROUGH: "TROUGH";
543
+ }>;
544
+ threshold: z.ZodNumber;
545
+ }, z.core.$strip>;
546
+ }, z.core.$strip>, z.ZodObject<{
547
+ type: z.ZodLiteral<"notional">;
548
+ data: z.ZodObject<{
549
+ priceSource: z.ZodEnum<{
550
+ mid: "mid";
551
+ mark: "mark";
552
+ }>;
553
+ track: z.ZodEnum<{
554
+ PEAK: "PEAK";
555
+ TROUGH: "TROUGH";
556
+ }>;
557
+ threshold: z.ZodNumber;
558
+ }, z.core.$strip>;
559
+ }, z.core.$strip>, z.ZodObject<{
560
+ type: z.ZodLiteral<"upnl">;
561
+ data: z.ZodObject<{
562
+ priceSource: z.ZodEnum<{
563
+ mid: "mid";
564
+ mark: "mark";
565
+ }>;
566
+ track: z.ZodEnum<{
567
+ PEAK: "PEAK";
568
+ TROUGH: "TROUGH";
569
+ }>;
570
+ threshold: z.ZodNumber;
571
+ }, z.core.$strip>;
572
+ }, z.core.$strip>, z.ZodObject<{
573
+ type: z.ZodLiteral<"upnl_bps">;
574
+ data: z.ZodObject<{
575
+ priceSource: z.ZodEnum<{
576
+ mid: "mid";
577
+ mark: "mark";
578
+ }>;
579
+ track: z.ZodEnum<{
580
+ PEAK: "PEAK";
581
+ TROUGH: "TROUGH";
583
582
  }>;
584
583
  threshold: z.ZodNumber;
585
584
  }, z.core.$strip>;
586
585
  }, z.core.$strip>, z.ZodObject<{
587
- type: z.ZodLiteral<"weighted_ratio_v1">;
586
+ type: z.ZodLiteral<"ratio_trailing">;
587
+ data: z.ZodObject<{
588
+ priceSource: z.ZodEnum<{
589
+ mid: "mid";
590
+ mark: "mark";
591
+ }>;
592
+ symbol_a: z.ZodString;
593
+ symbol_b: z.ZodString;
594
+ }, z.core.$strip>;
595
+ }, z.core.$strip>, z.ZodObject<{
596
+ type: z.ZodLiteral<"price_trailing">;
597
+ data: z.ZodObject<{
598
+ priceSource: z.ZodEnum<{
599
+ mid: "mid";
600
+ mark: "mark";
601
+ }>;
602
+ symbol: z.ZodString;
603
+ }, z.core.$strip>;
604
+ }, z.core.$strip>, z.ZodObject<{
605
+ type: z.ZodLiteral<"weighted_ratio_trailing">;
588
606
  data: z.ZodObject<{
589
607
  priceSource: z.ZodEnum<{
590
608
  mid: "mid";
@@ -598,50 +616,30 @@ export declare const TriggerMarketClose: z.ZodObject<{
598
616
  }>;
599
617
  weight: z.ZodNumber;
600
618
  }, z.core.$strip>>;
601
- direction: z.ZodEnum<{
602
- ABOVE: "ABOVE";
603
- BELOW: "BELOW";
604
- }>;
605
- threshold: z.ZodNumber;
606
619
  }, z.core.$strip>;
607
620
  }, z.core.$strip>, z.ZodObject<{
608
- type: z.ZodLiteral<"position_value_v1">;
621
+ type: z.ZodLiteral<"notional_trailing">;
609
622
  data: z.ZodObject<{
610
623
  priceSource: z.ZodEnum<{
611
624
  mid: "mid";
612
625
  mark: "mark";
613
626
  }>;
614
- direction: z.ZodEnum<{
615
- ABOVE: "ABOVE";
616
- BELOW: "BELOW";
617
- }>;
618
- threshold: z.ZodNumber;
619
627
  }, z.core.$strip>;
620
628
  }, z.core.$strip>, z.ZodObject<{
621
- type: z.ZodLiteral<"position_upnl_value_v1">;
629
+ type: z.ZodLiteral<"upnl_trailing">;
622
630
  data: z.ZodObject<{
623
631
  priceSource: z.ZodEnum<{
624
632
  mid: "mid";
625
633
  mark: "mark";
626
634
  }>;
627
- direction: z.ZodEnum<{
628
- ABOVE: "ABOVE";
629
- BELOW: "BELOW";
630
- }>;
631
- threshold: z.ZodNumber;
632
635
  }, z.core.$strip>;
633
636
  }, z.core.$strip>, z.ZodObject<{
634
- type: z.ZodLiteral<"position_upnl_percentage_v1">;
637
+ type: z.ZodLiteral<"upnl_bps_trailing">;
635
638
  data: z.ZodObject<{
636
639
  priceSource: z.ZodEnum<{
637
640
  mid: "mid";
638
641
  mark: "mark";
639
642
  }>;
640
- direction: z.ZodEnum<{
641
- ABOVE: "ABOVE";
642
- BELOW: "BELOW";
643
- }>;
644
- threshold_bps: z.ZodNumber;
645
643
  }, z.core.$strip>;
646
644
  }, z.core.$strip>], "type">;
647
645
  context: z.ZodObject<{
@@ -652,8 +650,15 @@ export declare const TriggerMarketClose: z.ZodObject<{
652
650
  }, z.core.$strip>;
653
651
  }, z.core.$strip>;
654
652
  trailing: z.ZodOptional<z.ZodObject<{
653
+ mode: z.ZodEnum<{
654
+ RELATIVE_BPS: "RELATIVE_BPS";
655
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
656
+ }>;
655
657
  deltaValue: z.ZodNumber;
656
- activationValue: z.ZodNumber;
658
+ activationValue: z.ZodOptional<z.ZodNumber>;
659
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
660
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
661
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
657
662
  }, z.core.$strip>>;
658
663
  }, z.core.$strip>;
659
664
  export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -725,7 +730,7 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
725
730
  intent: z.ZodLiteral<"OPEN">;
726
731
  type: z.ZodLiteral<"MARKET">;
727
732
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
728
- type: z.ZodLiteral<"ratio_v1">;
733
+ type: z.ZodLiteral<"ratio">;
729
734
  data: z.ZodObject<{
730
735
  priceSource: z.ZodEnum<{
731
736
  mid: "mid";
@@ -733,45 +738,28 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
733
738
  }>;
734
739
  symbol_a: z.ZodString;
735
740
  symbol_b: z.ZodString;
736
- direction: z.ZodEnum<{
737
- ABOVE: "ABOVE";
738
- BELOW: "BELOW";
741
+ track: z.ZodEnum<{
742
+ PEAK: "PEAK";
743
+ TROUGH: "TROUGH";
739
744
  }>;
740
745
  threshold: z.ZodNumber;
741
746
  }, z.core.$strip>;
742
747
  }, z.core.$strip>, z.ZodObject<{
743
- type: z.ZodLiteral<"price_v1">;
748
+ type: z.ZodLiteral<"price">;
744
749
  data: z.ZodObject<{
745
750
  priceSource: z.ZodEnum<{
746
751
  mid: "mid";
747
752
  mark: "mark";
748
753
  }>;
749
754
  symbol: z.ZodString;
750
- direction: z.ZodEnum<{
751
- ABOVE: "ABOVE";
752
- BELOW: "BELOW";
755
+ track: z.ZodEnum<{
756
+ PEAK: "PEAK";
757
+ TROUGH: "TROUGH";
753
758
  }>;
754
759
  threshold: z.ZodNumber;
755
760
  }, z.core.$strip>;
756
761
  }, z.core.$strip>, z.ZodObject<{
757
- type: z.ZodLiteral<"index_v1">;
758
- data: z.ZodObject<{
759
- priceSource: z.ZodEnum<{
760
- mid: "mid";
761
- mark: "mark";
762
- }>;
763
- basket: z.ZodArray<z.ZodObject<{
764
- symbol: z.ZodString;
765
- weight: z.ZodNumber;
766
- }, z.core.$strip>>;
767
- direction: z.ZodEnum<{
768
- ABOVE: "ABOVE";
769
- BELOW: "BELOW";
770
- }>;
771
- threshold: z.ZodNumber;
772
- }, z.core.$strip>;
773
- }, z.core.$strip>, z.ZodObject<{
774
- type: z.ZodLiteral<"weighted_ratio_v1">;
762
+ type: z.ZodLiteral<"weighted_ratio">;
775
763
  data: z.ZodObject<{
776
764
  priceSource: z.ZodEnum<{
777
765
  mid: "mid";
@@ -785,9 +773,9 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
785
773
  }>;
786
774
  weight: z.ZodNumber;
787
775
  }, z.core.$strip>>;
788
- direction: z.ZodEnum<{
789
- ABOVE: "ABOVE";
790
- BELOW: "BELOW";
776
+ track: z.ZodEnum<{
777
+ PEAK: "PEAK";
778
+ TROUGH: "TROUGH";
791
779
  }>;
792
780
  threshold: z.ZodNumber;
793
781
  }, z.core.$strip>;
@@ -887,7 +875,7 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
887
875
  intent: z.ZodLiteral<"ADJUST">;
888
876
  type: z.ZodLiteral<"MARKET">;
889
877
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
890
- type: z.ZodLiteral<"ratio_v1">;
878
+ type: z.ZodLiteral<"ratio">;
891
879
  data: z.ZodObject<{
892
880
  priceSource: z.ZodEnum<{
893
881
  mid: "mid";
@@ -895,45 +883,28 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
895
883
  }>;
896
884
  symbol_a: z.ZodString;
897
885
  symbol_b: z.ZodString;
898
- direction: z.ZodEnum<{
899
- ABOVE: "ABOVE";
900
- BELOW: "BELOW";
886
+ track: z.ZodEnum<{
887
+ PEAK: "PEAK";
888
+ TROUGH: "TROUGH";
901
889
  }>;
902
890
  threshold: z.ZodNumber;
903
891
  }, z.core.$strip>;
904
892
  }, z.core.$strip>, z.ZodObject<{
905
- type: z.ZodLiteral<"price_v1">;
893
+ type: z.ZodLiteral<"price">;
906
894
  data: z.ZodObject<{
907
895
  priceSource: z.ZodEnum<{
908
896
  mid: "mid";
909
897
  mark: "mark";
910
898
  }>;
911
899
  symbol: z.ZodString;
912
- direction: z.ZodEnum<{
913
- ABOVE: "ABOVE";
914
- BELOW: "BELOW";
915
- }>;
916
- threshold: z.ZodNumber;
917
- }, z.core.$strip>;
918
- }, z.core.$strip>, z.ZodObject<{
919
- type: z.ZodLiteral<"index_v1">;
920
- data: z.ZodObject<{
921
- priceSource: z.ZodEnum<{
922
- mid: "mid";
923
- mark: "mark";
924
- }>;
925
- basket: z.ZodArray<z.ZodObject<{
926
- symbol: z.ZodString;
927
- weight: z.ZodNumber;
928
- }, z.core.$strip>>;
929
- direction: z.ZodEnum<{
930
- ABOVE: "ABOVE";
931
- BELOW: "BELOW";
900
+ track: z.ZodEnum<{
901
+ PEAK: "PEAK";
902
+ TROUGH: "TROUGH";
932
903
  }>;
933
904
  threshold: z.ZodNumber;
934
905
  }, z.core.$strip>;
935
906
  }, z.core.$strip>, z.ZodObject<{
936
- type: z.ZodLiteral<"weighted_ratio_v1">;
907
+ type: z.ZodLiteral<"weighted_ratio">;
937
908
  data: z.ZodObject<{
938
909
  priceSource: z.ZodEnum<{
939
910
  mid: "mid";
@@ -947,50 +918,50 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
947
918
  }>;
948
919
  weight: z.ZodNumber;
949
920
  }, z.core.$strip>>;
950
- direction: z.ZodEnum<{
951
- ABOVE: "ABOVE";
952
- BELOW: "BELOW";
921
+ track: z.ZodEnum<{
922
+ PEAK: "PEAK";
923
+ TROUGH: "TROUGH";
953
924
  }>;
954
925
  threshold: z.ZodNumber;
955
926
  }, z.core.$strip>;
956
927
  }, z.core.$strip>, z.ZodObject<{
957
- type: z.ZodLiteral<"position_value_v1">;
928
+ type: z.ZodLiteral<"notional">;
958
929
  data: z.ZodObject<{
959
930
  priceSource: z.ZodEnum<{
960
931
  mid: "mid";
961
932
  mark: "mark";
962
933
  }>;
963
- direction: z.ZodEnum<{
964
- ABOVE: "ABOVE";
965
- BELOW: "BELOW";
934
+ track: z.ZodEnum<{
935
+ PEAK: "PEAK";
936
+ TROUGH: "TROUGH";
966
937
  }>;
967
938
  threshold: z.ZodNumber;
968
939
  }, z.core.$strip>;
969
940
  }, z.core.$strip>, z.ZodObject<{
970
- type: z.ZodLiteral<"position_upnl_value_v1">;
941
+ type: z.ZodLiteral<"upnl">;
971
942
  data: z.ZodObject<{
972
943
  priceSource: z.ZodEnum<{
973
944
  mid: "mid";
974
945
  mark: "mark";
975
946
  }>;
976
- direction: z.ZodEnum<{
977
- ABOVE: "ABOVE";
978
- BELOW: "BELOW";
947
+ track: z.ZodEnum<{
948
+ PEAK: "PEAK";
949
+ TROUGH: "TROUGH";
979
950
  }>;
980
951
  threshold: z.ZodNumber;
981
952
  }, z.core.$strip>;
982
953
  }, z.core.$strip>, z.ZodObject<{
983
- type: z.ZodLiteral<"position_upnl_percentage_v1">;
954
+ type: z.ZodLiteral<"upnl_bps">;
984
955
  data: z.ZodObject<{
985
956
  priceSource: z.ZodEnum<{
986
957
  mid: "mid";
987
958
  mark: "mark";
988
959
  }>;
989
- direction: z.ZodEnum<{
990
- ABOVE: "ABOVE";
991
- BELOW: "BELOW";
960
+ track: z.ZodEnum<{
961
+ PEAK: "PEAK";
962
+ TROUGH: "TROUGH";
992
963
  }>;
993
- threshold_bps: z.ZodNumber;
964
+ threshold: z.ZodNumber;
994
965
  }, z.core.$strip>;
995
966
  }, z.core.$strip>], "type">;
996
967
  context: z.ZodObject<{
@@ -1026,8 +997,15 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1026
997
  }, z.core.$strip>>;
1027
998
  }, z.core.$strip>;
1028
999
  trailing: z.ZodOptional<z.ZodObject<{
1000
+ mode: z.ZodEnum<{
1001
+ RELATIVE_BPS: "RELATIVE_BPS";
1002
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
1003
+ }>;
1029
1004
  deltaValue: z.ZodNumber;
1030
- activationValue: z.ZodNumber;
1005
+ activationValue: z.ZodOptional<z.ZodNumber>;
1006
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
1007
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
1008
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
1031
1009
  }, z.core.$strip>>;
1032
1010
  }, z.core.$strip>, z.ZodObject<{
1033
1011
  id: z.ZodUUID;
@@ -1098,7 +1076,7 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1098
1076
  intent: z.ZodLiteral<"CLOSE">;
1099
1077
  type: z.ZodLiteral<"MARKET">;
1100
1078
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1101
- type: z.ZodLiteral<"ratio_v1">;
1079
+ type: z.ZodLiteral<"ratio">;
1102
1080
  data: z.ZodObject<{
1103
1081
  priceSource: z.ZodEnum<{
1104
1082
  mid: "mid";
@@ -1106,28 +1084,28 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1106
1084
  }>;
1107
1085
  symbol_a: z.ZodString;
1108
1086
  symbol_b: z.ZodString;
1109
- direction: z.ZodEnum<{
1110
- ABOVE: "ABOVE";
1111
- BELOW: "BELOW";
1087
+ track: z.ZodEnum<{
1088
+ PEAK: "PEAK";
1089
+ TROUGH: "TROUGH";
1112
1090
  }>;
1113
1091
  threshold: z.ZodNumber;
1114
1092
  }, z.core.$strip>;
1115
1093
  }, z.core.$strip>, z.ZodObject<{
1116
- type: z.ZodLiteral<"price_v1">;
1094
+ type: z.ZodLiteral<"price">;
1117
1095
  data: z.ZodObject<{
1118
1096
  priceSource: z.ZodEnum<{
1119
1097
  mid: "mid";
1120
1098
  mark: "mark";
1121
1099
  }>;
1122
1100
  symbol: z.ZodString;
1123
- direction: z.ZodEnum<{
1124
- ABOVE: "ABOVE";
1125
- BELOW: "BELOW";
1101
+ track: z.ZodEnum<{
1102
+ PEAK: "PEAK";
1103
+ TROUGH: "TROUGH";
1126
1104
  }>;
1127
1105
  threshold: z.ZodNumber;
1128
1106
  }, z.core.$strip>;
1129
1107
  }, z.core.$strip>, z.ZodObject<{
1130
- type: z.ZodLiteral<"index_v1">;
1108
+ type: z.ZodLiteral<"weighted_ratio">;
1131
1109
  data: z.ZodObject<{
1132
1110
  priceSource: z.ZodEnum<{
1133
1111
  mid: "mid";
@@ -1135,16 +1113,78 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1135
1113
  }>;
1136
1114
  basket: z.ZodArray<z.ZodObject<{
1137
1115
  symbol: z.ZodString;
1116
+ side: z.ZodEnum<{
1117
+ BUY: "BUY";
1118
+ SELL: "SELL";
1119
+ }>;
1138
1120
  weight: z.ZodNumber;
1139
1121
  }, z.core.$strip>>;
1140
- direction: z.ZodEnum<{
1141
- ABOVE: "ABOVE";
1142
- BELOW: "BELOW";
1122
+ track: z.ZodEnum<{
1123
+ PEAK: "PEAK";
1124
+ TROUGH: "TROUGH";
1143
1125
  }>;
1144
1126
  threshold: z.ZodNumber;
1145
1127
  }, z.core.$strip>;
1146
1128
  }, z.core.$strip>, z.ZodObject<{
1147
- type: z.ZodLiteral<"weighted_ratio_v1">;
1129
+ type: z.ZodLiteral<"notional">;
1130
+ data: z.ZodObject<{
1131
+ priceSource: z.ZodEnum<{
1132
+ mid: "mid";
1133
+ mark: "mark";
1134
+ }>;
1135
+ track: z.ZodEnum<{
1136
+ PEAK: "PEAK";
1137
+ TROUGH: "TROUGH";
1138
+ }>;
1139
+ threshold: z.ZodNumber;
1140
+ }, z.core.$strip>;
1141
+ }, z.core.$strip>, z.ZodObject<{
1142
+ type: z.ZodLiteral<"upnl">;
1143
+ data: z.ZodObject<{
1144
+ priceSource: z.ZodEnum<{
1145
+ mid: "mid";
1146
+ mark: "mark";
1147
+ }>;
1148
+ track: z.ZodEnum<{
1149
+ PEAK: "PEAK";
1150
+ TROUGH: "TROUGH";
1151
+ }>;
1152
+ threshold: z.ZodNumber;
1153
+ }, z.core.$strip>;
1154
+ }, z.core.$strip>, z.ZodObject<{
1155
+ type: z.ZodLiteral<"upnl_bps">;
1156
+ data: z.ZodObject<{
1157
+ priceSource: z.ZodEnum<{
1158
+ mid: "mid";
1159
+ mark: "mark";
1160
+ }>;
1161
+ track: z.ZodEnum<{
1162
+ PEAK: "PEAK";
1163
+ TROUGH: "TROUGH";
1164
+ }>;
1165
+ threshold: z.ZodNumber;
1166
+ }, z.core.$strip>;
1167
+ }, z.core.$strip>, z.ZodObject<{
1168
+ type: z.ZodLiteral<"ratio_trailing">;
1169
+ data: z.ZodObject<{
1170
+ priceSource: z.ZodEnum<{
1171
+ mid: "mid";
1172
+ mark: "mark";
1173
+ }>;
1174
+ symbol_a: z.ZodString;
1175
+ symbol_b: z.ZodString;
1176
+ }, z.core.$strip>;
1177
+ }, z.core.$strip>, z.ZodObject<{
1178
+ type: z.ZodLiteral<"price_trailing">;
1179
+ data: z.ZodObject<{
1180
+ priceSource: z.ZodEnum<{
1181
+ mid: "mid";
1182
+ mark: "mark";
1183
+ }>;
1184
+ symbol: z.ZodString;
1185
+ }, z.core.$strip>;
1186
+ }, z.core.$strip>, z.ZodObject<{
1187
+ type: z.ZodLiteral<"weighted_ratio_trailing">;
1148
1188
  data: z.ZodObject<{
1149
1189
  priceSource: z.ZodEnum<{
1150
1190
  mid: "mid";
@@ -1158,50 +1198,30 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1158
1198
  }>;
1159
1199
  weight: z.ZodNumber;
1160
1200
  }, z.core.$strip>>;
1161
- direction: z.ZodEnum<{
1162
- ABOVE: "ABOVE";
1163
- BELOW: "BELOW";
1164
- }>;
1165
- threshold: z.ZodNumber;
1166
1201
  }, z.core.$strip>;
1167
1202
  }, z.core.$strip>, z.ZodObject<{
1168
- type: z.ZodLiteral<"position_value_v1">;
1203
+ type: z.ZodLiteral<"notional_trailing">;
1169
1204
  data: z.ZodObject<{
1170
1205
  priceSource: z.ZodEnum<{
1171
1206
  mid: "mid";
1172
1207
  mark: "mark";
1173
1208
  }>;
1174
- direction: z.ZodEnum<{
1175
- ABOVE: "ABOVE";
1176
- BELOW: "BELOW";
1177
- }>;
1178
- threshold: z.ZodNumber;
1179
1209
  }, z.core.$strip>;
1180
1210
  }, z.core.$strip>, z.ZodObject<{
1181
- type: z.ZodLiteral<"position_upnl_value_v1">;
1211
+ type: z.ZodLiteral<"upnl_trailing">;
1182
1212
  data: z.ZodObject<{
1183
1213
  priceSource: z.ZodEnum<{
1184
1214
  mid: "mid";
1185
1215
  mark: "mark";
1186
1216
  }>;
1187
- direction: z.ZodEnum<{
1188
- ABOVE: "ABOVE";
1189
- BELOW: "BELOW";
1190
- }>;
1191
- threshold: z.ZodNumber;
1192
1217
  }, z.core.$strip>;
1193
1218
  }, z.core.$strip>, z.ZodObject<{
1194
- type: z.ZodLiteral<"position_upnl_percentage_v1">;
1219
+ type: z.ZodLiteral<"upnl_bps_trailing">;
1195
1220
  data: z.ZodObject<{
1196
1221
  priceSource: z.ZodEnum<{
1197
1222
  mid: "mid";
1198
1223
  mark: "mark";
1199
1224
  }>;
1200
- direction: z.ZodEnum<{
1201
- ABOVE: "ABOVE";
1202
- BELOW: "BELOW";
1203
- }>;
1204
- threshold_bps: z.ZodNumber;
1205
1225
  }, z.core.$strip>;
1206
1226
  }, z.core.$strip>], "type">;
1207
1227
  context: z.ZodObject<{
@@ -1212,8 +1232,15 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1212
1232
  }, z.core.$strip>;
1213
1233
  }, z.core.$strip>;
1214
1234
  trailing: z.ZodOptional<z.ZodObject<{
1235
+ mode: z.ZodEnum<{
1236
+ RELATIVE_BPS: "RELATIVE_BPS";
1237
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
1238
+ }>;
1215
1239
  deltaValue: z.ZodNumber;
1216
- activationValue: z.ZodNumber;
1240
+ activationValue: z.ZodOptional<z.ZodNumber>;
1241
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
1242
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
1243
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
1217
1244
  }, z.core.$strip>>;
1218
1245
  }, z.core.$strip>], "intent">;
1219
1246
  export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
@@ -1285,7 +1312,7 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1285
1312
  intent: z.ZodLiteral<"OPEN">;
1286
1313
  type: z.ZodLiteral<"MARKET">;
1287
1314
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1288
- type: z.ZodLiteral<"ratio_v1">;
1315
+ type: z.ZodLiteral<"ratio">;
1289
1316
  data: z.ZodObject<{
1290
1317
  priceSource: z.ZodEnum<{
1291
1318
  mid: "mid";
@@ -1293,45 +1320,28 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1293
1320
  }>;
1294
1321
  symbol_a: z.ZodString;
1295
1322
  symbol_b: z.ZodString;
1296
- direction: z.ZodEnum<{
1297
- ABOVE: "ABOVE";
1298
- BELOW: "BELOW";
1323
+ track: z.ZodEnum<{
1324
+ PEAK: "PEAK";
1325
+ TROUGH: "TROUGH";
1299
1326
  }>;
1300
1327
  threshold: z.ZodNumber;
1301
1328
  }, z.core.$strip>;
1302
1329
  }, z.core.$strip>, z.ZodObject<{
1303
- type: z.ZodLiteral<"price_v1">;
1330
+ type: z.ZodLiteral<"price">;
1304
1331
  data: z.ZodObject<{
1305
1332
  priceSource: z.ZodEnum<{
1306
1333
  mid: "mid";
1307
1334
  mark: "mark";
1308
1335
  }>;
1309
1336
  symbol: z.ZodString;
1310
- direction: z.ZodEnum<{
1311
- ABOVE: "ABOVE";
1312
- BELOW: "BELOW";
1337
+ track: z.ZodEnum<{
1338
+ PEAK: "PEAK";
1339
+ TROUGH: "TROUGH";
1313
1340
  }>;
1314
1341
  threshold: z.ZodNumber;
1315
1342
  }, z.core.$strip>;
1316
1343
  }, z.core.$strip>, z.ZodObject<{
1317
- type: z.ZodLiteral<"index_v1">;
1318
- data: z.ZodObject<{
1319
- priceSource: z.ZodEnum<{
1320
- mid: "mid";
1321
- mark: "mark";
1322
- }>;
1323
- basket: z.ZodArray<z.ZodObject<{
1324
- symbol: z.ZodString;
1325
- weight: z.ZodNumber;
1326
- }, z.core.$strip>>;
1327
- direction: z.ZodEnum<{
1328
- ABOVE: "ABOVE";
1329
- BELOW: "BELOW";
1330
- }>;
1331
- threshold: z.ZodNumber;
1332
- }, z.core.$strip>;
1333
- }, z.core.$strip>, z.ZodObject<{
1334
- type: z.ZodLiteral<"weighted_ratio_v1">;
1344
+ type: z.ZodLiteral<"weighted_ratio">;
1335
1345
  data: z.ZodObject<{
1336
1346
  priceSource: z.ZodEnum<{
1337
1347
  mid: "mid";
@@ -1345,9 +1355,9 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1345
1355
  }>;
1346
1356
  weight: z.ZodNumber;
1347
1357
  }, z.core.$strip>>;
1348
- direction: z.ZodEnum<{
1349
- ABOVE: "ABOVE";
1350
- BELOW: "BELOW";
1358
+ track: z.ZodEnum<{
1359
+ PEAK: "PEAK";
1360
+ TROUGH: "TROUGH";
1351
1361
  }>;
1352
1362
  threshold: z.ZodNumber;
1353
1363
  }, z.core.$strip>;
@@ -1447,7 +1457,7 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1447
1457
  intent: z.ZodLiteral<"ADJUST">;
1448
1458
  type: z.ZodLiteral<"MARKET">;
1449
1459
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1450
- type: z.ZodLiteral<"ratio_v1">;
1460
+ type: z.ZodLiteral<"ratio">;
1451
1461
  data: z.ZodObject<{
1452
1462
  priceSource: z.ZodEnum<{
1453
1463
  mid: "mid";
@@ -1455,45 +1465,28 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1455
1465
  }>;
1456
1466
  symbol_a: z.ZodString;
1457
1467
  symbol_b: z.ZodString;
1458
- direction: z.ZodEnum<{
1459
- ABOVE: "ABOVE";
1460
- BELOW: "BELOW";
1468
+ track: z.ZodEnum<{
1469
+ PEAK: "PEAK";
1470
+ TROUGH: "TROUGH";
1461
1471
  }>;
1462
1472
  threshold: z.ZodNumber;
1463
1473
  }, z.core.$strip>;
1464
1474
  }, z.core.$strip>, z.ZodObject<{
1465
- type: z.ZodLiteral<"price_v1">;
1475
+ type: z.ZodLiteral<"price">;
1466
1476
  data: z.ZodObject<{
1467
1477
  priceSource: z.ZodEnum<{
1468
1478
  mid: "mid";
1469
1479
  mark: "mark";
1470
1480
  }>;
1471
1481
  symbol: z.ZodString;
1472
- direction: z.ZodEnum<{
1473
- ABOVE: "ABOVE";
1474
- BELOW: "BELOW";
1475
- }>;
1476
- threshold: z.ZodNumber;
1477
- }, z.core.$strip>;
1478
- }, z.core.$strip>, z.ZodObject<{
1479
- type: z.ZodLiteral<"index_v1">;
1480
- data: z.ZodObject<{
1481
- priceSource: z.ZodEnum<{
1482
- mid: "mid";
1483
- mark: "mark";
1484
- }>;
1485
- basket: z.ZodArray<z.ZodObject<{
1486
- symbol: z.ZodString;
1487
- weight: z.ZodNumber;
1488
- }, z.core.$strip>>;
1489
- direction: z.ZodEnum<{
1490
- ABOVE: "ABOVE";
1491
- BELOW: "BELOW";
1482
+ track: z.ZodEnum<{
1483
+ PEAK: "PEAK";
1484
+ TROUGH: "TROUGH";
1492
1485
  }>;
1493
1486
  threshold: z.ZodNumber;
1494
1487
  }, z.core.$strip>;
1495
1488
  }, z.core.$strip>, z.ZodObject<{
1496
- type: z.ZodLiteral<"weighted_ratio_v1">;
1489
+ type: z.ZodLiteral<"weighted_ratio">;
1497
1490
  data: z.ZodObject<{
1498
1491
  priceSource: z.ZodEnum<{
1499
1492
  mid: "mid";
@@ -1507,50 +1500,50 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1507
1500
  }>;
1508
1501
  weight: z.ZodNumber;
1509
1502
  }, z.core.$strip>>;
1510
- direction: z.ZodEnum<{
1511
- ABOVE: "ABOVE";
1512
- BELOW: "BELOW";
1503
+ track: z.ZodEnum<{
1504
+ PEAK: "PEAK";
1505
+ TROUGH: "TROUGH";
1513
1506
  }>;
1514
1507
  threshold: z.ZodNumber;
1515
1508
  }, z.core.$strip>;
1516
1509
  }, z.core.$strip>, z.ZodObject<{
1517
- type: z.ZodLiteral<"position_value_v1">;
1510
+ type: z.ZodLiteral<"notional">;
1518
1511
  data: z.ZodObject<{
1519
1512
  priceSource: z.ZodEnum<{
1520
1513
  mid: "mid";
1521
1514
  mark: "mark";
1522
1515
  }>;
1523
- direction: z.ZodEnum<{
1524
- ABOVE: "ABOVE";
1525
- BELOW: "BELOW";
1516
+ track: z.ZodEnum<{
1517
+ PEAK: "PEAK";
1518
+ TROUGH: "TROUGH";
1526
1519
  }>;
1527
1520
  threshold: z.ZodNumber;
1528
1521
  }, z.core.$strip>;
1529
1522
  }, z.core.$strip>, z.ZodObject<{
1530
- type: z.ZodLiteral<"position_upnl_value_v1">;
1523
+ type: z.ZodLiteral<"upnl">;
1531
1524
  data: z.ZodObject<{
1532
1525
  priceSource: z.ZodEnum<{
1533
1526
  mid: "mid";
1534
1527
  mark: "mark";
1535
1528
  }>;
1536
- direction: z.ZodEnum<{
1537
- ABOVE: "ABOVE";
1538
- BELOW: "BELOW";
1529
+ track: z.ZodEnum<{
1530
+ PEAK: "PEAK";
1531
+ TROUGH: "TROUGH";
1539
1532
  }>;
1540
1533
  threshold: z.ZodNumber;
1541
1534
  }, z.core.$strip>;
1542
1535
  }, z.core.$strip>, z.ZodObject<{
1543
- type: z.ZodLiteral<"position_upnl_percentage_v1">;
1536
+ type: z.ZodLiteral<"upnl_bps">;
1544
1537
  data: z.ZodObject<{
1545
1538
  priceSource: z.ZodEnum<{
1546
1539
  mid: "mid";
1547
1540
  mark: "mark";
1548
1541
  }>;
1549
- direction: z.ZodEnum<{
1550
- ABOVE: "ABOVE";
1551
- BELOW: "BELOW";
1542
+ track: z.ZodEnum<{
1543
+ PEAK: "PEAK";
1544
+ TROUGH: "TROUGH";
1552
1545
  }>;
1553
- threshold_bps: z.ZodNumber;
1546
+ threshold: z.ZodNumber;
1554
1547
  }, z.core.$strip>;
1555
1548
  }, z.core.$strip>], "type">;
1556
1549
  context: z.ZodObject<{
@@ -1586,8 +1579,15 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1586
1579
  }, z.core.$strip>>;
1587
1580
  }, z.core.$strip>;
1588
1581
  trailing: z.ZodOptional<z.ZodObject<{
1582
+ mode: z.ZodEnum<{
1583
+ RELATIVE_BPS: "RELATIVE_BPS";
1584
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
1585
+ }>;
1589
1586
  deltaValue: z.ZodNumber;
1590
- activationValue: z.ZodNumber;
1587
+ activationValue: z.ZodOptional<z.ZodNumber>;
1588
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
1589
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
1590
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
1591
1591
  }, z.core.$strip>>;
1592
1592
  }, z.core.$strip>, z.ZodObject<{
1593
1593
  id: z.ZodUUID;
@@ -1658,7 +1658,7 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1658
1658
  intent: z.ZodLiteral<"CLOSE">;
1659
1659
  type: z.ZodLiteral<"MARKET">;
1660
1660
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1661
- type: z.ZodLiteral<"ratio_v1">;
1661
+ type: z.ZodLiteral<"ratio">;
1662
1662
  data: z.ZodObject<{
1663
1663
  priceSource: z.ZodEnum<{
1664
1664
  mid: "mid";
@@ -1666,28 +1666,28 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1666
1666
  }>;
1667
1667
  symbol_a: z.ZodString;
1668
1668
  symbol_b: z.ZodString;
1669
- direction: z.ZodEnum<{
1670
- ABOVE: "ABOVE";
1671
- BELOW: "BELOW";
1669
+ track: z.ZodEnum<{
1670
+ PEAK: "PEAK";
1671
+ TROUGH: "TROUGH";
1672
1672
  }>;
1673
1673
  threshold: z.ZodNumber;
1674
1674
  }, z.core.$strip>;
1675
1675
  }, z.core.$strip>, z.ZodObject<{
1676
- type: z.ZodLiteral<"price_v1">;
1676
+ type: z.ZodLiteral<"price">;
1677
1677
  data: z.ZodObject<{
1678
1678
  priceSource: z.ZodEnum<{
1679
1679
  mid: "mid";
1680
1680
  mark: "mark";
1681
1681
  }>;
1682
1682
  symbol: z.ZodString;
1683
- direction: z.ZodEnum<{
1684
- ABOVE: "ABOVE";
1685
- BELOW: "BELOW";
1683
+ track: z.ZodEnum<{
1684
+ PEAK: "PEAK";
1685
+ TROUGH: "TROUGH";
1686
1686
  }>;
1687
1687
  threshold: z.ZodNumber;
1688
1688
  }, z.core.$strip>;
1689
1689
  }, z.core.$strip>, z.ZodObject<{
1690
- type: z.ZodLiteral<"index_v1">;
1690
+ type: z.ZodLiteral<"weighted_ratio">;
1691
1691
  data: z.ZodObject<{
1692
1692
  priceSource: z.ZodEnum<{
1693
1693
  mid: "mid";
@@ -1695,16 +1695,78 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1695
1695
  }>;
1696
1696
  basket: z.ZodArray<z.ZodObject<{
1697
1697
  symbol: z.ZodString;
1698
+ side: z.ZodEnum<{
1699
+ BUY: "BUY";
1700
+ SELL: "SELL";
1701
+ }>;
1698
1702
  weight: z.ZodNumber;
1699
1703
  }, z.core.$strip>>;
1700
- direction: z.ZodEnum<{
1701
- ABOVE: "ABOVE";
1702
- BELOW: "BELOW";
1704
+ track: z.ZodEnum<{
1705
+ PEAK: "PEAK";
1706
+ TROUGH: "TROUGH";
1707
+ }>;
1708
+ threshold: z.ZodNumber;
1709
+ }, z.core.$strip>;
1710
+ }, z.core.$strip>, z.ZodObject<{
1711
+ type: z.ZodLiteral<"notional">;
1712
+ data: z.ZodObject<{
1713
+ priceSource: z.ZodEnum<{
1714
+ mid: "mid";
1715
+ mark: "mark";
1716
+ }>;
1717
+ track: z.ZodEnum<{
1718
+ PEAK: "PEAK";
1719
+ TROUGH: "TROUGH";
1720
+ }>;
1721
+ threshold: z.ZodNumber;
1722
+ }, z.core.$strip>;
1723
+ }, z.core.$strip>, z.ZodObject<{
1724
+ type: z.ZodLiteral<"upnl">;
1725
+ data: z.ZodObject<{
1726
+ priceSource: z.ZodEnum<{
1727
+ mid: "mid";
1728
+ mark: "mark";
1729
+ }>;
1730
+ track: z.ZodEnum<{
1731
+ PEAK: "PEAK";
1732
+ TROUGH: "TROUGH";
1703
1733
  }>;
1704
1734
  threshold: z.ZodNumber;
1705
1735
  }, z.core.$strip>;
1706
1736
  }, z.core.$strip>, z.ZodObject<{
1707
- type: z.ZodLiteral<"weighted_ratio_v1">;
1737
+ type: z.ZodLiteral<"upnl_bps">;
1738
+ data: z.ZodObject<{
1739
+ priceSource: z.ZodEnum<{
1740
+ mid: "mid";
1741
+ mark: "mark";
1742
+ }>;
1743
+ track: z.ZodEnum<{
1744
+ PEAK: "PEAK";
1745
+ TROUGH: "TROUGH";
1746
+ }>;
1747
+ threshold: z.ZodNumber;
1748
+ }, z.core.$strip>;
1749
+ }, z.core.$strip>, z.ZodObject<{
1750
+ type: z.ZodLiteral<"ratio_trailing">;
1751
+ data: z.ZodObject<{
1752
+ priceSource: z.ZodEnum<{
1753
+ mid: "mid";
1754
+ mark: "mark";
1755
+ }>;
1756
+ symbol_a: z.ZodString;
1757
+ symbol_b: z.ZodString;
1758
+ }, z.core.$strip>;
1759
+ }, z.core.$strip>, z.ZodObject<{
1760
+ type: z.ZodLiteral<"price_trailing">;
1761
+ data: z.ZodObject<{
1762
+ priceSource: z.ZodEnum<{
1763
+ mid: "mid";
1764
+ mark: "mark";
1765
+ }>;
1766
+ symbol: z.ZodString;
1767
+ }, z.core.$strip>;
1768
+ }, z.core.$strip>, z.ZodObject<{
1769
+ type: z.ZodLiteral<"weighted_ratio_trailing">;
1708
1770
  data: z.ZodObject<{
1709
1771
  priceSource: z.ZodEnum<{
1710
1772
  mid: "mid";
@@ -1718,50 +1780,30 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1718
1780
  }>;
1719
1781
  weight: z.ZodNumber;
1720
1782
  }, z.core.$strip>>;
1721
- direction: z.ZodEnum<{
1722
- ABOVE: "ABOVE";
1723
- BELOW: "BELOW";
1724
- }>;
1725
- threshold: z.ZodNumber;
1726
1783
  }, z.core.$strip>;
1727
1784
  }, z.core.$strip>, z.ZodObject<{
1728
- type: z.ZodLiteral<"position_value_v1">;
1785
+ type: z.ZodLiteral<"notional_trailing">;
1729
1786
  data: z.ZodObject<{
1730
1787
  priceSource: z.ZodEnum<{
1731
1788
  mid: "mid";
1732
1789
  mark: "mark";
1733
1790
  }>;
1734
- direction: z.ZodEnum<{
1735
- ABOVE: "ABOVE";
1736
- BELOW: "BELOW";
1737
- }>;
1738
- threshold: z.ZodNumber;
1739
1791
  }, z.core.$strip>;
1740
1792
  }, z.core.$strip>, z.ZodObject<{
1741
- type: z.ZodLiteral<"position_upnl_value_v1">;
1793
+ type: z.ZodLiteral<"upnl_trailing">;
1742
1794
  data: z.ZodObject<{
1743
1795
  priceSource: z.ZodEnum<{
1744
1796
  mid: "mid";
1745
1797
  mark: "mark";
1746
1798
  }>;
1747
- direction: z.ZodEnum<{
1748
- ABOVE: "ABOVE";
1749
- BELOW: "BELOW";
1750
- }>;
1751
- threshold: z.ZodNumber;
1752
1799
  }, z.core.$strip>;
1753
1800
  }, z.core.$strip>, z.ZodObject<{
1754
- type: z.ZodLiteral<"position_upnl_percentage_v1">;
1801
+ type: z.ZodLiteral<"upnl_bps_trailing">;
1755
1802
  data: z.ZodObject<{
1756
1803
  priceSource: z.ZodEnum<{
1757
1804
  mid: "mid";
1758
1805
  mark: "mark";
1759
1806
  }>;
1760
- direction: z.ZodEnum<{
1761
- ABOVE: "ABOVE";
1762
- BELOW: "BELOW";
1763
- }>;
1764
- threshold_bps: z.ZodNumber;
1765
1807
  }, z.core.$strip>;
1766
1808
  }, z.core.$strip>], "type">;
1767
1809
  context: z.ZodObject<{
@@ -1772,8 +1814,15 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1772
1814
  }, z.core.$strip>;
1773
1815
  }, z.core.$strip>;
1774
1816
  trailing: z.ZodOptional<z.ZodObject<{
1817
+ mode: z.ZodEnum<{
1818
+ RELATIVE_BPS: "RELATIVE_BPS";
1819
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
1820
+ }>;
1775
1821
  deltaValue: z.ZodNumber;
1776
- activationValue: z.ZodNumber;
1822
+ activationValue: z.ZodOptional<z.ZodNumber>;
1823
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
1824
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
1825
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
1777
1826
  }, z.core.$strip>>;
1778
1827
  }, z.core.$strip>], "intent">], "type">;
1779
1828
  export type BaseTrigger = z.output<typeof BaseTrigger>;