@pear-protocol/types 2.22.1 → 2.24.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.
Files changed (44) hide show
  1. package/dist/bundle.d.ts +1 -0
  2. package/dist/common/transaction-hash.d.ts +7 -0
  3. package/dist/copy/entities.d.ts +160 -10
  4. package/dist/copy/responses.d.ts +95 -11
  5. package/dist/execution/entities.d.ts +43 -43
  6. package/dist/execution/queries.d.ts +3 -2
  7. package/dist/execution/responses.d.ts +24 -24
  8. package/dist/fill/entities.d.ts +60 -1
  9. package/dist/fill/queries.d.ts +1 -0
  10. package/dist/fill/responses.d.ts +34 -4
  11. package/dist/index.js +668 -410
  12. package/dist/ladder/entities.d.ts +141 -24
  13. package/dist/ladder/payloads.d.ts +60 -24
  14. package/dist/ladder/queries.d.ts +2 -2
  15. package/dist/ladder/responses.d.ts +420 -69
  16. package/dist/notification/entities.d.ts +53 -6
  17. package/dist/notification/responses.d.ts +24 -2
  18. package/dist/order/entities.d.ts +3 -3
  19. package/dist/position/entities.d.ts +5 -5
  20. package/dist/position/responses.d.ts +4 -4
  21. package/dist/realtime/frames.d.ts +38 -6
  22. package/dist/realtime/public-events.d.ts +19 -3
  23. package/dist/rewards/entities.d.ts +18 -0
  24. package/dist/rewards/index.d.ts +1 -0
  25. package/dist/rewards/queries.d.ts +7 -0
  26. package/dist/rewards/responses.d.ts +54 -0
  27. package/dist/schedule/entities.d.ts +155 -19
  28. package/dist/schedule/index.d.ts +1 -0
  29. package/dist/schedule/queries.d.ts +3 -2
  30. package/dist/schedule/responses.d.ts +142 -19
  31. package/dist/sync/payloads.d.ts +56 -88
  32. package/dist/tca/responses.d.ts +12 -12
  33. package/dist/trade/payloads.d.ts +60 -24
  34. package/dist/trade/responses.d.ts +60 -60
  35. package/dist/traders/performance.d.ts +4 -0
  36. package/dist/traders/public.d.ts +537 -285
  37. package/dist/trigger/common/index.d.ts +8 -2
  38. package/dist/trigger/entities/conditions.d.ts +40 -0
  39. package/dist/trigger/entities/index.d.ts +339 -32
  40. package/dist/trigger/payloads/conditions.d.ts +70 -38
  41. package/dist/trigger/payloads/index.d.ts +408 -216
  42. package/dist/trigger/queries.d.ts +2 -2
  43. package/dist/trigger/responses.d.ts +218 -20
  44. package/package.json +1 -1
@@ -32,12 +32,13 @@ declare const BaseTrigger: z.ZodObject<{
32
32
  triggeredAt: z.ZodOptional<z.ZodString>;
33
33
  cancelledAt: z.ZodOptional<z.ZodString>;
34
34
  cancelledReason: z.ZodOptional<z.ZodEnum<{
35
- USER: "USER";
36
35
  POSITION_CLOSED: "POSITION_CLOSED";
36
+ USER: "USER";
37
37
  SYSTEM: "SYSTEM";
38
38
  POSITION_NETTED: "POSITION_NETTED";
39
39
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
40
40
  POSITION_REVERSED: "POSITION_REVERSED";
41
+ POSITION_RESIZED: "POSITION_RESIZED";
41
42
  }>>;
42
43
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
43
44
  id: z.ZodUUID;
@@ -50,7 +51,9 @@ declare const BaseTrigger: z.ZodObject<{
50
51
  }>;
51
52
  tradeAccountId: z.ZodUUID;
52
53
  symbol: z.ZodString;
53
- positionId: z.ZodUUID;
54
+ executionId: z.ZodOptional<z.ZodUUID>;
55
+ scheduleId: z.ZodOptional<z.ZodUUID>;
56
+ triggerId: z.ZodOptional<z.ZodUUID>;
54
57
  connector: z.ZodEnum<{
55
58
  hyperliquid: "hyperliquid";
56
59
  binance: "binance";
@@ -76,6 +79,13 @@ declare const BaseTrigger: z.ZodObject<{
76
79
  exchangeFillId: z.ZodString;
77
80
  quantity: z.ZodString;
78
81
  }, z.core.$strip>>;
82
+ assignments: z.ZodArray<z.ZodObject<{
83
+ positionId: z.ZodUUID;
84
+ quantity: z.ZodString;
85
+ usd: z.ZodString;
86
+ tradeFee: z.ZodOptional<z.ZodString>;
87
+ pearFee: z.ZodOptional<z.ZodString>;
88
+ }, z.core.$strip>>;
79
89
  }, z.core.$strip>>>;
80
90
  bracketType: z.ZodEnum<{
81
91
  NONE: "NONE";
@@ -122,12 +132,13 @@ export declare const TriggerMarketOpen: z.ZodObject<{
122
132
  triggeredAt: z.ZodOptional<z.ZodString>;
123
133
  cancelledAt: z.ZodOptional<z.ZodString>;
124
134
  cancelledReason: z.ZodOptional<z.ZodEnum<{
125
- USER: "USER";
126
135
  POSITION_CLOSED: "POSITION_CLOSED";
136
+ USER: "USER";
127
137
  SYSTEM: "SYSTEM";
128
138
  POSITION_NETTED: "POSITION_NETTED";
129
139
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
130
140
  POSITION_REVERSED: "POSITION_REVERSED";
141
+ POSITION_RESIZED: "POSITION_RESIZED";
131
142
  }>>;
132
143
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
133
144
  id: z.ZodUUID;
@@ -140,7 +151,9 @@ export declare const TriggerMarketOpen: z.ZodObject<{
140
151
  }>;
141
152
  tradeAccountId: z.ZodUUID;
142
153
  symbol: z.ZodString;
143
- positionId: z.ZodUUID;
154
+ executionId: z.ZodOptional<z.ZodUUID>;
155
+ scheduleId: z.ZodOptional<z.ZodUUID>;
156
+ triggerId: z.ZodOptional<z.ZodUUID>;
144
157
  connector: z.ZodEnum<{
145
158
  hyperliquid: "hyperliquid";
146
159
  binance: "binance";
@@ -166,6 +179,13 @@ export declare const TriggerMarketOpen: z.ZodObject<{
166
179
  exchangeFillId: z.ZodString;
167
180
  quantity: z.ZodString;
168
181
  }, z.core.$strip>>;
182
+ assignments: z.ZodArray<z.ZodObject<{
183
+ positionId: z.ZodUUID;
184
+ quantity: z.ZodString;
185
+ usd: z.ZodString;
186
+ tradeFee: z.ZodOptional<z.ZodString>;
187
+ pearFee: z.ZodOptional<z.ZodString>;
188
+ }, z.core.$strip>>;
169
189
  }, z.core.$strip>>>;
170
190
  bracketType: z.ZodEnum<{
171
191
  NONE: "NONE";
@@ -335,12 +355,13 @@ export declare const TriggerMarketAdjust: z.ZodObject<{
335
355
  triggeredAt: z.ZodOptional<z.ZodString>;
336
356
  cancelledAt: z.ZodOptional<z.ZodString>;
337
357
  cancelledReason: z.ZodOptional<z.ZodEnum<{
338
- USER: "USER";
339
358
  POSITION_CLOSED: "POSITION_CLOSED";
359
+ USER: "USER";
340
360
  SYSTEM: "SYSTEM";
341
361
  POSITION_NETTED: "POSITION_NETTED";
342
362
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
343
363
  POSITION_REVERSED: "POSITION_REVERSED";
364
+ POSITION_RESIZED: "POSITION_RESIZED";
344
365
  }>>;
345
366
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
346
367
  id: z.ZodUUID;
@@ -353,7 +374,9 @@ export declare const TriggerMarketAdjust: z.ZodObject<{
353
374
  }>;
354
375
  tradeAccountId: z.ZodUUID;
355
376
  symbol: z.ZodString;
356
- positionId: z.ZodUUID;
377
+ executionId: z.ZodOptional<z.ZodUUID>;
378
+ scheduleId: z.ZodOptional<z.ZodUUID>;
379
+ triggerId: z.ZodOptional<z.ZodUUID>;
357
380
  connector: z.ZodEnum<{
358
381
  hyperliquid: "hyperliquid";
359
382
  binance: "binance";
@@ -379,6 +402,13 @@ export declare const TriggerMarketAdjust: z.ZodObject<{
379
402
  exchangeFillId: z.ZodString;
380
403
  quantity: z.ZodString;
381
404
  }, z.core.$strip>>;
405
+ assignments: z.ZodArray<z.ZodObject<{
406
+ positionId: z.ZodUUID;
407
+ quantity: z.ZodString;
408
+ usd: z.ZodString;
409
+ tradeFee: z.ZodOptional<z.ZodString>;
410
+ pearFee: z.ZodOptional<z.ZodString>;
411
+ }, z.core.$strip>>;
382
412
  }, z.core.$strip>>>;
383
413
  bracketType: z.ZodEnum<{
384
414
  NONE: "NONE";
@@ -456,6 +486,10 @@ export declare const TriggerMarketAdjust: z.ZodObject<{
456
486
  TROUGH: "TROUGH";
457
487
  }>;
458
488
  threshold: z.ZodNumber;
489
+ onPositionResize: z.ZodEnum<{
490
+ cancel: "cancel";
491
+ keep: "keep";
492
+ }>;
459
493
  }, z.core.$strip>;
460
494
  }, z.core.$strip>, z.ZodObject<{
461
495
  type: z.ZodLiteral<"upnl">;
@@ -469,6 +503,10 @@ export declare const TriggerMarketAdjust: z.ZodObject<{
469
503
  TROUGH: "TROUGH";
470
504
  }>;
471
505
  threshold: z.ZodNumber;
506
+ onPositionResize: z.ZodEnum<{
507
+ cancel: "cancel";
508
+ keep: "keep";
509
+ }>;
472
510
  }, z.core.$strip>;
473
511
  }, z.core.$strip>, z.ZodObject<{
474
512
  type: z.ZodLiteral<"upnl_bps">;
@@ -594,12 +632,13 @@ export declare const TriggerMarketClose: z.ZodObject<{
594
632
  triggeredAt: z.ZodOptional<z.ZodString>;
595
633
  cancelledAt: z.ZodOptional<z.ZodString>;
596
634
  cancelledReason: z.ZodOptional<z.ZodEnum<{
597
- USER: "USER";
598
635
  POSITION_CLOSED: "POSITION_CLOSED";
636
+ USER: "USER";
599
637
  SYSTEM: "SYSTEM";
600
638
  POSITION_NETTED: "POSITION_NETTED";
601
639
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
602
640
  POSITION_REVERSED: "POSITION_REVERSED";
641
+ POSITION_RESIZED: "POSITION_RESIZED";
603
642
  }>>;
604
643
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
605
644
  id: z.ZodUUID;
@@ -612,7 +651,9 @@ export declare const TriggerMarketClose: z.ZodObject<{
612
651
  }>;
613
652
  tradeAccountId: z.ZodUUID;
614
653
  symbol: z.ZodString;
615
- positionId: z.ZodUUID;
654
+ executionId: z.ZodOptional<z.ZodUUID>;
655
+ scheduleId: z.ZodOptional<z.ZodUUID>;
656
+ triggerId: z.ZodOptional<z.ZodUUID>;
616
657
  connector: z.ZodEnum<{
617
658
  hyperliquid: "hyperliquid";
618
659
  binance: "binance";
@@ -638,6 +679,13 @@ export declare const TriggerMarketClose: z.ZodObject<{
638
679
  exchangeFillId: z.ZodString;
639
680
  quantity: z.ZodString;
640
681
  }, z.core.$strip>>;
682
+ assignments: z.ZodArray<z.ZodObject<{
683
+ positionId: z.ZodUUID;
684
+ quantity: z.ZodString;
685
+ usd: z.ZodString;
686
+ tradeFee: z.ZodOptional<z.ZodString>;
687
+ pearFee: z.ZodOptional<z.ZodString>;
688
+ }, z.core.$strip>>;
641
689
  }, z.core.$strip>>>;
642
690
  bracketType: z.ZodEnum<{
643
691
  NONE: "NONE";
@@ -715,6 +763,10 @@ export declare const TriggerMarketClose: z.ZodObject<{
715
763
  TROUGH: "TROUGH";
716
764
  }>;
717
765
  threshold: z.ZodNumber;
766
+ onPositionResize: z.ZodEnum<{
767
+ cancel: "cancel";
768
+ keep: "keep";
769
+ }>;
718
770
  }, z.core.$strip>;
719
771
  }, z.core.$strip>, z.ZodObject<{
720
772
  type: z.ZodLiteral<"upnl">;
@@ -728,6 +780,10 @@ export declare const TriggerMarketClose: z.ZodObject<{
728
780
  TROUGH: "TROUGH";
729
781
  }>;
730
782
  threshold: z.ZodNumber;
783
+ onPositionResize: z.ZodEnum<{
784
+ cancel: "cancel";
785
+ keep: "keep";
786
+ }>;
731
787
  }, z.core.$strip>;
732
788
  }, z.core.$strip>, z.ZodObject<{
733
789
  type: z.ZodLiteral<"upnl_bps">;
@@ -784,6 +840,10 @@ export declare const TriggerMarketClose: z.ZodObject<{
784
840
  mid: "mid";
785
841
  mark: "mark";
786
842
  }>;
843
+ onPositionResize: z.ZodEnum<{
844
+ cancel: "cancel";
845
+ keep: "keep";
846
+ }>;
787
847
  }, z.core.$strip>;
788
848
  }, z.core.$strip>, z.ZodObject<{
789
849
  type: z.ZodLiteral<"upnl_trailing">;
@@ -792,6 +852,10 @@ export declare const TriggerMarketClose: z.ZodObject<{
792
852
  mid: "mid";
793
853
  mark: "mark";
794
854
  }>;
855
+ onPositionResize: z.ZodEnum<{
856
+ cancel: "cancel";
857
+ keep: "keep";
858
+ }>;
795
859
  }, z.core.$strip>;
796
860
  }, z.core.$strip>, z.ZodObject<{
797
861
  type: z.ZodLiteral<"upnl_bps_trailing">;
@@ -844,6 +908,7 @@ export declare const TriggerMarketClose: z.ZodObject<{
844
908
  threshold: z.ZodNumber;
845
909
  }, z.core.$strip>;
846
910
  }, z.core.$strip>], "type">;
911
+ closePercent: z.ZodOptional<z.ZodNumber>;
847
912
  context: z.ZodObject<{
848
913
  type: z.ZodLiteral<"MARKET">;
849
914
  position: z.ZodObject<{
@@ -885,12 +950,13 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
885
950
  triggeredAt: z.ZodOptional<z.ZodString>;
886
951
  cancelledAt: z.ZodOptional<z.ZodString>;
887
952
  cancelledReason: z.ZodOptional<z.ZodEnum<{
888
- USER: "USER";
889
953
  POSITION_CLOSED: "POSITION_CLOSED";
954
+ USER: "USER";
890
955
  SYSTEM: "SYSTEM";
891
956
  POSITION_NETTED: "POSITION_NETTED";
892
957
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
893
958
  POSITION_REVERSED: "POSITION_REVERSED";
959
+ POSITION_RESIZED: "POSITION_RESIZED";
894
960
  }>>;
895
961
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
896
962
  id: z.ZodUUID;
@@ -903,7 +969,9 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
903
969
  }>;
904
970
  tradeAccountId: z.ZodUUID;
905
971
  symbol: z.ZodString;
906
- positionId: z.ZodUUID;
972
+ executionId: z.ZodOptional<z.ZodUUID>;
973
+ scheduleId: z.ZodOptional<z.ZodUUID>;
974
+ triggerId: z.ZodOptional<z.ZodUUID>;
907
975
  connector: z.ZodEnum<{
908
976
  hyperliquid: "hyperliquid";
909
977
  binance: "binance";
@@ -929,6 +997,13 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
929
997
  exchangeFillId: z.ZodString;
930
998
  quantity: z.ZodString;
931
999
  }, z.core.$strip>>;
1000
+ assignments: z.ZodArray<z.ZodObject<{
1001
+ positionId: z.ZodUUID;
1002
+ quantity: z.ZodString;
1003
+ usd: z.ZodString;
1004
+ tradeFee: z.ZodOptional<z.ZodString>;
1005
+ pearFee: z.ZodOptional<z.ZodString>;
1006
+ }, z.core.$strip>>;
932
1007
  }, z.core.$strip>>>;
933
1008
  bracketType: z.ZodEnum<{
934
1009
  NONE: "NONE";
@@ -1097,12 +1172,13 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1097
1172
  triggeredAt: z.ZodOptional<z.ZodString>;
1098
1173
  cancelledAt: z.ZodOptional<z.ZodString>;
1099
1174
  cancelledReason: z.ZodOptional<z.ZodEnum<{
1100
- USER: "USER";
1101
1175
  POSITION_CLOSED: "POSITION_CLOSED";
1176
+ USER: "USER";
1102
1177
  SYSTEM: "SYSTEM";
1103
1178
  POSITION_NETTED: "POSITION_NETTED";
1104
1179
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
1105
1180
  POSITION_REVERSED: "POSITION_REVERSED";
1181
+ POSITION_RESIZED: "POSITION_RESIZED";
1106
1182
  }>>;
1107
1183
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1108
1184
  id: z.ZodUUID;
@@ -1115,7 +1191,9 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1115
1191
  }>;
1116
1192
  tradeAccountId: z.ZodUUID;
1117
1193
  symbol: z.ZodString;
1118
- positionId: z.ZodUUID;
1194
+ executionId: z.ZodOptional<z.ZodUUID>;
1195
+ scheduleId: z.ZodOptional<z.ZodUUID>;
1196
+ triggerId: z.ZodOptional<z.ZodUUID>;
1119
1197
  connector: z.ZodEnum<{
1120
1198
  hyperliquid: "hyperliquid";
1121
1199
  binance: "binance";
@@ -1141,6 +1219,13 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1141
1219
  exchangeFillId: z.ZodString;
1142
1220
  quantity: z.ZodString;
1143
1221
  }, z.core.$strip>>;
1222
+ assignments: z.ZodArray<z.ZodObject<{
1223
+ positionId: z.ZodUUID;
1224
+ quantity: z.ZodString;
1225
+ usd: z.ZodString;
1226
+ tradeFee: z.ZodOptional<z.ZodString>;
1227
+ pearFee: z.ZodOptional<z.ZodString>;
1228
+ }, z.core.$strip>>;
1144
1229
  }, z.core.$strip>>>;
1145
1230
  bracketType: z.ZodEnum<{
1146
1231
  NONE: "NONE";
@@ -1218,6 +1303,10 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1218
1303
  TROUGH: "TROUGH";
1219
1304
  }>;
1220
1305
  threshold: z.ZodNumber;
1306
+ onPositionResize: z.ZodEnum<{
1307
+ cancel: "cancel";
1308
+ keep: "keep";
1309
+ }>;
1221
1310
  }, z.core.$strip>;
1222
1311
  }, z.core.$strip>, z.ZodObject<{
1223
1312
  type: z.ZodLiteral<"upnl">;
@@ -1231,6 +1320,10 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1231
1320
  TROUGH: "TROUGH";
1232
1321
  }>;
1233
1322
  threshold: z.ZodNumber;
1323
+ onPositionResize: z.ZodEnum<{
1324
+ cancel: "cancel";
1325
+ keep: "keep";
1326
+ }>;
1234
1327
  }, z.core.$strip>;
1235
1328
  }, z.core.$strip>, z.ZodObject<{
1236
1329
  type: z.ZodLiteral<"upnl_bps">;
@@ -1355,12 +1448,13 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1355
1448
  triggeredAt: z.ZodOptional<z.ZodString>;
1356
1449
  cancelledAt: z.ZodOptional<z.ZodString>;
1357
1450
  cancelledReason: z.ZodOptional<z.ZodEnum<{
1358
- USER: "USER";
1359
1451
  POSITION_CLOSED: "POSITION_CLOSED";
1452
+ USER: "USER";
1360
1453
  SYSTEM: "SYSTEM";
1361
1454
  POSITION_NETTED: "POSITION_NETTED";
1362
1455
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
1363
1456
  POSITION_REVERSED: "POSITION_REVERSED";
1457
+ POSITION_RESIZED: "POSITION_RESIZED";
1364
1458
  }>>;
1365
1459
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1366
1460
  id: z.ZodUUID;
@@ -1373,7 +1467,9 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1373
1467
  }>;
1374
1468
  tradeAccountId: z.ZodUUID;
1375
1469
  symbol: z.ZodString;
1376
- positionId: z.ZodUUID;
1470
+ executionId: z.ZodOptional<z.ZodUUID>;
1471
+ scheduleId: z.ZodOptional<z.ZodUUID>;
1472
+ triggerId: z.ZodOptional<z.ZodUUID>;
1377
1473
  connector: z.ZodEnum<{
1378
1474
  hyperliquid: "hyperliquid";
1379
1475
  binance: "binance";
@@ -1399,6 +1495,13 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1399
1495
  exchangeFillId: z.ZodString;
1400
1496
  quantity: z.ZodString;
1401
1497
  }, z.core.$strip>>;
1498
+ assignments: z.ZodArray<z.ZodObject<{
1499
+ positionId: z.ZodUUID;
1500
+ quantity: z.ZodString;
1501
+ usd: z.ZodString;
1502
+ tradeFee: z.ZodOptional<z.ZodString>;
1503
+ pearFee: z.ZodOptional<z.ZodString>;
1504
+ }, z.core.$strip>>;
1402
1505
  }, z.core.$strip>>>;
1403
1506
  bracketType: z.ZodEnum<{
1404
1507
  NONE: "NONE";
@@ -1476,6 +1579,10 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1476
1579
  TROUGH: "TROUGH";
1477
1580
  }>;
1478
1581
  threshold: z.ZodNumber;
1582
+ onPositionResize: z.ZodEnum<{
1583
+ cancel: "cancel";
1584
+ keep: "keep";
1585
+ }>;
1479
1586
  }, z.core.$strip>;
1480
1587
  }, z.core.$strip>, z.ZodObject<{
1481
1588
  type: z.ZodLiteral<"upnl">;
@@ -1489,6 +1596,10 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1489
1596
  TROUGH: "TROUGH";
1490
1597
  }>;
1491
1598
  threshold: z.ZodNumber;
1599
+ onPositionResize: z.ZodEnum<{
1600
+ cancel: "cancel";
1601
+ keep: "keep";
1602
+ }>;
1492
1603
  }, z.core.$strip>;
1493
1604
  }, z.core.$strip>, z.ZodObject<{
1494
1605
  type: z.ZodLiteral<"upnl_bps">;
@@ -1545,6 +1656,10 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1545
1656
  mid: "mid";
1546
1657
  mark: "mark";
1547
1658
  }>;
1659
+ onPositionResize: z.ZodEnum<{
1660
+ cancel: "cancel";
1661
+ keep: "keep";
1662
+ }>;
1548
1663
  }, z.core.$strip>;
1549
1664
  }, z.core.$strip>, z.ZodObject<{
1550
1665
  type: z.ZodLiteral<"upnl_trailing">;
@@ -1553,6 +1668,10 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1553
1668
  mid: "mid";
1554
1669
  mark: "mark";
1555
1670
  }>;
1671
+ onPositionResize: z.ZodEnum<{
1672
+ cancel: "cancel";
1673
+ keep: "keep";
1674
+ }>;
1556
1675
  }, z.core.$strip>;
1557
1676
  }, z.core.$strip>, z.ZodObject<{
1558
1677
  type: z.ZodLiteral<"upnl_bps_trailing">;
@@ -1605,6 +1724,7 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1605
1724
  threshold: z.ZodNumber;
1606
1725
  }, z.core.$strip>;
1607
1726
  }, z.core.$strip>], "type">;
1727
+ closePercent: z.ZodOptional<z.ZodNumber>;
1608
1728
  context: z.ZodObject<{
1609
1729
  type: z.ZodLiteral<"MARKET">;
1610
1730
  position: z.ZodObject<{
@@ -1646,12 +1766,13 @@ export declare const TriggerTWAPAdjust: z.ZodObject<{
1646
1766
  triggeredAt: z.ZodOptional<z.ZodString>;
1647
1767
  cancelledAt: z.ZodOptional<z.ZodString>;
1648
1768
  cancelledReason: z.ZodOptional<z.ZodEnum<{
1649
- USER: "USER";
1650
1769
  POSITION_CLOSED: "POSITION_CLOSED";
1770
+ USER: "USER";
1651
1771
  SYSTEM: "SYSTEM";
1652
1772
  POSITION_NETTED: "POSITION_NETTED";
1653
1773
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
1654
1774
  POSITION_REVERSED: "POSITION_REVERSED";
1775
+ POSITION_RESIZED: "POSITION_RESIZED";
1655
1776
  }>>;
1656
1777
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1657
1778
  id: z.ZodUUID;
@@ -1664,7 +1785,9 @@ export declare const TriggerTWAPAdjust: z.ZodObject<{
1664
1785
  }>;
1665
1786
  tradeAccountId: z.ZodUUID;
1666
1787
  symbol: z.ZodString;
1667
- positionId: z.ZodUUID;
1788
+ executionId: z.ZodOptional<z.ZodUUID>;
1789
+ scheduleId: z.ZodOptional<z.ZodUUID>;
1790
+ triggerId: z.ZodOptional<z.ZodUUID>;
1668
1791
  connector: z.ZodEnum<{
1669
1792
  hyperliquid: "hyperliquid";
1670
1793
  binance: "binance";
@@ -1690,6 +1813,13 @@ export declare const TriggerTWAPAdjust: z.ZodObject<{
1690
1813
  exchangeFillId: z.ZodString;
1691
1814
  quantity: z.ZodString;
1692
1815
  }, z.core.$strip>>;
1816
+ assignments: z.ZodArray<z.ZodObject<{
1817
+ positionId: z.ZodUUID;
1818
+ quantity: z.ZodString;
1819
+ usd: z.ZodString;
1820
+ tradeFee: z.ZodOptional<z.ZodString>;
1821
+ pearFee: z.ZodOptional<z.ZodString>;
1822
+ }, z.core.$strip>>;
1693
1823
  }, z.core.$strip>>>;
1694
1824
  bracketType: z.ZodEnum<{
1695
1825
  NONE: "NONE";
@@ -1768,6 +1898,10 @@ export declare const TriggerTWAPAdjust: z.ZodObject<{
1768
1898
  TROUGH: "TROUGH";
1769
1899
  }>;
1770
1900
  threshold: z.ZodNumber;
1901
+ onPositionResize: z.ZodEnum<{
1902
+ cancel: "cancel";
1903
+ keep: "keep";
1904
+ }>;
1771
1905
  }, z.core.$strip>;
1772
1906
  }, z.core.$strip>, z.ZodObject<{
1773
1907
  type: z.ZodLiteral<"upnl">;
@@ -1781,6 +1915,10 @@ export declare const TriggerTWAPAdjust: z.ZodObject<{
1781
1915
  TROUGH: "TROUGH";
1782
1916
  }>;
1783
1917
  threshold: z.ZodNumber;
1918
+ onPositionResize: z.ZodEnum<{
1919
+ cancel: "cancel";
1920
+ keep: "keep";
1921
+ }>;
1784
1922
  }, z.core.$strip>;
1785
1923
  }, z.core.$strip>, z.ZodObject<{
1786
1924
  type: z.ZodLiteral<"upnl_bps">;
@@ -1903,12 +2041,13 @@ export declare const TriggerTWAPClose: z.ZodObject<{
1903
2041
  triggeredAt: z.ZodOptional<z.ZodString>;
1904
2042
  cancelledAt: z.ZodOptional<z.ZodString>;
1905
2043
  cancelledReason: z.ZodOptional<z.ZodEnum<{
1906
- USER: "USER";
1907
2044
  POSITION_CLOSED: "POSITION_CLOSED";
2045
+ USER: "USER";
1908
2046
  SYSTEM: "SYSTEM";
1909
2047
  POSITION_NETTED: "POSITION_NETTED";
1910
2048
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
1911
2049
  POSITION_REVERSED: "POSITION_REVERSED";
2050
+ POSITION_RESIZED: "POSITION_RESIZED";
1912
2051
  }>>;
1913
2052
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1914
2053
  id: z.ZodUUID;
@@ -1921,7 +2060,9 @@ export declare const TriggerTWAPClose: z.ZodObject<{
1921
2060
  }>;
1922
2061
  tradeAccountId: z.ZodUUID;
1923
2062
  symbol: z.ZodString;
1924
- positionId: z.ZodUUID;
2063
+ executionId: z.ZodOptional<z.ZodUUID>;
2064
+ scheduleId: z.ZodOptional<z.ZodUUID>;
2065
+ triggerId: z.ZodOptional<z.ZodUUID>;
1925
2066
  connector: z.ZodEnum<{
1926
2067
  hyperliquid: "hyperliquid";
1927
2068
  binance: "binance";
@@ -1947,6 +2088,13 @@ export declare const TriggerTWAPClose: z.ZodObject<{
1947
2088
  exchangeFillId: z.ZodString;
1948
2089
  quantity: z.ZodString;
1949
2090
  }, z.core.$strip>>;
2091
+ assignments: z.ZodArray<z.ZodObject<{
2092
+ positionId: z.ZodUUID;
2093
+ quantity: z.ZodString;
2094
+ usd: z.ZodString;
2095
+ tradeFee: z.ZodOptional<z.ZodString>;
2096
+ pearFee: z.ZodOptional<z.ZodString>;
2097
+ }, z.core.$strip>>;
1950
2098
  }, z.core.$strip>>>;
1951
2099
  bracketType: z.ZodEnum<{
1952
2100
  NONE: "NONE";
@@ -2025,6 +2173,10 @@ export declare const TriggerTWAPClose: z.ZodObject<{
2025
2173
  TROUGH: "TROUGH";
2026
2174
  }>;
2027
2175
  threshold: z.ZodNumber;
2176
+ onPositionResize: z.ZodEnum<{
2177
+ cancel: "cancel";
2178
+ keep: "keep";
2179
+ }>;
2028
2180
  }, z.core.$strip>;
2029
2181
  }, z.core.$strip>, z.ZodObject<{
2030
2182
  type: z.ZodLiteral<"upnl">;
@@ -2038,6 +2190,10 @@ export declare const TriggerTWAPClose: z.ZodObject<{
2038
2190
  TROUGH: "TROUGH";
2039
2191
  }>;
2040
2192
  threshold: z.ZodNumber;
2193
+ onPositionResize: z.ZodEnum<{
2194
+ cancel: "cancel";
2195
+ keep: "keep";
2196
+ }>;
2041
2197
  }, z.core.$strip>;
2042
2198
  }, z.core.$strip>, z.ZodObject<{
2043
2199
  type: z.ZodLiteral<"upnl_bps">;
@@ -2094,6 +2250,10 @@ export declare const TriggerTWAPClose: z.ZodObject<{
2094
2250
  mid: "mid";
2095
2251
  mark: "mark";
2096
2252
  }>;
2253
+ onPositionResize: z.ZodEnum<{
2254
+ cancel: "cancel";
2255
+ keep: "keep";
2256
+ }>;
2097
2257
  }, z.core.$strip>;
2098
2258
  }, z.core.$strip>, z.ZodObject<{
2099
2259
  type: z.ZodLiteral<"upnl_trailing">;
@@ -2102,6 +2262,10 @@ export declare const TriggerTWAPClose: z.ZodObject<{
2102
2262
  mid: "mid";
2103
2263
  mark: "mark";
2104
2264
  }>;
2265
+ onPositionResize: z.ZodEnum<{
2266
+ cancel: "cancel";
2267
+ keep: "keep";
2268
+ }>;
2105
2269
  }, z.core.$strip>;
2106
2270
  }, z.core.$strip>, z.ZodObject<{
2107
2271
  type: z.ZodLiteral<"upnl_bps_trailing">;
@@ -2201,12 +2365,13 @@ export declare const TriggerTWAP: z.ZodDiscriminatedUnion<[z.ZodObject<{
2201
2365
  triggeredAt: z.ZodOptional<z.ZodString>;
2202
2366
  cancelledAt: z.ZodOptional<z.ZodString>;
2203
2367
  cancelledReason: z.ZodOptional<z.ZodEnum<{
2204
- USER: "USER";
2205
2368
  POSITION_CLOSED: "POSITION_CLOSED";
2369
+ USER: "USER";
2206
2370
  SYSTEM: "SYSTEM";
2207
2371
  POSITION_NETTED: "POSITION_NETTED";
2208
2372
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
2209
2373
  POSITION_REVERSED: "POSITION_REVERSED";
2374
+ POSITION_RESIZED: "POSITION_RESIZED";
2210
2375
  }>>;
2211
2376
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
2212
2377
  id: z.ZodUUID;
@@ -2219,7 +2384,9 @@ export declare const TriggerTWAP: z.ZodDiscriminatedUnion<[z.ZodObject<{
2219
2384
  }>;
2220
2385
  tradeAccountId: z.ZodUUID;
2221
2386
  symbol: z.ZodString;
2222
- positionId: z.ZodUUID;
2387
+ executionId: z.ZodOptional<z.ZodUUID>;
2388
+ scheduleId: z.ZodOptional<z.ZodUUID>;
2389
+ triggerId: z.ZodOptional<z.ZodUUID>;
2223
2390
  connector: z.ZodEnum<{
2224
2391
  hyperliquid: "hyperliquid";
2225
2392
  binance: "binance";
@@ -2245,6 +2412,13 @@ export declare const TriggerTWAP: z.ZodDiscriminatedUnion<[z.ZodObject<{
2245
2412
  exchangeFillId: z.ZodString;
2246
2413
  quantity: z.ZodString;
2247
2414
  }, z.core.$strip>>;
2415
+ assignments: z.ZodArray<z.ZodObject<{
2416
+ positionId: z.ZodUUID;
2417
+ quantity: z.ZodString;
2418
+ usd: z.ZodString;
2419
+ tradeFee: z.ZodOptional<z.ZodString>;
2420
+ pearFee: z.ZodOptional<z.ZodString>;
2421
+ }, z.core.$strip>>;
2248
2422
  }, z.core.$strip>>>;
2249
2423
  bracketType: z.ZodEnum<{
2250
2424
  NONE: "NONE";
@@ -2323,6 +2497,10 @@ export declare const TriggerTWAP: z.ZodDiscriminatedUnion<[z.ZodObject<{
2323
2497
  TROUGH: "TROUGH";
2324
2498
  }>;
2325
2499
  threshold: z.ZodNumber;
2500
+ onPositionResize: z.ZodEnum<{
2501
+ cancel: "cancel";
2502
+ keep: "keep";
2503
+ }>;
2326
2504
  }, z.core.$strip>;
2327
2505
  }, z.core.$strip>, z.ZodObject<{
2328
2506
  type: z.ZodLiteral<"upnl">;
@@ -2336,6 +2514,10 @@ export declare const TriggerTWAP: z.ZodDiscriminatedUnion<[z.ZodObject<{
2336
2514
  TROUGH: "TROUGH";
2337
2515
  }>;
2338
2516
  threshold: z.ZodNumber;
2517
+ onPositionResize: z.ZodEnum<{
2518
+ cancel: "cancel";
2519
+ keep: "keep";
2520
+ }>;
2339
2521
  }, z.core.$strip>;
2340
2522
  }, z.core.$strip>, z.ZodObject<{
2341
2523
  type: z.ZodLiteral<"upnl_bps">;
@@ -2457,12 +2639,13 @@ export declare const TriggerTWAP: z.ZodDiscriminatedUnion<[z.ZodObject<{
2457
2639
  triggeredAt: z.ZodOptional<z.ZodString>;
2458
2640
  cancelledAt: z.ZodOptional<z.ZodString>;
2459
2641
  cancelledReason: z.ZodOptional<z.ZodEnum<{
2460
- USER: "USER";
2461
2642
  POSITION_CLOSED: "POSITION_CLOSED";
2643
+ USER: "USER";
2462
2644
  SYSTEM: "SYSTEM";
2463
2645
  POSITION_NETTED: "POSITION_NETTED";
2464
2646
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
2465
2647
  POSITION_REVERSED: "POSITION_REVERSED";
2648
+ POSITION_RESIZED: "POSITION_RESIZED";
2466
2649
  }>>;
2467
2650
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
2468
2651
  id: z.ZodUUID;
@@ -2475,7 +2658,9 @@ export declare const TriggerTWAP: z.ZodDiscriminatedUnion<[z.ZodObject<{
2475
2658
  }>;
2476
2659
  tradeAccountId: z.ZodUUID;
2477
2660
  symbol: z.ZodString;
2478
- positionId: z.ZodUUID;
2661
+ executionId: z.ZodOptional<z.ZodUUID>;
2662
+ scheduleId: z.ZodOptional<z.ZodUUID>;
2663
+ triggerId: z.ZodOptional<z.ZodUUID>;
2479
2664
  connector: z.ZodEnum<{
2480
2665
  hyperliquid: "hyperliquid";
2481
2666
  binance: "binance";
@@ -2501,6 +2686,13 @@ export declare const TriggerTWAP: z.ZodDiscriminatedUnion<[z.ZodObject<{
2501
2686
  exchangeFillId: z.ZodString;
2502
2687
  quantity: z.ZodString;
2503
2688
  }, z.core.$strip>>;
2689
+ assignments: z.ZodArray<z.ZodObject<{
2690
+ positionId: z.ZodUUID;
2691
+ quantity: z.ZodString;
2692
+ usd: z.ZodString;
2693
+ tradeFee: z.ZodOptional<z.ZodString>;
2694
+ pearFee: z.ZodOptional<z.ZodString>;
2695
+ }, z.core.$strip>>;
2504
2696
  }, z.core.$strip>>>;
2505
2697
  bracketType: z.ZodEnum<{
2506
2698
  NONE: "NONE";
@@ -2579,6 +2771,10 @@ export declare const TriggerTWAP: z.ZodDiscriminatedUnion<[z.ZodObject<{
2579
2771
  TROUGH: "TROUGH";
2580
2772
  }>;
2581
2773
  threshold: z.ZodNumber;
2774
+ onPositionResize: z.ZodEnum<{
2775
+ cancel: "cancel";
2776
+ keep: "keep";
2777
+ }>;
2582
2778
  }, z.core.$strip>;
2583
2779
  }, z.core.$strip>, z.ZodObject<{
2584
2780
  type: z.ZodLiteral<"upnl">;
@@ -2592,6 +2788,10 @@ export declare const TriggerTWAP: z.ZodDiscriminatedUnion<[z.ZodObject<{
2592
2788
  TROUGH: "TROUGH";
2593
2789
  }>;
2594
2790
  threshold: z.ZodNumber;
2791
+ onPositionResize: z.ZodEnum<{
2792
+ cancel: "cancel";
2793
+ keep: "keep";
2794
+ }>;
2595
2795
  }, z.core.$strip>;
2596
2796
  }, z.core.$strip>, z.ZodObject<{
2597
2797
  type: z.ZodLiteral<"upnl_bps">;
@@ -2648,6 +2848,10 @@ export declare const TriggerTWAP: z.ZodDiscriminatedUnion<[z.ZodObject<{
2648
2848
  mid: "mid";
2649
2849
  mark: "mark";
2650
2850
  }>;
2851
+ onPositionResize: z.ZodEnum<{
2852
+ cancel: "cancel";
2853
+ keep: "keep";
2854
+ }>;
2651
2855
  }, z.core.$strip>;
2652
2856
  }, z.core.$strip>, z.ZodObject<{
2653
2857
  type: z.ZodLiteral<"upnl_trailing">;
@@ -2656,6 +2860,10 @@ export declare const TriggerTWAP: z.ZodDiscriminatedUnion<[z.ZodObject<{
2656
2860
  mid: "mid";
2657
2861
  mark: "mark";
2658
2862
  }>;
2863
+ onPositionResize: z.ZodEnum<{
2864
+ cancel: "cancel";
2865
+ keep: "keep";
2866
+ }>;
2659
2867
  }, z.core.$strip>;
2660
2868
  }, z.core.$strip>, z.ZodObject<{
2661
2869
  type: z.ZodLiteral<"upnl_bps_trailing">;
@@ -2755,12 +2963,13 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
2755
2963
  triggeredAt: z.ZodOptional<z.ZodString>;
2756
2964
  cancelledAt: z.ZodOptional<z.ZodString>;
2757
2965
  cancelledReason: z.ZodOptional<z.ZodEnum<{
2758
- USER: "USER";
2759
2966
  POSITION_CLOSED: "POSITION_CLOSED";
2967
+ USER: "USER";
2760
2968
  SYSTEM: "SYSTEM";
2761
2969
  POSITION_NETTED: "POSITION_NETTED";
2762
2970
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
2763
2971
  POSITION_REVERSED: "POSITION_REVERSED";
2972
+ POSITION_RESIZED: "POSITION_RESIZED";
2764
2973
  }>>;
2765
2974
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
2766
2975
  id: z.ZodUUID;
@@ -2773,7 +2982,9 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
2773
2982
  }>;
2774
2983
  tradeAccountId: z.ZodUUID;
2775
2984
  symbol: z.ZodString;
2776
- positionId: z.ZodUUID;
2985
+ executionId: z.ZodOptional<z.ZodUUID>;
2986
+ scheduleId: z.ZodOptional<z.ZodUUID>;
2987
+ triggerId: z.ZodOptional<z.ZodUUID>;
2777
2988
  connector: z.ZodEnum<{
2778
2989
  hyperliquid: "hyperliquid";
2779
2990
  binance: "binance";
@@ -2799,6 +3010,13 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
2799
3010
  exchangeFillId: z.ZodString;
2800
3011
  quantity: z.ZodString;
2801
3012
  }, z.core.$strip>>;
3013
+ assignments: z.ZodArray<z.ZodObject<{
3014
+ positionId: z.ZodUUID;
3015
+ quantity: z.ZodString;
3016
+ usd: z.ZodString;
3017
+ tradeFee: z.ZodOptional<z.ZodString>;
3018
+ pearFee: z.ZodOptional<z.ZodString>;
3019
+ }, z.core.$strip>>;
2802
3020
  }, z.core.$strip>>>;
2803
3021
  bracketType: z.ZodEnum<{
2804
3022
  NONE: "NONE";
@@ -2967,12 +3185,13 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
2967
3185
  triggeredAt: z.ZodOptional<z.ZodString>;
2968
3186
  cancelledAt: z.ZodOptional<z.ZodString>;
2969
3187
  cancelledReason: z.ZodOptional<z.ZodEnum<{
2970
- USER: "USER";
2971
3188
  POSITION_CLOSED: "POSITION_CLOSED";
3189
+ USER: "USER";
2972
3190
  SYSTEM: "SYSTEM";
2973
3191
  POSITION_NETTED: "POSITION_NETTED";
2974
3192
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
2975
3193
  POSITION_REVERSED: "POSITION_REVERSED";
3194
+ POSITION_RESIZED: "POSITION_RESIZED";
2976
3195
  }>>;
2977
3196
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
2978
3197
  id: z.ZodUUID;
@@ -2985,7 +3204,9 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
2985
3204
  }>;
2986
3205
  tradeAccountId: z.ZodUUID;
2987
3206
  symbol: z.ZodString;
2988
- positionId: z.ZodUUID;
3207
+ executionId: z.ZodOptional<z.ZodUUID>;
3208
+ scheduleId: z.ZodOptional<z.ZodUUID>;
3209
+ triggerId: z.ZodOptional<z.ZodUUID>;
2989
3210
  connector: z.ZodEnum<{
2990
3211
  hyperliquid: "hyperliquid";
2991
3212
  binance: "binance";
@@ -3011,6 +3232,13 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3011
3232
  exchangeFillId: z.ZodString;
3012
3233
  quantity: z.ZodString;
3013
3234
  }, z.core.$strip>>;
3235
+ assignments: z.ZodArray<z.ZodObject<{
3236
+ positionId: z.ZodUUID;
3237
+ quantity: z.ZodString;
3238
+ usd: z.ZodString;
3239
+ tradeFee: z.ZodOptional<z.ZodString>;
3240
+ pearFee: z.ZodOptional<z.ZodString>;
3241
+ }, z.core.$strip>>;
3014
3242
  }, z.core.$strip>>>;
3015
3243
  bracketType: z.ZodEnum<{
3016
3244
  NONE: "NONE";
@@ -3088,6 +3316,10 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3088
3316
  TROUGH: "TROUGH";
3089
3317
  }>;
3090
3318
  threshold: z.ZodNumber;
3319
+ onPositionResize: z.ZodEnum<{
3320
+ cancel: "cancel";
3321
+ keep: "keep";
3322
+ }>;
3091
3323
  }, z.core.$strip>;
3092
3324
  }, z.core.$strip>, z.ZodObject<{
3093
3325
  type: z.ZodLiteral<"upnl">;
@@ -3101,6 +3333,10 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3101
3333
  TROUGH: "TROUGH";
3102
3334
  }>;
3103
3335
  threshold: z.ZodNumber;
3336
+ onPositionResize: z.ZodEnum<{
3337
+ cancel: "cancel";
3338
+ keep: "keep";
3339
+ }>;
3104
3340
  }, z.core.$strip>;
3105
3341
  }, z.core.$strip>, z.ZodObject<{
3106
3342
  type: z.ZodLiteral<"upnl_bps">;
@@ -3225,12 +3461,13 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3225
3461
  triggeredAt: z.ZodOptional<z.ZodString>;
3226
3462
  cancelledAt: z.ZodOptional<z.ZodString>;
3227
3463
  cancelledReason: z.ZodOptional<z.ZodEnum<{
3228
- USER: "USER";
3229
3464
  POSITION_CLOSED: "POSITION_CLOSED";
3465
+ USER: "USER";
3230
3466
  SYSTEM: "SYSTEM";
3231
3467
  POSITION_NETTED: "POSITION_NETTED";
3232
3468
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
3233
3469
  POSITION_REVERSED: "POSITION_REVERSED";
3470
+ POSITION_RESIZED: "POSITION_RESIZED";
3234
3471
  }>>;
3235
3472
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
3236
3473
  id: z.ZodUUID;
@@ -3243,7 +3480,9 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3243
3480
  }>;
3244
3481
  tradeAccountId: z.ZodUUID;
3245
3482
  symbol: z.ZodString;
3246
- positionId: z.ZodUUID;
3483
+ executionId: z.ZodOptional<z.ZodUUID>;
3484
+ scheduleId: z.ZodOptional<z.ZodUUID>;
3485
+ triggerId: z.ZodOptional<z.ZodUUID>;
3247
3486
  connector: z.ZodEnum<{
3248
3487
  hyperliquid: "hyperliquid";
3249
3488
  binance: "binance";
@@ -3269,6 +3508,13 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3269
3508
  exchangeFillId: z.ZodString;
3270
3509
  quantity: z.ZodString;
3271
3510
  }, z.core.$strip>>;
3511
+ assignments: z.ZodArray<z.ZodObject<{
3512
+ positionId: z.ZodUUID;
3513
+ quantity: z.ZodString;
3514
+ usd: z.ZodString;
3515
+ tradeFee: z.ZodOptional<z.ZodString>;
3516
+ pearFee: z.ZodOptional<z.ZodString>;
3517
+ }, z.core.$strip>>;
3272
3518
  }, z.core.$strip>>>;
3273
3519
  bracketType: z.ZodEnum<{
3274
3520
  NONE: "NONE";
@@ -3346,6 +3592,10 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3346
3592
  TROUGH: "TROUGH";
3347
3593
  }>;
3348
3594
  threshold: z.ZodNumber;
3595
+ onPositionResize: z.ZodEnum<{
3596
+ cancel: "cancel";
3597
+ keep: "keep";
3598
+ }>;
3349
3599
  }, z.core.$strip>;
3350
3600
  }, z.core.$strip>, z.ZodObject<{
3351
3601
  type: z.ZodLiteral<"upnl">;
@@ -3359,6 +3609,10 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3359
3609
  TROUGH: "TROUGH";
3360
3610
  }>;
3361
3611
  threshold: z.ZodNumber;
3612
+ onPositionResize: z.ZodEnum<{
3613
+ cancel: "cancel";
3614
+ keep: "keep";
3615
+ }>;
3362
3616
  }, z.core.$strip>;
3363
3617
  }, z.core.$strip>, z.ZodObject<{
3364
3618
  type: z.ZodLiteral<"upnl_bps">;
@@ -3415,6 +3669,10 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3415
3669
  mid: "mid";
3416
3670
  mark: "mark";
3417
3671
  }>;
3672
+ onPositionResize: z.ZodEnum<{
3673
+ cancel: "cancel";
3674
+ keep: "keep";
3675
+ }>;
3418
3676
  }, z.core.$strip>;
3419
3677
  }, z.core.$strip>, z.ZodObject<{
3420
3678
  type: z.ZodLiteral<"upnl_trailing">;
@@ -3423,6 +3681,10 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3423
3681
  mid: "mid";
3424
3682
  mark: "mark";
3425
3683
  }>;
3684
+ onPositionResize: z.ZodEnum<{
3685
+ cancel: "cancel";
3686
+ keep: "keep";
3687
+ }>;
3426
3688
  }, z.core.$strip>;
3427
3689
  }, z.core.$strip>, z.ZodObject<{
3428
3690
  type: z.ZodLiteral<"upnl_bps_trailing">;
@@ -3475,6 +3737,7 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3475
3737
  threshold: z.ZodNumber;
3476
3738
  }, z.core.$strip>;
3477
3739
  }, z.core.$strip>], "type">;
3740
+ closePercent: z.ZodOptional<z.ZodNumber>;
3478
3741
  context: z.ZodObject<{
3479
3742
  type: z.ZodLiteral<"MARKET">;
3480
3743
  position: z.ZodObject<{
@@ -3515,12 +3778,13 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3515
3778
  triggeredAt: z.ZodOptional<z.ZodString>;
3516
3779
  cancelledAt: z.ZodOptional<z.ZodString>;
3517
3780
  cancelledReason: z.ZodOptional<z.ZodEnum<{
3518
- USER: "USER";
3519
3781
  POSITION_CLOSED: "POSITION_CLOSED";
3782
+ USER: "USER";
3520
3783
  SYSTEM: "SYSTEM";
3521
3784
  POSITION_NETTED: "POSITION_NETTED";
3522
3785
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
3523
3786
  POSITION_REVERSED: "POSITION_REVERSED";
3787
+ POSITION_RESIZED: "POSITION_RESIZED";
3524
3788
  }>>;
3525
3789
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
3526
3790
  id: z.ZodUUID;
@@ -3533,7 +3797,9 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3533
3797
  }>;
3534
3798
  tradeAccountId: z.ZodUUID;
3535
3799
  symbol: z.ZodString;
3536
- positionId: z.ZodUUID;
3800
+ executionId: z.ZodOptional<z.ZodUUID>;
3801
+ scheduleId: z.ZodOptional<z.ZodUUID>;
3802
+ triggerId: z.ZodOptional<z.ZodUUID>;
3537
3803
  connector: z.ZodEnum<{
3538
3804
  hyperliquid: "hyperliquid";
3539
3805
  binance: "binance";
@@ -3559,6 +3825,13 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3559
3825
  exchangeFillId: z.ZodString;
3560
3826
  quantity: z.ZodString;
3561
3827
  }, z.core.$strip>>;
3828
+ assignments: z.ZodArray<z.ZodObject<{
3829
+ positionId: z.ZodUUID;
3830
+ quantity: z.ZodString;
3831
+ usd: z.ZodString;
3832
+ tradeFee: z.ZodOptional<z.ZodString>;
3833
+ pearFee: z.ZodOptional<z.ZodString>;
3834
+ }, z.core.$strip>>;
3562
3835
  }, z.core.$strip>>>;
3563
3836
  bracketType: z.ZodEnum<{
3564
3837
  NONE: "NONE";
@@ -3637,6 +3910,10 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3637
3910
  TROUGH: "TROUGH";
3638
3911
  }>;
3639
3912
  threshold: z.ZodNumber;
3913
+ onPositionResize: z.ZodEnum<{
3914
+ cancel: "cancel";
3915
+ keep: "keep";
3916
+ }>;
3640
3917
  }, z.core.$strip>;
3641
3918
  }, z.core.$strip>, z.ZodObject<{
3642
3919
  type: z.ZodLiteral<"upnl">;
@@ -3650,6 +3927,10 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3650
3927
  TROUGH: "TROUGH";
3651
3928
  }>;
3652
3929
  threshold: z.ZodNumber;
3930
+ onPositionResize: z.ZodEnum<{
3931
+ cancel: "cancel";
3932
+ keep: "keep";
3933
+ }>;
3653
3934
  }, z.core.$strip>;
3654
3935
  }, z.core.$strip>, z.ZodObject<{
3655
3936
  type: z.ZodLiteral<"upnl_bps">;
@@ -3771,12 +4052,13 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3771
4052
  triggeredAt: z.ZodOptional<z.ZodString>;
3772
4053
  cancelledAt: z.ZodOptional<z.ZodString>;
3773
4054
  cancelledReason: z.ZodOptional<z.ZodEnum<{
3774
- USER: "USER";
3775
4055
  POSITION_CLOSED: "POSITION_CLOSED";
4056
+ USER: "USER";
3776
4057
  SYSTEM: "SYSTEM";
3777
4058
  POSITION_NETTED: "POSITION_NETTED";
3778
4059
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
3779
4060
  POSITION_REVERSED: "POSITION_REVERSED";
4061
+ POSITION_RESIZED: "POSITION_RESIZED";
3780
4062
  }>>;
3781
4063
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
3782
4064
  id: z.ZodUUID;
@@ -3789,7 +4071,9 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3789
4071
  }>;
3790
4072
  tradeAccountId: z.ZodUUID;
3791
4073
  symbol: z.ZodString;
3792
- positionId: z.ZodUUID;
4074
+ executionId: z.ZodOptional<z.ZodUUID>;
4075
+ scheduleId: z.ZodOptional<z.ZodUUID>;
4076
+ triggerId: z.ZodOptional<z.ZodUUID>;
3793
4077
  connector: z.ZodEnum<{
3794
4078
  hyperliquid: "hyperliquid";
3795
4079
  binance: "binance";
@@ -3815,6 +4099,13 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3815
4099
  exchangeFillId: z.ZodString;
3816
4100
  quantity: z.ZodString;
3817
4101
  }, z.core.$strip>>;
4102
+ assignments: z.ZodArray<z.ZodObject<{
4103
+ positionId: z.ZodUUID;
4104
+ quantity: z.ZodString;
4105
+ usd: z.ZodString;
4106
+ tradeFee: z.ZodOptional<z.ZodString>;
4107
+ pearFee: z.ZodOptional<z.ZodString>;
4108
+ }, z.core.$strip>>;
3818
4109
  }, z.core.$strip>>>;
3819
4110
  bracketType: z.ZodEnum<{
3820
4111
  NONE: "NONE";
@@ -3893,6 +4184,10 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3893
4184
  TROUGH: "TROUGH";
3894
4185
  }>;
3895
4186
  threshold: z.ZodNumber;
4187
+ onPositionResize: z.ZodEnum<{
4188
+ cancel: "cancel";
4189
+ keep: "keep";
4190
+ }>;
3896
4191
  }, z.core.$strip>;
3897
4192
  }, z.core.$strip>, z.ZodObject<{
3898
4193
  type: z.ZodLiteral<"upnl">;
@@ -3906,6 +4201,10 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3906
4201
  TROUGH: "TROUGH";
3907
4202
  }>;
3908
4203
  threshold: z.ZodNumber;
4204
+ onPositionResize: z.ZodEnum<{
4205
+ cancel: "cancel";
4206
+ keep: "keep";
4207
+ }>;
3909
4208
  }, z.core.$strip>;
3910
4209
  }, z.core.$strip>, z.ZodObject<{
3911
4210
  type: z.ZodLiteral<"upnl_bps">;
@@ -3962,6 +4261,10 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3962
4261
  mid: "mid";
3963
4262
  mark: "mark";
3964
4263
  }>;
4264
+ onPositionResize: z.ZodEnum<{
4265
+ cancel: "cancel";
4266
+ keep: "keep";
4267
+ }>;
3965
4268
  }, z.core.$strip>;
3966
4269
  }, z.core.$strip>, z.ZodObject<{
3967
4270
  type: z.ZodLiteral<"upnl_trailing">;
@@ -3970,6 +4273,10 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
3970
4273
  mid: "mid";
3971
4274
  mark: "mark";
3972
4275
  }>;
4276
+ onPositionResize: z.ZodEnum<{
4277
+ cancel: "cancel";
4278
+ keep: "keep";
4279
+ }>;
3973
4280
  }, z.core.$strip>;
3974
4281
  }, z.core.$strip>, z.ZodObject<{
3975
4282
  type: z.ZodLiteral<"upnl_bps_trailing">;