@pear-protocol/types 1.31.0 → 1.33.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 (48) hide show
  1. package/dist/baskets/recommended/entities.d.ts +36 -0
  2. package/dist/baskets/recommended/entities.js +22 -0
  3. package/dist/baskets/recommended/index.d.ts +2 -0
  4. package/dist/baskets/recommended/index.js +2 -0
  5. package/dist/baskets/recommended/responses.d.ts +28 -0
  6. package/dist/baskets/recommended/responses.js +8 -0
  7. package/dist/{saved-baskets → baskets/saved}/entities.d.ts +3 -0
  8. package/dist/{saved-baskets → baskets/saved}/entities.js +6 -3
  9. package/dist/{saved-baskets → baskets/saved}/payloads.d.ts +4 -0
  10. package/dist/{saved-baskets → baskets/saved}/payloads.js +1 -1
  11. package/dist/{saved-baskets → baskets/saved}/responses.d.ts +6 -0
  12. package/dist/bundle.d.ts +2 -1
  13. package/dist/bundle.js +2 -1
  14. package/dist/common/refinement.d.ts +9 -0
  15. package/dist/common/refinement.js +9 -1
  16. package/dist/common/trade-legs.d.ts +2 -0
  17. package/dist/common/trade-legs.js +7 -3
  18. package/dist/execution/entities.d.ts +13 -0
  19. package/dist/execution/entities.js +2 -0
  20. package/dist/execution/responses.d.ts +8 -0
  21. package/dist/ladder/entities.d.ts +549 -0
  22. package/dist/ladder/payloads.d.ts +4 -0
  23. package/dist/ladder/responses.d.ts +2039 -392
  24. package/dist/notification/entities.d.ts +176 -3
  25. package/dist/notification/entities.js +31 -0
  26. package/dist/notification/responses.d.ts +86 -0
  27. package/dist/schedule/entities.d.ts +3 -0
  28. package/dist/schedule/entities.js +2 -0
  29. package/dist/schedule/payloads.d.ts +2 -0
  30. package/dist/schedule/payloads.js +6 -29
  31. package/dist/schedule/responses.d.ts +2 -0
  32. package/dist/schedule/twap-config.d.ts +41 -0
  33. package/dist/schedule/twap-config.js +29 -0
  34. package/dist/trade/payloads.d.ts +8 -0
  35. package/dist/trade/responses.d.ts +20 -0
  36. package/dist/trigger/entities/index.d.ts +1707 -54
  37. package/dist/trigger/entities/index.js +55 -2
  38. package/dist/trigger/payloads/index.d.ts +898 -91
  39. package/dist/trigger/payloads/index.js +68 -5
  40. package/dist/trigger/responses.d.ts +1151 -53
  41. package/dist/users/entities.d.ts +2 -0
  42. package/dist/users/entities.js +3 -1
  43. package/dist/users/response.d.ts +2 -0
  44. package/dist/users/response.js +2 -0
  45. package/package.json +1 -1
  46. /package/dist/{saved-baskets → baskets/saved}/index.d.ts +0 -0
  47. /package/dist/{saved-baskets → baskets/saved}/index.js +0 -0
  48. /package/dist/{saved-baskets → baskets/saved}/responses.js +0 -0
@@ -267,6 +267,7 @@ export declare const CreateLadderResponse: z.ZodObject<{
267
267
  type: z.ZodLiteral<"MARKET">;
268
268
  legs: z.ZodTuple<[z.ZodObject<{
269
269
  symbol: z.ZodString;
270
+ id: z.ZodOptional<z.ZodString>;
270
271
  side: z.ZodEnum<{
271
272
  BUY: "BUY";
272
273
  SELL: "SELL";
@@ -278,6 +279,7 @@ export declare const CreateLadderResponse: z.ZodObject<{
278
279
  amount: z.ZodString;
279
280
  }, z.core.$strip>], z.ZodObject<{
280
281
  symbol: z.ZodString;
282
+ id: z.ZodOptional<z.ZodString>;
281
283
  side: z.ZodEnum<{
282
284
  BUY: "BUY";
283
285
  SELL: "SELL";
@@ -515,6 +517,7 @@ export declare const CreateLadderResponse: z.ZodObject<{
515
517
  initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
516
518
  }, z.core.$strip>;
517
519
  legs: z.ZodTuple<[z.ZodObject<{
520
+ id: z.ZodOptional<z.ZodString>;
518
521
  symbol: z.ZodString;
519
522
  side: z.ZodEnum<{
520
523
  BUY: "BUY";
@@ -527,6 +530,7 @@ export declare const CreateLadderResponse: z.ZodObject<{
527
530
  amount: z.ZodString;
528
531
  reduceOnly: z.ZodBoolean;
529
532
  }, z.core.$strip>], z.ZodObject<{
533
+ id: z.ZodOptional<z.ZodString>;
530
534
  symbol: z.ZodString;
531
535
  side: z.ZodEnum<{
532
536
  BUY: "BUY";
@@ -837,107 +841,7 @@ export declare const CreateLadderResponse: z.ZodObject<{
837
841
  currentStopValue: z.ZodOptional<z.ZodNumber>;
838
842
  stopBreachedAt: z.ZodOptional<z.ZodNumber>;
839
843
  }, z.core.$strip>>;
840
- }, z.core.$strip>], "intent">], "type">>;
841
- createdAt: z.ZodString;
842
- updatedAt: z.ZodString;
843
- }, z.core.$strip>;
844
- }, z.core.$strip>;
845
- export type CreateLadderResponse = z.output<typeof CreateLadderResponse>;
846
- export declare const LadderResponse: z.ZodObject<{
847
- ladder: z.ZodObject<{
848
- id: z.ZodUUID;
849
- connector: z.ZodEnum<{
850
- hyperliquid: "hyperliquid";
851
- binance: "binance";
852
- bybit: "bybit";
853
- okx: "okx";
854
- lighter: "lighter";
855
- }>;
856
- positionKey: z.ZodString;
857
- config: z.ZodObject<{
858
- thresholdStart: z.ZodNumber;
859
- thresholdEnd: z.ZodNumber;
860
- levels: z.ZodInt;
861
- weighting: z.ZodDefault<z.ZodLiteral<"EQUAL">>;
862
- }, z.core.$strip>;
863
- status: z.ZodEnum<{
864
- CANCELLED: "CANCELLED";
865
- ACTIVE: "ACTIVE";
866
- COMPLETED: "COMPLETED";
867
- }>;
868
- attachTriggers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
869
- intent: z.ZodLiteral<"CLOSE">;
870
- type: z.ZodLiteral<"MARKET">;
871
- bracketType: z.ZodEnum<{
872
- STOP_LOSS: "STOP_LOSS";
873
- TAKE_PROFIT: "TAKE_PROFIT";
874
- }>;
875
- condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
876
- type: z.ZodLiteral<"notional">;
877
- data: z.ZodObject<{
878
- priceSource: z.ZodEnum<{
879
- mid: "mid";
880
- mark: "mark";
881
- }>;
882
- threshold: z.ZodNumber;
883
- }, z.core.$strip>;
884
- }, z.core.$strip>, z.ZodObject<{
885
- type: z.ZodLiteral<"upnl">;
886
- data: z.ZodObject<{
887
- priceSource: z.ZodEnum<{
888
- mid: "mid";
889
- mark: "mark";
890
- }>;
891
- threshold: z.ZodNumber;
892
- }, z.core.$strip>;
893
- }, z.core.$strip>, z.ZodObject<{
894
- type: z.ZodLiteral<"upnl_bps">;
895
- data: z.ZodObject<{
896
- priceSource: z.ZodEnum<{
897
- mid: "mid";
898
- mark: "mark";
899
- }>;
900
- threshold: z.ZodNumber;
901
- }, z.core.$strip>;
902
- }, z.core.$strip>], "type">;
903
- }, z.core.$strip>, z.ZodObject<{
904
- intent: z.ZodLiteral<"CLOSE">;
905
- type: z.ZodLiteral<"MARKET">;
906
- condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
907
- type: z.ZodLiteral<"notional_trailing">;
908
- data: z.ZodObject<{
909
- priceSource: z.ZodEnum<{
910
- mid: "mid";
911
- mark: "mark";
912
- }>;
913
- }, z.core.$strip>;
914
- }, z.core.$strip>, z.ZodObject<{
915
- type: z.ZodLiteral<"upnl_trailing">;
916
- data: z.ZodObject<{
917
- priceSource: z.ZodEnum<{
918
- mid: "mid";
919
- mark: "mark";
920
- }>;
921
- }, z.core.$strip>;
922
- }, z.core.$strip>, z.ZodObject<{
923
- type: z.ZodLiteral<"upnl_bps_trailing">;
924
- data: z.ZodObject<{
925
- priceSource: z.ZodEnum<{
926
- mid: "mid";
927
- mark: "mark";
928
- }>;
929
- }, z.core.$strip>;
930
- }, z.core.$strip>], "type">;
931
- trailing: z.ZodObject<{
932
- mode: z.ZodEnum<{
933
- RELATIVE_BPS: "RELATIVE_BPS";
934
- ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
935
- }>;
936
- deltaValue: z.ZodNumber;
937
- activationValue: z.ZodOptional<z.ZodNumber>;
938
- }, z.core.$strip>;
939
- }, z.core.$strip>]>>>;
940
- triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
844
+ }, z.core.$strip>], "intent">, z.ZodDiscriminatedUnion<[z.ZodObject<{
941
845
  id: z.ZodUUID;
942
846
  tradeAccountId: z.ZodUUID;
943
847
  connector: z.ZodEnum<{
@@ -1013,8 +917,9 @@ export declare const LadderResponse: z.ZodObject<{
1013
917
  }>>;
1014
918
  createdAt: z.ZodString;
1015
919
  updatedAt: z.ZodString;
1016
- intent: z.ZodLiteral<"OPEN">;
1017
- type: z.ZodLiteral<"MARKET">;
920
+ intent: z.ZodLiteral<"ADJUST">;
921
+ type: z.ZodLiteral<"TWAP">;
922
+ scheduleId: z.ZodOptional<z.ZodUUID>;
1018
923
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1019
924
  type: z.ZodLiteral<"ratio">;
1020
925
  data: z.ZodObject<{
@@ -1065,6 +970,45 @@ export declare const LadderResponse: z.ZodObject<{
1065
970
  }>;
1066
971
  threshold: z.ZodNumber;
1067
972
  }, z.core.$strip>;
973
+ }, z.core.$strip>, z.ZodObject<{
974
+ type: z.ZodLiteral<"notional">;
975
+ data: z.ZodObject<{
976
+ priceSource: z.ZodEnum<{
977
+ mid: "mid";
978
+ mark: "mark";
979
+ }>;
980
+ track: z.ZodEnum<{
981
+ PEAK: "PEAK";
982
+ TROUGH: "TROUGH";
983
+ }>;
984
+ threshold: z.ZodNumber;
985
+ }, z.core.$strip>;
986
+ }, z.core.$strip>, z.ZodObject<{
987
+ type: z.ZodLiteral<"upnl">;
988
+ data: z.ZodObject<{
989
+ priceSource: z.ZodEnum<{
990
+ mid: "mid";
991
+ mark: "mark";
992
+ }>;
993
+ track: z.ZodEnum<{
994
+ PEAK: "PEAK";
995
+ TROUGH: "TROUGH";
996
+ }>;
997
+ threshold: z.ZodNumber;
998
+ }, z.core.$strip>;
999
+ }, z.core.$strip>, z.ZodObject<{
1000
+ type: z.ZodLiteral<"upnl_bps">;
1001
+ data: z.ZodObject<{
1002
+ priceSource: z.ZodEnum<{
1003
+ mid: "mid";
1004
+ mark: "mark";
1005
+ }>;
1006
+ track: z.ZodEnum<{
1007
+ PEAK: "PEAK";
1008
+ TROUGH: "TROUGH";
1009
+ }>;
1010
+ threshold: z.ZodNumber;
1011
+ }, z.core.$strip>;
1068
1012
  }, z.core.$strip>, z.ZodObject<{
1069
1013
  type: z.ZodLiteral<"funding_rate">;
1070
1014
  data: z.ZodObject<{
@@ -1108,41 +1052,47 @@ export declare const LadderResponse: z.ZodObject<{
1108
1052
  }, z.core.$strip>;
1109
1053
  }, z.core.$strip>], "type">;
1110
1054
  context: z.ZodObject<{
1111
- type: z.ZodLiteral<"MARKET">;
1055
+ type: z.ZodLiteral<"TWAP">;
1056
+ durationSec: z.ZodInt;
1057
+ sliceIntervalSec: z.ZodInt;
1058
+ randomization: z.ZodObject<{
1059
+ timingJitterBps: z.ZodInt;
1060
+ sizeJitterBps: z.ZodInt;
1061
+ }, z.core.$strip>;
1062
+ position: z.ZodObject<{
1063
+ id: z.ZodUUID;
1064
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
1065
+ }, z.core.$strip>;
1112
1066
  legs: z.ZodTuple<[z.ZodObject<{
1067
+ id: z.ZodOptional<z.ZodString>;
1113
1068
  symbol: z.ZodString;
1114
1069
  side: z.ZodEnum<{
1115
1070
  BUY: "BUY";
1116
1071
  SELL: "SELL";
1117
1072
  }>;
1118
- mode: z.ZodEnum<{
1119
- QUANTITY: "QUANTITY";
1120
- USD: "USD";
1121
- }>;
1122
- amount: z.ZodString;
1123
- }, z.core.$strip>], z.ZodObject<{
1073
+ weight: z.ZodNumber;
1074
+ }, z.core.$strict>], z.ZodObject<{
1075
+ id: z.ZodOptional<z.ZodString>;
1124
1076
  symbol: z.ZodString;
1125
1077
  side: z.ZodEnum<{
1126
1078
  BUY: "BUY";
1127
1079
  SELL: "SELL";
1128
1080
  }>;
1129
- mode: z.ZodEnum<{
1130
- QUANTITY: "QUANTITY";
1131
- USD: "USD";
1132
- }>;
1133
- amount: z.ZodString;
1134
- }, z.core.$strip>>;
1135
- attachedTriggers: z.ZodArray<z.ZodObject<{
1136
- kind: z.ZodEnum<{
1137
- STATIC: "STATIC";
1138
- TRAILING: "TRAILING";
1139
- }>;
1140
- bracketType: z.ZodEnum<{
1141
- STOP_LOSS: "STOP_LOSS";
1142
- TAKE_PROFIT: "TAKE_PROFIT";
1143
- }>;
1144
- }, z.core.$strip>>;
1081
+ weight: z.ZodNumber;
1082
+ }, z.core.$strict>>;
1083
+ targetNotional: z.ZodString;
1145
1084
  }, z.core.$strip>;
1085
+ trailing: z.ZodOptional<z.ZodObject<{
1086
+ mode: z.ZodEnum<{
1087
+ RELATIVE_BPS: "RELATIVE_BPS";
1088
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
1089
+ }>;
1090
+ deltaValue: z.ZodNumber;
1091
+ activationValue: z.ZodOptional<z.ZodNumber>;
1092
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
1093
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
1094
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
1095
+ }, z.core.$strip>>;
1146
1096
  }, z.core.$strip>, z.ZodObject<{
1147
1097
  id: z.ZodUUID;
1148
1098
  tradeAccountId: z.ZodUUID;
@@ -1219,8 +1169,9 @@ export declare const LadderResponse: z.ZodObject<{
1219
1169
  }>>;
1220
1170
  createdAt: z.ZodString;
1221
1171
  updatedAt: z.ZodString;
1222
- intent: z.ZodLiteral<"ADJUST">;
1223
- type: z.ZodLiteral<"MARKET">;
1172
+ intent: z.ZodLiteral<"CLOSE">;
1173
+ type: z.ZodLiteral<"TWAP">;
1174
+ scheduleId: z.ZodOptional<z.ZodUUID>;
1224
1175
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1225
1176
  type: z.ZodLiteral<"ratio">;
1226
1177
  data: z.ZodObject<{
@@ -1310,6 +1261,65 @@ export declare const LadderResponse: z.ZodObject<{
1310
1261
  }>;
1311
1262
  threshold: z.ZodNumber;
1312
1263
  }, z.core.$strip>;
1264
+ }, z.core.$strip>, z.ZodObject<{
1265
+ type: z.ZodLiteral<"ratio_trailing">;
1266
+ data: z.ZodObject<{
1267
+ priceSource: z.ZodEnum<{
1268
+ mid: "mid";
1269
+ mark: "mark";
1270
+ }>;
1271
+ symbol_a: z.ZodString;
1272
+ symbol_b: z.ZodString;
1273
+ }, z.core.$strip>;
1274
+ }, z.core.$strip>, z.ZodObject<{
1275
+ type: z.ZodLiteral<"price_trailing">;
1276
+ data: z.ZodObject<{
1277
+ priceSource: z.ZodEnum<{
1278
+ mid: "mid";
1279
+ mark: "mark";
1280
+ }>;
1281
+ symbol: z.ZodString;
1282
+ }, z.core.$strip>;
1283
+ }, z.core.$strip>, z.ZodObject<{
1284
+ type: z.ZodLiteral<"weighted_ratio_trailing">;
1285
+ data: z.ZodObject<{
1286
+ priceSource: z.ZodEnum<{
1287
+ mid: "mid";
1288
+ mark: "mark";
1289
+ }>;
1290
+ basket: z.ZodArray<z.ZodObject<{
1291
+ symbol: z.ZodString;
1292
+ side: z.ZodEnum<{
1293
+ BUY: "BUY";
1294
+ SELL: "SELL";
1295
+ }>;
1296
+ weight: z.ZodNumber;
1297
+ }, z.core.$strip>>;
1298
+ }, z.core.$strip>;
1299
+ }, z.core.$strip>, z.ZodObject<{
1300
+ type: z.ZodLiteral<"notional_trailing">;
1301
+ data: z.ZodObject<{
1302
+ priceSource: z.ZodEnum<{
1303
+ mid: "mid";
1304
+ mark: "mark";
1305
+ }>;
1306
+ }, z.core.$strip>;
1307
+ }, z.core.$strip>, z.ZodObject<{
1308
+ type: z.ZodLiteral<"upnl_trailing">;
1309
+ data: z.ZodObject<{
1310
+ priceSource: z.ZodEnum<{
1311
+ mid: "mid";
1312
+ mark: "mark";
1313
+ }>;
1314
+ }, z.core.$strip>;
1315
+ }, z.core.$strip>, z.ZodObject<{
1316
+ type: z.ZodLiteral<"upnl_bps_trailing">;
1317
+ data: z.ZodObject<{
1318
+ priceSource: z.ZodEnum<{
1319
+ mid: "mid";
1320
+ mark: "mark";
1321
+ }>;
1322
+ }, z.core.$strip>;
1313
1323
  }, z.core.$strip>, z.ZodObject<{
1314
1324
  type: z.ZodLiteral<"funding_rate">;
1315
1325
  data: z.ZodObject<{
@@ -1353,25 +1363,1711 @@ export declare const LadderResponse: z.ZodObject<{
1353
1363
  }, z.core.$strip>;
1354
1364
  }, z.core.$strip>], "type">;
1355
1365
  context: z.ZodObject<{
1356
- type: z.ZodLiteral<"MARKET">;
1366
+ type: z.ZodLiteral<"TWAP">;
1367
+ durationSec: z.ZodInt;
1368
+ sliceIntervalSec: z.ZodInt;
1369
+ randomization: z.ZodObject<{
1370
+ timingJitterBps: z.ZodInt;
1371
+ sizeJitterBps: z.ZodInt;
1372
+ }, z.core.$strip>;
1357
1373
  position: z.ZodObject<{
1358
1374
  id: z.ZodUUID;
1359
1375
  initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
1360
1376
  }, z.core.$strip>;
1361
- legs: z.ZodTuple<[z.ZodObject<{
1362
- symbol: z.ZodString;
1363
- side: z.ZodEnum<{
1364
- BUY: "BUY";
1365
- SELL: "SELL";
1366
- }>;
1367
- mode: z.ZodEnum<{
1368
- QUANTITY: "QUANTITY";
1369
- USD: "USD";
1370
- }>;
1377
+ }, z.core.$strip>;
1378
+ trailing: z.ZodOptional<z.ZodObject<{
1379
+ mode: z.ZodEnum<{
1380
+ RELATIVE_BPS: "RELATIVE_BPS";
1381
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
1382
+ }>;
1383
+ deltaValue: z.ZodNumber;
1384
+ activationValue: z.ZodOptional<z.ZodNumber>;
1385
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
1386
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
1387
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
1388
+ }, z.core.$strip>>;
1389
+ }, z.core.$strip>], "intent">], "type">>;
1390
+ createdAt: z.ZodString;
1391
+ updatedAt: z.ZodString;
1392
+ }, z.core.$strip>;
1393
+ }, z.core.$strip>;
1394
+ export type CreateLadderResponse = z.output<typeof CreateLadderResponse>;
1395
+ export declare const LadderResponse: z.ZodObject<{
1396
+ ladder: z.ZodObject<{
1397
+ id: z.ZodUUID;
1398
+ connector: z.ZodEnum<{
1399
+ hyperliquid: "hyperliquid";
1400
+ binance: "binance";
1401
+ bybit: "bybit";
1402
+ okx: "okx";
1403
+ lighter: "lighter";
1404
+ }>;
1405
+ positionKey: z.ZodString;
1406
+ config: z.ZodObject<{
1407
+ thresholdStart: z.ZodNumber;
1408
+ thresholdEnd: z.ZodNumber;
1409
+ levels: z.ZodInt;
1410
+ weighting: z.ZodDefault<z.ZodLiteral<"EQUAL">>;
1411
+ }, z.core.$strip>;
1412
+ status: z.ZodEnum<{
1413
+ CANCELLED: "CANCELLED";
1414
+ ACTIVE: "ACTIVE";
1415
+ COMPLETED: "COMPLETED";
1416
+ }>;
1417
+ attachTriggers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1418
+ intent: z.ZodLiteral<"CLOSE">;
1419
+ type: z.ZodLiteral<"MARKET">;
1420
+ bracketType: z.ZodEnum<{
1421
+ STOP_LOSS: "STOP_LOSS";
1422
+ TAKE_PROFIT: "TAKE_PROFIT";
1423
+ }>;
1424
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1425
+ type: z.ZodLiteral<"notional">;
1426
+ data: z.ZodObject<{
1427
+ priceSource: z.ZodEnum<{
1428
+ mid: "mid";
1429
+ mark: "mark";
1430
+ }>;
1431
+ threshold: z.ZodNumber;
1432
+ }, z.core.$strip>;
1433
+ }, z.core.$strip>, z.ZodObject<{
1434
+ type: z.ZodLiteral<"upnl">;
1435
+ data: z.ZodObject<{
1436
+ priceSource: z.ZodEnum<{
1437
+ mid: "mid";
1438
+ mark: "mark";
1439
+ }>;
1440
+ threshold: z.ZodNumber;
1441
+ }, z.core.$strip>;
1442
+ }, z.core.$strip>, z.ZodObject<{
1443
+ type: z.ZodLiteral<"upnl_bps">;
1444
+ data: z.ZodObject<{
1445
+ priceSource: z.ZodEnum<{
1446
+ mid: "mid";
1447
+ mark: "mark";
1448
+ }>;
1449
+ threshold: z.ZodNumber;
1450
+ }, z.core.$strip>;
1451
+ }, z.core.$strip>], "type">;
1452
+ }, z.core.$strip>, z.ZodObject<{
1453
+ intent: z.ZodLiteral<"CLOSE">;
1454
+ type: z.ZodLiteral<"MARKET">;
1455
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1456
+ type: z.ZodLiteral<"notional_trailing">;
1457
+ data: z.ZodObject<{
1458
+ priceSource: z.ZodEnum<{
1459
+ mid: "mid";
1460
+ mark: "mark";
1461
+ }>;
1462
+ }, z.core.$strip>;
1463
+ }, z.core.$strip>, z.ZodObject<{
1464
+ type: z.ZodLiteral<"upnl_trailing">;
1465
+ data: z.ZodObject<{
1466
+ priceSource: z.ZodEnum<{
1467
+ mid: "mid";
1468
+ mark: "mark";
1469
+ }>;
1470
+ }, z.core.$strip>;
1471
+ }, z.core.$strip>, z.ZodObject<{
1472
+ type: z.ZodLiteral<"upnl_bps_trailing">;
1473
+ data: z.ZodObject<{
1474
+ priceSource: z.ZodEnum<{
1475
+ mid: "mid";
1476
+ mark: "mark";
1477
+ }>;
1478
+ }, z.core.$strip>;
1479
+ }, z.core.$strip>], "type">;
1480
+ trailing: z.ZodObject<{
1481
+ mode: z.ZodEnum<{
1482
+ RELATIVE_BPS: "RELATIVE_BPS";
1483
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
1484
+ }>;
1485
+ deltaValue: z.ZodNumber;
1486
+ activationValue: z.ZodOptional<z.ZodNumber>;
1487
+ }, z.core.$strip>;
1488
+ }, z.core.$strip>]>>>;
1489
+ triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
1490
+ id: z.ZodUUID;
1491
+ tradeAccountId: z.ZodUUID;
1492
+ connector: z.ZodEnum<{
1493
+ hyperliquid: "hyperliquid";
1494
+ binance: "binance";
1495
+ bybit: "bybit";
1496
+ okx: "okx";
1497
+ lighter: "lighter";
1498
+ }>;
1499
+ status: z.ZodEnum<{
1500
+ CANCELLED: "CANCELLED";
1501
+ ACTIVE: "ACTIVE";
1502
+ TRIGGERED: "TRIGGERED";
1503
+ }>;
1504
+ ladderId: z.ZodOptional<z.ZodUUID>;
1505
+ ladderIndex: z.ZodOptional<z.ZodNumber>;
1506
+ parentTriggerId: z.ZodOptional<z.ZodUUID>;
1507
+ triggeredAt: z.ZodOptional<z.ZodString>;
1508
+ cancelledAt: z.ZodOptional<z.ZodString>;
1509
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
1510
+ USER: "USER";
1511
+ POSITION_CLOSED: "POSITION_CLOSED";
1512
+ SYSTEM: "SYSTEM";
1513
+ POSITION_NETTED: "POSITION_NETTED";
1514
+ POSITION_REVERSED: "POSITION_REVERSED";
1515
+ }>>;
1516
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1517
+ id: z.ZodUUID;
1518
+ cloid: z.ZodOptional<z.ZodString>;
1519
+ exchangeFillId: z.ZodOptional<z.ZodString>;
1520
+ status: z.ZodEnum<{
1521
+ PROVISIONAL: "PROVISIONAL";
1522
+ CONFIRMED: "CONFIRMED";
1523
+ RECONCILED: "RECONCILED";
1524
+ }>;
1525
+ tradeAccountId: z.ZodUUID;
1526
+ symbol: z.ZodString;
1527
+ positionId: z.ZodUUID;
1528
+ connector: z.ZodEnum<{
1529
+ hyperliquid: "hyperliquid";
1530
+ binance: "binance";
1531
+ bybit: "bybit";
1532
+ okx: "okx";
1533
+ lighter: "lighter";
1534
+ }>;
1535
+ side: z.ZodEnum<{
1536
+ BUY: "BUY";
1537
+ SELL: "SELL";
1538
+ }>;
1539
+ reduceOnly: z.ZodBoolean;
1540
+ isExternal: z.ZodBoolean;
1541
+ synthetic: z.ZodBoolean;
1542
+ quantity: z.ZodString;
1543
+ price: z.ZodString;
1544
+ usd: z.ZodString;
1545
+ tradeFee: z.ZodOptional<z.ZodString>;
1546
+ pearFee: z.ZodOptional<z.ZodString>;
1547
+ timestamp: z.ZodString;
1548
+ original: z.ZodOptional<z.ZodObject<{
1549
+ exchangeFillId: z.ZodString;
1550
+ quantity: z.ZodString;
1551
+ }, z.core.$strip>>;
1552
+ }, z.core.$strip>>>;
1553
+ bracketType: z.ZodEnum<{
1554
+ STOP_LOSS: "STOP_LOSS";
1555
+ TAKE_PROFIT: "TAKE_PROFIT";
1556
+ NONE: "NONE";
1557
+ }>;
1558
+ semanticBracketType: z.ZodOptional<z.ZodEnum<{
1559
+ STOP_LOSS: "STOP_LOSS";
1560
+ TAKE_PROFIT: "TAKE_PROFIT";
1561
+ NONE: "NONE";
1562
+ }>>;
1563
+ createdAt: z.ZodString;
1564
+ updatedAt: z.ZodString;
1565
+ intent: z.ZodLiteral<"OPEN">;
1566
+ type: z.ZodLiteral<"MARKET">;
1567
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1568
+ type: z.ZodLiteral<"ratio">;
1569
+ data: z.ZodObject<{
1570
+ priceSource: z.ZodEnum<{
1571
+ mid: "mid";
1572
+ mark: "mark";
1573
+ }>;
1574
+ symbol_a: z.ZodString;
1575
+ symbol_b: z.ZodString;
1576
+ track: z.ZodEnum<{
1577
+ PEAK: "PEAK";
1578
+ TROUGH: "TROUGH";
1579
+ }>;
1580
+ threshold: z.ZodNumber;
1581
+ }, z.core.$strip>;
1582
+ }, z.core.$strip>, z.ZodObject<{
1583
+ type: z.ZodLiteral<"price">;
1584
+ data: z.ZodObject<{
1585
+ priceSource: z.ZodEnum<{
1586
+ mid: "mid";
1587
+ mark: "mark";
1588
+ }>;
1589
+ symbol: z.ZodString;
1590
+ track: z.ZodEnum<{
1591
+ PEAK: "PEAK";
1592
+ TROUGH: "TROUGH";
1593
+ }>;
1594
+ threshold: z.ZodNumber;
1595
+ }, z.core.$strip>;
1596
+ }, z.core.$strip>, z.ZodObject<{
1597
+ type: z.ZodLiteral<"weighted_ratio">;
1598
+ data: z.ZodObject<{
1599
+ priceSource: z.ZodEnum<{
1600
+ mid: "mid";
1601
+ mark: "mark";
1602
+ }>;
1603
+ basket: z.ZodArray<z.ZodObject<{
1604
+ symbol: z.ZodString;
1605
+ side: z.ZodEnum<{
1606
+ BUY: "BUY";
1607
+ SELL: "SELL";
1608
+ }>;
1609
+ weight: z.ZodNumber;
1610
+ }, z.core.$strip>>;
1611
+ track: z.ZodEnum<{
1612
+ PEAK: "PEAK";
1613
+ TROUGH: "TROUGH";
1614
+ }>;
1615
+ threshold: z.ZodNumber;
1616
+ }, z.core.$strip>;
1617
+ }, z.core.$strip>, z.ZodObject<{
1618
+ type: z.ZodLiteral<"funding_rate">;
1619
+ data: z.ZodObject<{
1620
+ connector: z.ZodEnum<{
1621
+ hyperliquid: "hyperliquid";
1622
+ binance: "binance";
1623
+ bybit: "bybit";
1624
+ okx: "okx";
1625
+ lighter: "lighter";
1626
+ }>;
1627
+ symbol: z.ZodString;
1628
+ track: z.ZodEnum<{
1629
+ PEAK: "PEAK";
1630
+ TROUGH: "TROUGH";
1631
+ }>;
1632
+ threshold: z.ZodNumber;
1633
+ }, z.core.$strip>;
1634
+ }, z.core.$strip>, z.ZodObject<{
1635
+ type: z.ZodLiteral<"prediction_market">;
1636
+ data: z.ZodObject<{
1637
+ source: z.ZodEnum<{
1638
+ kalshi: "kalshi";
1639
+ polymarket: "polymarket";
1640
+ }>;
1641
+ marketKey: z.ZodString;
1642
+ track: z.ZodEnum<{
1643
+ PEAK: "PEAK";
1644
+ TROUGH: "TROUGH";
1645
+ }>;
1646
+ threshold: z.ZodNumber;
1647
+ }, z.core.$strip>;
1648
+ }, z.core.$strip>, z.ZodObject<{
1649
+ type: z.ZodLiteral<"btc_dominance">;
1650
+ data: z.ZodObject<{
1651
+ source: z.ZodLiteral<"coingecko">;
1652
+ track: z.ZodEnum<{
1653
+ PEAK: "PEAK";
1654
+ TROUGH: "TROUGH";
1655
+ }>;
1656
+ threshold: z.ZodNumber;
1657
+ }, z.core.$strip>;
1658
+ }, z.core.$strip>], "type">;
1659
+ context: z.ZodObject<{
1660
+ type: z.ZodLiteral<"MARKET">;
1661
+ legs: z.ZodTuple<[z.ZodObject<{
1662
+ symbol: z.ZodString;
1663
+ id: z.ZodOptional<z.ZodString>;
1664
+ side: z.ZodEnum<{
1665
+ BUY: "BUY";
1666
+ SELL: "SELL";
1667
+ }>;
1668
+ mode: z.ZodEnum<{
1669
+ QUANTITY: "QUANTITY";
1670
+ USD: "USD";
1671
+ }>;
1672
+ amount: z.ZodString;
1673
+ }, z.core.$strip>], z.ZodObject<{
1674
+ symbol: z.ZodString;
1675
+ id: z.ZodOptional<z.ZodString>;
1676
+ side: z.ZodEnum<{
1677
+ BUY: "BUY";
1678
+ SELL: "SELL";
1679
+ }>;
1680
+ mode: z.ZodEnum<{
1681
+ QUANTITY: "QUANTITY";
1682
+ USD: "USD";
1683
+ }>;
1684
+ amount: z.ZodString;
1685
+ }, z.core.$strip>>;
1686
+ attachedTriggers: z.ZodArray<z.ZodObject<{
1687
+ kind: z.ZodEnum<{
1688
+ STATIC: "STATIC";
1689
+ TRAILING: "TRAILING";
1690
+ }>;
1691
+ bracketType: z.ZodEnum<{
1692
+ STOP_LOSS: "STOP_LOSS";
1693
+ TAKE_PROFIT: "TAKE_PROFIT";
1694
+ }>;
1695
+ }, z.core.$strip>>;
1696
+ }, z.core.$strip>;
1697
+ }, z.core.$strip>, z.ZodObject<{
1698
+ id: z.ZodUUID;
1699
+ tradeAccountId: z.ZodUUID;
1700
+ connector: z.ZodEnum<{
1701
+ hyperliquid: "hyperliquid";
1702
+ binance: "binance";
1703
+ bybit: "bybit";
1704
+ okx: "okx";
1705
+ lighter: "lighter";
1706
+ }>;
1707
+ status: z.ZodEnum<{
1708
+ CANCELLED: "CANCELLED";
1709
+ ACTIVE: "ACTIVE";
1710
+ TRIGGERED: "TRIGGERED";
1711
+ }>;
1712
+ ladderId: z.ZodOptional<z.ZodUUID>;
1713
+ ladderIndex: z.ZodOptional<z.ZodNumber>;
1714
+ parentTriggerId: z.ZodOptional<z.ZodUUID>;
1715
+ triggeredAt: z.ZodOptional<z.ZodString>;
1716
+ cancelledAt: z.ZodOptional<z.ZodString>;
1717
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
1718
+ USER: "USER";
1719
+ POSITION_CLOSED: "POSITION_CLOSED";
1720
+ SYSTEM: "SYSTEM";
1721
+ POSITION_NETTED: "POSITION_NETTED";
1722
+ POSITION_REVERSED: "POSITION_REVERSED";
1723
+ }>>;
1724
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1725
+ id: z.ZodUUID;
1726
+ cloid: z.ZodOptional<z.ZodString>;
1727
+ exchangeFillId: z.ZodOptional<z.ZodString>;
1728
+ status: z.ZodEnum<{
1729
+ PROVISIONAL: "PROVISIONAL";
1730
+ CONFIRMED: "CONFIRMED";
1731
+ RECONCILED: "RECONCILED";
1732
+ }>;
1733
+ tradeAccountId: z.ZodUUID;
1734
+ symbol: z.ZodString;
1735
+ positionId: z.ZodUUID;
1736
+ connector: z.ZodEnum<{
1737
+ hyperliquid: "hyperliquid";
1738
+ binance: "binance";
1739
+ bybit: "bybit";
1740
+ okx: "okx";
1741
+ lighter: "lighter";
1742
+ }>;
1743
+ side: z.ZodEnum<{
1744
+ BUY: "BUY";
1745
+ SELL: "SELL";
1746
+ }>;
1747
+ reduceOnly: z.ZodBoolean;
1748
+ isExternal: z.ZodBoolean;
1749
+ synthetic: z.ZodBoolean;
1750
+ quantity: z.ZodString;
1751
+ price: z.ZodString;
1752
+ usd: z.ZodString;
1753
+ tradeFee: z.ZodOptional<z.ZodString>;
1754
+ pearFee: z.ZodOptional<z.ZodString>;
1755
+ timestamp: z.ZodString;
1756
+ original: z.ZodOptional<z.ZodObject<{
1757
+ exchangeFillId: z.ZodString;
1758
+ quantity: z.ZodString;
1759
+ }, z.core.$strip>>;
1760
+ }, z.core.$strip>>>;
1761
+ bracketType: z.ZodEnum<{
1762
+ STOP_LOSS: "STOP_LOSS";
1763
+ TAKE_PROFIT: "TAKE_PROFIT";
1764
+ NONE: "NONE";
1765
+ }>;
1766
+ semanticBracketType: z.ZodOptional<z.ZodEnum<{
1767
+ STOP_LOSS: "STOP_LOSS";
1768
+ TAKE_PROFIT: "TAKE_PROFIT";
1769
+ NONE: "NONE";
1770
+ }>>;
1771
+ createdAt: z.ZodString;
1772
+ updatedAt: z.ZodString;
1773
+ intent: z.ZodLiteral<"ADJUST">;
1774
+ type: z.ZodLiteral<"MARKET">;
1775
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1776
+ type: z.ZodLiteral<"ratio">;
1777
+ data: z.ZodObject<{
1778
+ priceSource: z.ZodEnum<{
1779
+ mid: "mid";
1780
+ mark: "mark";
1781
+ }>;
1782
+ symbol_a: z.ZodString;
1783
+ symbol_b: z.ZodString;
1784
+ track: z.ZodEnum<{
1785
+ PEAK: "PEAK";
1786
+ TROUGH: "TROUGH";
1787
+ }>;
1788
+ threshold: z.ZodNumber;
1789
+ }, z.core.$strip>;
1790
+ }, z.core.$strip>, z.ZodObject<{
1791
+ type: z.ZodLiteral<"price">;
1792
+ data: z.ZodObject<{
1793
+ priceSource: z.ZodEnum<{
1794
+ mid: "mid";
1795
+ mark: "mark";
1796
+ }>;
1797
+ symbol: z.ZodString;
1798
+ track: z.ZodEnum<{
1799
+ PEAK: "PEAK";
1800
+ TROUGH: "TROUGH";
1801
+ }>;
1802
+ threshold: z.ZodNumber;
1803
+ }, z.core.$strip>;
1804
+ }, z.core.$strip>, z.ZodObject<{
1805
+ type: z.ZodLiteral<"weighted_ratio">;
1806
+ data: z.ZodObject<{
1807
+ priceSource: z.ZodEnum<{
1808
+ mid: "mid";
1809
+ mark: "mark";
1810
+ }>;
1811
+ basket: z.ZodArray<z.ZodObject<{
1812
+ symbol: z.ZodString;
1813
+ side: z.ZodEnum<{
1814
+ BUY: "BUY";
1815
+ SELL: "SELL";
1816
+ }>;
1817
+ weight: z.ZodNumber;
1818
+ }, z.core.$strip>>;
1819
+ track: z.ZodEnum<{
1820
+ PEAK: "PEAK";
1821
+ TROUGH: "TROUGH";
1822
+ }>;
1823
+ threshold: z.ZodNumber;
1824
+ }, z.core.$strip>;
1825
+ }, z.core.$strip>, z.ZodObject<{
1826
+ type: z.ZodLiteral<"notional">;
1827
+ data: z.ZodObject<{
1828
+ priceSource: z.ZodEnum<{
1829
+ mid: "mid";
1830
+ mark: "mark";
1831
+ }>;
1832
+ track: z.ZodEnum<{
1833
+ PEAK: "PEAK";
1834
+ TROUGH: "TROUGH";
1835
+ }>;
1836
+ threshold: z.ZodNumber;
1837
+ }, z.core.$strip>;
1838
+ }, z.core.$strip>, z.ZodObject<{
1839
+ type: z.ZodLiteral<"upnl">;
1840
+ data: z.ZodObject<{
1841
+ priceSource: z.ZodEnum<{
1842
+ mid: "mid";
1843
+ mark: "mark";
1844
+ }>;
1845
+ track: z.ZodEnum<{
1846
+ PEAK: "PEAK";
1847
+ TROUGH: "TROUGH";
1848
+ }>;
1849
+ threshold: z.ZodNumber;
1850
+ }, z.core.$strip>;
1851
+ }, z.core.$strip>, z.ZodObject<{
1852
+ type: z.ZodLiteral<"upnl_bps">;
1853
+ data: z.ZodObject<{
1854
+ priceSource: z.ZodEnum<{
1855
+ mid: "mid";
1856
+ mark: "mark";
1857
+ }>;
1858
+ track: z.ZodEnum<{
1859
+ PEAK: "PEAK";
1860
+ TROUGH: "TROUGH";
1861
+ }>;
1862
+ threshold: z.ZodNumber;
1863
+ }, z.core.$strip>;
1864
+ }, z.core.$strip>, z.ZodObject<{
1865
+ type: z.ZodLiteral<"funding_rate">;
1866
+ data: z.ZodObject<{
1867
+ connector: z.ZodEnum<{
1868
+ hyperliquid: "hyperliquid";
1869
+ binance: "binance";
1870
+ bybit: "bybit";
1871
+ okx: "okx";
1872
+ lighter: "lighter";
1873
+ }>;
1874
+ symbol: z.ZodString;
1875
+ track: z.ZodEnum<{
1876
+ PEAK: "PEAK";
1877
+ TROUGH: "TROUGH";
1878
+ }>;
1879
+ threshold: z.ZodNumber;
1880
+ }, z.core.$strip>;
1881
+ }, z.core.$strip>, z.ZodObject<{
1882
+ type: z.ZodLiteral<"prediction_market">;
1883
+ data: z.ZodObject<{
1884
+ source: z.ZodEnum<{
1885
+ kalshi: "kalshi";
1886
+ polymarket: "polymarket";
1887
+ }>;
1888
+ marketKey: z.ZodString;
1889
+ track: z.ZodEnum<{
1890
+ PEAK: "PEAK";
1891
+ TROUGH: "TROUGH";
1892
+ }>;
1893
+ threshold: z.ZodNumber;
1894
+ }, z.core.$strip>;
1895
+ }, z.core.$strip>, z.ZodObject<{
1896
+ type: z.ZodLiteral<"btc_dominance">;
1897
+ data: z.ZodObject<{
1898
+ source: z.ZodLiteral<"coingecko">;
1899
+ track: z.ZodEnum<{
1900
+ PEAK: "PEAK";
1901
+ TROUGH: "TROUGH";
1902
+ }>;
1903
+ threshold: z.ZodNumber;
1904
+ }, z.core.$strip>;
1905
+ }, z.core.$strip>], "type">;
1906
+ context: z.ZodObject<{
1907
+ type: z.ZodLiteral<"MARKET">;
1908
+ position: z.ZodObject<{
1909
+ id: z.ZodUUID;
1910
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
1911
+ }, z.core.$strip>;
1912
+ legs: z.ZodTuple<[z.ZodObject<{
1913
+ id: z.ZodOptional<z.ZodString>;
1914
+ symbol: z.ZodString;
1915
+ side: z.ZodEnum<{
1916
+ BUY: "BUY";
1917
+ SELL: "SELL";
1918
+ }>;
1919
+ mode: z.ZodEnum<{
1920
+ QUANTITY: "QUANTITY";
1921
+ USD: "USD";
1922
+ }>;
1923
+ amount: z.ZodString;
1924
+ reduceOnly: z.ZodBoolean;
1925
+ }, z.core.$strip>], z.ZodObject<{
1926
+ id: z.ZodOptional<z.ZodString>;
1927
+ symbol: z.ZodString;
1928
+ side: z.ZodEnum<{
1929
+ BUY: "BUY";
1930
+ SELL: "SELL";
1931
+ }>;
1932
+ mode: z.ZodEnum<{
1933
+ QUANTITY: "QUANTITY";
1934
+ USD: "USD";
1935
+ }>;
1936
+ amount: z.ZodString;
1937
+ reduceOnly: z.ZodBoolean;
1938
+ }, z.core.$strip>>;
1939
+ }, z.core.$strip>;
1940
+ trailing: z.ZodOptional<z.ZodObject<{
1941
+ mode: z.ZodEnum<{
1942
+ RELATIVE_BPS: "RELATIVE_BPS";
1943
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
1944
+ }>;
1945
+ deltaValue: z.ZodNumber;
1946
+ activationValue: z.ZodOptional<z.ZodNumber>;
1947
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
1948
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
1949
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
1950
+ }, z.core.$strip>>;
1951
+ }, z.core.$strip>, z.ZodObject<{
1952
+ id: z.ZodUUID;
1953
+ tradeAccountId: z.ZodUUID;
1954
+ connector: z.ZodEnum<{
1955
+ hyperliquid: "hyperliquid";
1956
+ binance: "binance";
1957
+ bybit: "bybit";
1958
+ okx: "okx";
1959
+ lighter: "lighter";
1960
+ }>;
1961
+ status: z.ZodEnum<{
1962
+ CANCELLED: "CANCELLED";
1963
+ ACTIVE: "ACTIVE";
1964
+ TRIGGERED: "TRIGGERED";
1965
+ }>;
1966
+ ladderId: z.ZodOptional<z.ZodUUID>;
1967
+ ladderIndex: z.ZodOptional<z.ZodNumber>;
1968
+ parentTriggerId: z.ZodOptional<z.ZodUUID>;
1969
+ triggeredAt: z.ZodOptional<z.ZodString>;
1970
+ cancelledAt: z.ZodOptional<z.ZodString>;
1971
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
1972
+ USER: "USER";
1973
+ POSITION_CLOSED: "POSITION_CLOSED";
1974
+ SYSTEM: "SYSTEM";
1975
+ POSITION_NETTED: "POSITION_NETTED";
1976
+ POSITION_REVERSED: "POSITION_REVERSED";
1977
+ }>>;
1978
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1979
+ id: z.ZodUUID;
1980
+ cloid: z.ZodOptional<z.ZodString>;
1981
+ exchangeFillId: z.ZodOptional<z.ZodString>;
1982
+ status: z.ZodEnum<{
1983
+ PROVISIONAL: "PROVISIONAL";
1984
+ CONFIRMED: "CONFIRMED";
1985
+ RECONCILED: "RECONCILED";
1986
+ }>;
1987
+ tradeAccountId: z.ZodUUID;
1988
+ symbol: z.ZodString;
1989
+ positionId: z.ZodUUID;
1990
+ connector: z.ZodEnum<{
1991
+ hyperliquid: "hyperliquid";
1992
+ binance: "binance";
1993
+ bybit: "bybit";
1994
+ okx: "okx";
1995
+ lighter: "lighter";
1996
+ }>;
1997
+ side: z.ZodEnum<{
1998
+ BUY: "BUY";
1999
+ SELL: "SELL";
2000
+ }>;
2001
+ reduceOnly: z.ZodBoolean;
2002
+ isExternal: z.ZodBoolean;
2003
+ synthetic: z.ZodBoolean;
2004
+ quantity: z.ZodString;
2005
+ price: z.ZodString;
2006
+ usd: z.ZodString;
2007
+ tradeFee: z.ZodOptional<z.ZodString>;
2008
+ pearFee: z.ZodOptional<z.ZodString>;
2009
+ timestamp: z.ZodString;
2010
+ original: z.ZodOptional<z.ZodObject<{
2011
+ exchangeFillId: z.ZodString;
2012
+ quantity: z.ZodString;
2013
+ }, z.core.$strip>>;
2014
+ }, z.core.$strip>>>;
2015
+ bracketType: z.ZodEnum<{
2016
+ STOP_LOSS: "STOP_LOSS";
2017
+ TAKE_PROFIT: "TAKE_PROFIT";
2018
+ NONE: "NONE";
2019
+ }>;
2020
+ semanticBracketType: z.ZodOptional<z.ZodEnum<{
2021
+ STOP_LOSS: "STOP_LOSS";
2022
+ TAKE_PROFIT: "TAKE_PROFIT";
2023
+ NONE: "NONE";
2024
+ }>>;
2025
+ createdAt: z.ZodString;
2026
+ updatedAt: z.ZodString;
2027
+ intent: z.ZodLiteral<"CLOSE">;
2028
+ type: z.ZodLiteral<"MARKET">;
2029
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
2030
+ type: z.ZodLiteral<"ratio">;
2031
+ data: z.ZodObject<{
2032
+ priceSource: z.ZodEnum<{
2033
+ mid: "mid";
2034
+ mark: "mark";
2035
+ }>;
2036
+ symbol_a: z.ZodString;
2037
+ symbol_b: z.ZodString;
2038
+ track: z.ZodEnum<{
2039
+ PEAK: "PEAK";
2040
+ TROUGH: "TROUGH";
2041
+ }>;
2042
+ threshold: z.ZodNumber;
2043
+ }, z.core.$strip>;
2044
+ }, z.core.$strip>, z.ZodObject<{
2045
+ type: z.ZodLiteral<"price">;
2046
+ data: z.ZodObject<{
2047
+ priceSource: z.ZodEnum<{
2048
+ mid: "mid";
2049
+ mark: "mark";
2050
+ }>;
2051
+ symbol: z.ZodString;
2052
+ track: z.ZodEnum<{
2053
+ PEAK: "PEAK";
2054
+ TROUGH: "TROUGH";
2055
+ }>;
2056
+ threshold: z.ZodNumber;
2057
+ }, z.core.$strip>;
2058
+ }, z.core.$strip>, z.ZodObject<{
2059
+ type: z.ZodLiteral<"weighted_ratio">;
2060
+ data: z.ZodObject<{
2061
+ priceSource: z.ZodEnum<{
2062
+ mid: "mid";
2063
+ mark: "mark";
2064
+ }>;
2065
+ basket: z.ZodArray<z.ZodObject<{
2066
+ symbol: z.ZodString;
2067
+ side: z.ZodEnum<{
2068
+ BUY: "BUY";
2069
+ SELL: "SELL";
2070
+ }>;
2071
+ weight: z.ZodNumber;
2072
+ }, z.core.$strip>>;
2073
+ track: z.ZodEnum<{
2074
+ PEAK: "PEAK";
2075
+ TROUGH: "TROUGH";
2076
+ }>;
2077
+ threshold: z.ZodNumber;
2078
+ }, z.core.$strip>;
2079
+ }, z.core.$strip>, z.ZodObject<{
2080
+ type: z.ZodLiteral<"notional">;
2081
+ data: z.ZodObject<{
2082
+ priceSource: z.ZodEnum<{
2083
+ mid: "mid";
2084
+ mark: "mark";
2085
+ }>;
2086
+ track: z.ZodEnum<{
2087
+ PEAK: "PEAK";
2088
+ TROUGH: "TROUGH";
2089
+ }>;
2090
+ threshold: z.ZodNumber;
2091
+ }, z.core.$strip>;
2092
+ }, z.core.$strip>, z.ZodObject<{
2093
+ type: z.ZodLiteral<"upnl">;
2094
+ data: z.ZodObject<{
2095
+ priceSource: z.ZodEnum<{
2096
+ mid: "mid";
2097
+ mark: "mark";
2098
+ }>;
2099
+ track: z.ZodEnum<{
2100
+ PEAK: "PEAK";
2101
+ TROUGH: "TROUGH";
2102
+ }>;
2103
+ threshold: z.ZodNumber;
2104
+ }, z.core.$strip>;
2105
+ }, z.core.$strip>, z.ZodObject<{
2106
+ type: z.ZodLiteral<"upnl_bps">;
2107
+ data: z.ZodObject<{
2108
+ priceSource: z.ZodEnum<{
2109
+ mid: "mid";
2110
+ mark: "mark";
2111
+ }>;
2112
+ track: z.ZodEnum<{
2113
+ PEAK: "PEAK";
2114
+ TROUGH: "TROUGH";
2115
+ }>;
2116
+ threshold: z.ZodNumber;
2117
+ }, z.core.$strip>;
2118
+ }, z.core.$strip>, z.ZodObject<{
2119
+ type: z.ZodLiteral<"ratio_trailing">;
2120
+ data: z.ZodObject<{
2121
+ priceSource: z.ZodEnum<{
2122
+ mid: "mid";
2123
+ mark: "mark";
2124
+ }>;
2125
+ symbol_a: z.ZodString;
2126
+ symbol_b: z.ZodString;
2127
+ }, z.core.$strip>;
2128
+ }, z.core.$strip>, z.ZodObject<{
2129
+ type: z.ZodLiteral<"price_trailing">;
2130
+ data: z.ZodObject<{
2131
+ priceSource: z.ZodEnum<{
2132
+ mid: "mid";
2133
+ mark: "mark";
2134
+ }>;
2135
+ symbol: z.ZodString;
2136
+ }, z.core.$strip>;
2137
+ }, z.core.$strip>, z.ZodObject<{
2138
+ type: z.ZodLiteral<"weighted_ratio_trailing">;
2139
+ data: z.ZodObject<{
2140
+ priceSource: z.ZodEnum<{
2141
+ mid: "mid";
2142
+ mark: "mark";
2143
+ }>;
2144
+ basket: z.ZodArray<z.ZodObject<{
2145
+ symbol: z.ZodString;
2146
+ side: z.ZodEnum<{
2147
+ BUY: "BUY";
2148
+ SELL: "SELL";
2149
+ }>;
2150
+ weight: z.ZodNumber;
2151
+ }, z.core.$strip>>;
2152
+ }, z.core.$strip>;
2153
+ }, z.core.$strip>, z.ZodObject<{
2154
+ type: z.ZodLiteral<"notional_trailing">;
2155
+ data: z.ZodObject<{
2156
+ priceSource: z.ZodEnum<{
2157
+ mid: "mid";
2158
+ mark: "mark";
2159
+ }>;
2160
+ }, z.core.$strip>;
2161
+ }, z.core.$strip>, z.ZodObject<{
2162
+ type: z.ZodLiteral<"upnl_trailing">;
2163
+ data: z.ZodObject<{
2164
+ priceSource: z.ZodEnum<{
2165
+ mid: "mid";
2166
+ mark: "mark";
2167
+ }>;
2168
+ }, z.core.$strip>;
2169
+ }, z.core.$strip>, z.ZodObject<{
2170
+ type: z.ZodLiteral<"upnl_bps_trailing">;
2171
+ data: z.ZodObject<{
2172
+ priceSource: z.ZodEnum<{
2173
+ mid: "mid";
2174
+ mark: "mark";
2175
+ }>;
2176
+ }, z.core.$strip>;
2177
+ }, z.core.$strip>, z.ZodObject<{
2178
+ type: z.ZodLiteral<"funding_rate">;
2179
+ data: z.ZodObject<{
2180
+ connector: z.ZodEnum<{
2181
+ hyperliquid: "hyperliquid";
2182
+ binance: "binance";
2183
+ bybit: "bybit";
2184
+ okx: "okx";
2185
+ lighter: "lighter";
2186
+ }>;
2187
+ symbol: z.ZodString;
2188
+ track: z.ZodEnum<{
2189
+ PEAK: "PEAK";
2190
+ TROUGH: "TROUGH";
2191
+ }>;
2192
+ threshold: z.ZodNumber;
2193
+ }, z.core.$strip>;
2194
+ }, z.core.$strip>, z.ZodObject<{
2195
+ type: z.ZodLiteral<"prediction_market">;
2196
+ data: z.ZodObject<{
2197
+ source: z.ZodEnum<{
2198
+ kalshi: "kalshi";
2199
+ polymarket: "polymarket";
2200
+ }>;
2201
+ marketKey: z.ZodString;
2202
+ track: z.ZodEnum<{
2203
+ PEAK: "PEAK";
2204
+ TROUGH: "TROUGH";
2205
+ }>;
2206
+ threshold: z.ZodNumber;
2207
+ }, z.core.$strip>;
2208
+ }, z.core.$strip>, z.ZodObject<{
2209
+ type: z.ZodLiteral<"btc_dominance">;
2210
+ data: z.ZodObject<{
2211
+ source: z.ZodLiteral<"coingecko">;
2212
+ track: z.ZodEnum<{
2213
+ PEAK: "PEAK";
2214
+ TROUGH: "TROUGH";
2215
+ }>;
2216
+ threshold: z.ZodNumber;
2217
+ }, z.core.$strip>;
2218
+ }, z.core.$strip>], "type">;
2219
+ context: z.ZodObject<{
2220
+ type: z.ZodLiteral<"MARKET">;
2221
+ position: z.ZodObject<{
2222
+ id: z.ZodUUID;
2223
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
2224
+ }, z.core.$strip>;
2225
+ }, z.core.$strip>;
2226
+ trailing: z.ZodOptional<z.ZodObject<{
2227
+ mode: z.ZodEnum<{
2228
+ RELATIVE_BPS: "RELATIVE_BPS";
2229
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
2230
+ }>;
2231
+ deltaValue: z.ZodNumber;
2232
+ activationValue: z.ZodOptional<z.ZodNumber>;
2233
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
2234
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
2235
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
2236
+ }, z.core.$strip>>;
2237
+ }, z.core.$strip>], "intent">, z.ZodDiscriminatedUnion<[z.ZodObject<{
2238
+ id: z.ZodUUID;
2239
+ tradeAccountId: z.ZodUUID;
2240
+ connector: z.ZodEnum<{
2241
+ hyperliquid: "hyperliquid";
2242
+ binance: "binance";
2243
+ bybit: "bybit";
2244
+ okx: "okx";
2245
+ lighter: "lighter";
2246
+ }>;
2247
+ status: z.ZodEnum<{
2248
+ CANCELLED: "CANCELLED";
2249
+ ACTIVE: "ACTIVE";
2250
+ TRIGGERED: "TRIGGERED";
2251
+ }>;
2252
+ ladderId: z.ZodOptional<z.ZodUUID>;
2253
+ ladderIndex: z.ZodOptional<z.ZodNumber>;
2254
+ parentTriggerId: z.ZodOptional<z.ZodUUID>;
2255
+ triggeredAt: z.ZodOptional<z.ZodString>;
2256
+ cancelledAt: z.ZodOptional<z.ZodString>;
2257
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
2258
+ USER: "USER";
2259
+ POSITION_CLOSED: "POSITION_CLOSED";
2260
+ SYSTEM: "SYSTEM";
2261
+ POSITION_NETTED: "POSITION_NETTED";
2262
+ POSITION_REVERSED: "POSITION_REVERSED";
2263
+ }>>;
2264
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
2265
+ id: z.ZodUUID;
2266
+ cloid: z.ZodOptional<z.ZodString>;
2267
+ exchangeFillId: z.ZodOptional<z.ZodString>;
2268
+ status: z.ZodEnum<{
2269
+ PROVISIONAL: "PROVISIONAL";
2270
+ CONFIRMED: "CONFIRMED";
2271
+ RECONCILED: "RECONCILED";
2272
+ }>;
2273
+ tradeAccountId: z.ZodUUID;
2274
+ symbol: z.ZodString;
2275
+ positionId: z.ZodUUID;
2276
+ connector: z.ZodEnum<{
2277
+ hyperliquid: "hyperliquid";
2278
+ binance: "binance";
2279
+ bybit: "bybit";
2280
+ okx: "okx";
2281
+ lighter: "lighter";
2282
+ }>;
2283
+ side: z.ZodEnum<{
2284
+ BUY: "BUY";
2285
+ SELL: "SELL";
2286
+ }>;
2287
+ reduceOnly: z.ZodBoolean;
2288
+ isExternal: z.ZodBoolean;
2289
+ synthetic: z.ZodBoolean;
2290
+ quantity: z.ZodString;
2291
+ price: z.ZodString;
2292
+ usd: z.ZodString;
2293
+ tradeFee: z.ZodOptional<z.ZodString>;
2294
+ pearFee: z.ZodOptional<z.ZodString>;
2295
+ timestamp: z.ZodString;
2296
+ original: z.ZodOptional<z.ZodObject<{
2297
+ exchangeFillId: z.ZodString;
2298
+ quantity: z.ZodString;
2299
+ }, z.core.$strip>>;
2300
+ }, z.core.$strip>>>;
2301
+ bracketType: z.ZodEnum<{
2302
+ STOP_LOSS: "STOP_LOSS";
2303
+ TAKE_PROFIT: "TAKE_PROFIT";
2304
+ NONE: "NONE";
2305
+ }>;
2306
+ semanticBracketType: z.ZodOptional<z.ZodEnum<{
2307
+ STOP_LOSS: "STOP_LOSS";
2308
+ TAKE_PROFIT: "TAKE_PROFIT";
2309
+ NONE: "NONE";
2310
+ }>>;
2311
+ createdAt: z.ZodString;
2312
+ updatedAt: z.ZodString;
2313
+ intent: z.ZodLiteral<"ADJUST">;
2314
+ type: z.ZodLiteral<"TWAP">;
2315
+ scheduleId: z.ZodOptional<z.ZodUUID>;
2316
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
2317
+ type: z.ZodLiteral<"ratio">;
2318
+ data: z.ZodObject<{
2319
+ priceSource: z.ZodEnum<{
2320
+ mid: "mid";
2321
+ mark: "mark";
2322
+ }>;
2323
+ symbol_a: z.ZodString;
2324
+ symbol_b: z.ZodString;
2325
+ track: z.ZodEnum<{
2326
+ PEAK: "PEAK";
2327
+ TROUGH: "TROUGH";
2328
+ }>;
2329
+ threshold: z.ZodNumber;
2330
+ }, z.core.$strip>;
2331
+ }, z.core.$strip>, z.ZodObject<{
2332
+ type: z.ZodLiteral<"price">;
2333
+ data: z.ZodObject<{
2334
+ priceSource: z.ZodEnum<{
2335
+ mid: "mid";
2336
+ mark: "mark";
2337
+ }>;
2338
+ symbol: z.ZodString;
2339
+ track: z.ZodEnum<{
2340
+ PEAK: "PEAK";
2341
+ TROUGH: "TROUGH";
2342
+ }>;
2343
+ threshold: z.ZodNumber;
2344
+ }, z.core.$strip>;
2345
+ }, z.core.$strip>, z.ZodObject<{
2346
+ type: z.ZodLiteral<"weighted_ratio">;
2347
+ data: z.ZodObject<{
2348
+ priceSource: z.ZodEnum<{
2349
+ mid: "mid";
2350
+ mark: "mark";
2351
+ }>;
2352
+ basket: z.ZodArray<z.ZodObject<{
2353
+ symbol: z.ZodString;
2354
+ side: z.ZodEnum<{
2355
+ BUY: "BUY";
2356
+ SELL: "SELL";
2357
+ }>;
2358
+ weight: z.ZodNumber;
2359
+ }, z.core.$strip>>;
2360
+ track: z.ZodEnum<{
2361
+ PEAK: "PEAK";
2362
+ TROUGH: "TROUGH";
2363
+ }>;
2364
+ threshold: z.ZodNumber;
2365
+ }, z.core.$strip>;
2366
+ }, z.core.$strip>, z.ZodObject<{
2367
+ type: z.ZodLiteral<"notional">;
2368
+ data: z.ZodObject<{
2369
+ priceSource: z.ZodEnum<{
2370
+ mid: "mid";
2371
+ mark: "mark";
2372
+ }>;
2373
+ track: z.ZodEnum<{
2374
+ PEAK: "PEAK";
2375
+ TROUGH: "TROUGH";
2376
+ }>;
2377
+ threshold: z.ZodNumber;
2378
+ }, z.core.$strip>;
2379
+ }, z.core.$strip>, z.ZodObject<{
2380
+ type: z.ZodLiteral<"upnl">;
2381
+ data: z.ZodObject<{
2382
+ priceSource: z.ZodEnum<{
2383
+ mid: "mid";
2384
+ mark: "mark";
2385
+ }>;
2386
+ track: z.ZodEnum<{
2387
+ PEAK: "PEAK";
2388
+ TROUGH: "TROUGH";
2389
+ }>;
2390
+ threshold: z.ZodNumber;
2391
+ }, z.core.$strip>;
2392
+ }, z.core.$strip>, z.ZodObject<{
2393
+ type: z.ZodLiteral<"upnl_bps">;
2394
+ data: z.ZodObject<{
2395
+ priceSource: z.ZodEnum<{
2396
+ mid: "mid";
2397
+ mark: "mark";
2398
+ }>;
2399
+ track: z.ZodEnum<{
2400
+ PEAK: "PEAK";
2401
+ TROUGH: "TROUGH";
2402
+ }>;
2403
+ threshold: z.ZodNumber;
2404
+ }, z.core.$strip>;
2405
+ }, z.core.$strip>, z.ZodObject<{
2406
+ type: z.ZodLiteral<"funding_rate">;
2407
+ data: z.ZodObject<{
2408
+ connector: z.ZodEnum<{
2409
+ hyperliquid: "hyperliquid";
2410
+ binance: "binance";
2411
+ bybit: "bybit";
2412
+ okx: "okx";
2413
+ lighter: "lighter";
2414
+ }>;
2415
+ symbol: z.ZodString;
2416
+ track: z.ZodEnum<{
2417
+ PEAK: "PEAK";
2418
+ TROUGH: "TROUGH";
2419
+ }>;
2420
+ threshold: z.ZodNumber;
2421
+ }, z.core.$strip>;
2422
+ }, z.core.$strip>, z.ZodObject<{
2423
+ type: z.ZodLiteral<"prediction_market">;
2424
+ data: z.ZodObject<{
2425
+ source: z.ZodEnum<{
2426
+ kalshi: "kalshi";
2427
+ polymarket: "polymarket";
2428
+ }>;
2429
+ marketKey: z.ZodString;
2430
+ track: z.ZodEnum<{
2431
+ PEAK: "PEAK";
2432
+ TROUGH: "TROUGH";
2433
+ }>;
2434
+ threshold: z.ZodNumber;
2435
+ }, z.core.$strip>;
2436
+ }, z.core.$strip>, z.ZodObject<{
2437
+ type: z.ZodLiteral<"btc_dominance">;
2438
+ data: z.ZodObject<{
2439
+ source: z.ZodLiteral<"coingecko">;
2440
+ track: z.ZodEnum<{
2441
+ PEAK: "PEAK";
2442
+ TROUGH: "TROUGH";
2443
+ }>;
2444
+ threshold: z.ZodNumber;
2445
+ }, z.core.$strip>;
2446
+ }, z.core.$strip>], "type">;
2447
+ context: z.ZodObject<{
2448
+ type: z.ZodLiteral<"TWAP">;
2449
+ durationSec: z.ZodInt;
2450
+ sliceIntervalSec: z.ZodInt;
2451
+ randomization: z.ZodObject<{
2452
+ timingJitterBps: z.ZodInt;
2453
+ sizeJitterBps: z.ZodInt;
2454
+ }, z.core.$strip>;
2455
+ position: z.ZodObject<{
2456
+ id: z.ZodUUID;
2457
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
2458
+ }, z.core.$strip>;
2459
+ legs: z.ZodTuple<[z.ZodObject<{
2460
+ id: z.ZodOptional<z.ZodString>;
2461
+ symbol: z.ZodString;
2462
+ side: z.ZodEnum<{
2463
+ BUY: "BUY";
2464
+ SELL: "SELL";
2465
+ }>;
2466
+ weight: z.ZodNumber;
2467
+ }, z.core.$strict>], z.ZodObject<{
2468
+ id: z.ZodOptional<z.ZodString>;
2469
+ symbol: z.ZodString;
2470
+ side: z.ZodEnum<{
2471
+ BUY: "BUY";
2472
+ SELL: "SELL";
2473
+ }>;
2474
+ weight: z.ZodNumber;
2475
+ }, z.core.$strict>>;
2476
+ targetNotional: z.ZodString;
2477
+ }, z.core.$strip>;
2478
+ trailing: z.ZodOptional<z.ZodObject<{
2479
+ mode: z.ZodEnum<{
2480
+ RELATIVE_BPS: "RELATIVE_BPS";
2481
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
2482
+ }>;
2483
+ deltaValue: z.ZodNumber;
2484
+ activationValue: z.ZodOptional<z.ZodNumber>;
2485
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
2486
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
2487
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
2488
+ }, z.core.$strip>>;
2489
+ }, z.core.$strip>, z.ZodObject<{
2490
+ id: z.ZodUUID;
2491
+ tradeAccountId: z.ZodUUID;
2492
+ connector: z.ZodEnum<{
2493
+ hyperliquid: "hyperliquid";
2494
+ binance: "binance";
2495
+ bybit: "bybit";
2496
+ okx: "okx";
2497
+ lighter: "lighter";
2498
+ }>;
2499
+ status: z.ZodEnum<{
2500
+ CANCELLED: "CANCELLED";
2501
+ ACTIVE: "ACTIVE";
2502
+ TRIGGERED: "TRIGGERED";
2503
+ }>;
2504
+ ladderId: z.ZodOptional<z.ZodUUID>;
2505
+ ladderIndex: z.ZodOptional<z.ZodNumber>;
2506
+ parentTriggerId: z.ZodOptional<z.ZodUUID>;
2507
+ triggeredAt: z.ZodOptional<z.ZodString>;
2508
+ cancelledAt: z.ZodOptional<z.ZodString>;
2509
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
2510
+ USER: "USER";
2511
+ POSITION_CLOSED: "POSITION_CLOSED";
2512
+ SYSTEM: "SYSTEM";
2513
+ POSITION_NETTED: "POSITION_NETTED";
2514
+ POSITION_REVERSED: "POSITION_REVERSED";
2515
+ }>>;
2516
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
2517
+ id: z.ZodUUID;
2518
+ cloid: z.ZodOptional<z.ZodString>;
2519
+ exchangeFillId: z.ZodOptional<z.ZodString>;
2520
+ status: z.ZodEnum<{
2521
+ PROVISIONAL: "PROVISIONAL";
2522
+ CONFIRMED: "CONFIRMED";
2523
+ RECONCILED: "RECONCILED";
2524
+ }>;
2525
+ tradeAccountId: z.ZodUUID;
2526
+ symbol: z.ZodString;
2527
+ positionId: z.ZodUUID;
2528
+ connector: z.ZodEnum<{
2529
+ hyperliquid: "hyperliquid";
2530
+ binance: "binance";
2531
+ bybit: "bybit";
2532
+ okx: "okx";
2533
+ lighter: "lighter";
2534
+ }>;
2535
+ side: z.ZodEnum<{
2536
+ BUY: "BUY";
2537
+ SELL: "SELL";
2538
+ }>;
2539
+ reduceOnly: z.ZodBoolean;
2540
+ isExternal: z.ZodBoolean;
2541
+ synthetic: z.ZodBoolean;
2542
+ quantity: z.ZodString;
2543
+ price: z.ZodString;
2544
+ usd: z.ZodString;
2545
+ tradeFee: z.ZodOptional<z.ZodString>;
2546
+ pearFee: z.ZodOptional<z.ZodString>;
2547
+ timestamp: z.ZodString;
2548
+ original: z.ZodOptional<z.ZodObject<{
2549
+ exchangeFillId: z.ZodString;
2550
+ quantity: z.ZodString;
2551
+ }, z.core.$strip>>;
2552
+ }, z.core.$strip>>>;
2553
+ bracketType: z.ZodEnum<{
2554
+ STOP_LOSS: "STOP_LOSS";
2555
+ TAKE_PROFIT: "TAKE_PROFIT";
2556
+ NONE: "NONE";
2557
+ }>;
2558
+ semanticBracketType: z.ZodOptional<z.ZodEnum<{
2559
+ STOP_LOSS: "STOP_LOSS";
2560
+ TAKE_PROFIT: "TAKE_PROFIT";
2561
+ NONE: "NONE";
2562
+ }>>;
2563
+ createdAt: z.ZodString;
2564
+ updatedAt: z.ZodString;
2565
+ intent: z.ZodLiteral<"CLOSE">;
2566
+ type: z.ZodLiteral<"TWAP">;
2567
+ scheduleId: z.ZodOptional<z.ZodUUID>;
2568
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
2569
+ type: z.ZodLiteral<"ratio">;
2570
+ data: z.ZodObject<{
2571
+ priceSource: z.ZodEnum<{
2572
+ mid: "mid";
2573
+ mark: "mark";
2574
+ }>;
2575
+ symbol_a: z.ZodString;
2576
+ symbol_b: z.ZodString;
2577
+ track: z.ZodEnum<{
2578
+ PEAK: "PEAK";
2579
+ TROUGH: "TROUGH";
2580
+ }>;
2581
+ threshold: z.ZodNumber;
2582
+ }, z.core.$strip>;
2583
+ }, z.core.$strip>, z.ZodObject<{
2584
+ type: z.ZodLiteral<"price">;
2585
+ data: z.ZodObject<{
2586
+ priceSource: z.ZodEnum<{
2587
+ mid: "mid";
2588
+ mark: "mark";
2589
+ }>;
2590
+ symbol: z.ZodString;
2591
+ track: z.ZodEnum<{
2592
+ PEAK: "PEAK";
2593
+ TROUGH: "TROUGH";
2594
+ }>;
2595
+ threshold: z.ZodNumber;
2596
+ }, z.core.$strip>;
2597
+ }, z.core.$strip>, z.ZodObject<{
2598
+ type: z.ZodLiteral<"weighted_ratio">;
2599
+ data: z.ZodObject<{
2600
+ priceSource: z.ZodEnum<{
2601
+ mid: "mid";
2602
+ mark: "mark";
2603
+ }>;
2604
+ basket: z.ZodArray<z.ZodObject<{
2605
+ symbol: z.ZodString;
2606
+ side: z.ZodEnum<{
2607
+ BUY: "BUY";
2608
+ SELL: "SELL";
2609
+ }>;
2610
+ weight: z.ZodNumber;
2611
+ }, z.core.$strip>>;
2612
+ track: z.ZodEnum<{
2613
+ PEAK: "PEAK";
2614
+ TROUGH: "TROUGH";
2615
+ }>;
2616
+ threshold: z.ZodNumber;
2617
+ }, z.core.$strip>;
2618
+ }, z.core.$strip>, z.ZodObject<{
2619
+ type: z.ZodLiteral<"notional">;
2620
+ data: z.ZodObject<{
2621
+ priceSource: z.ZodEnum<{
2622
+ mid: "mid";
2623
+ mark: "mark";
2624
+ }>;
2625
+ track: z.ZodEnum<{
2626
+ PEAK: "PEAK";
2627
+ TROUGH: "TROUGH";
2628
+ }>;
2629
+ threshold: z.ZodNumber;
2630
+ }, z.core.$strip>;
2631
+ }, z.core.$strip>, z.ZodObject<{
2632
+ type: z.ZodLiteral<"upnl">;
2633
+ data: z.ZodObject<{
2634
+ priceSource: z.ZodEnum<{
2635
+ mid: "mid";
2636
+ mark: "mark";
2637
+ }>;
2638
+ track: z.ZodEnum<{
2639
+ PEAK: "PEAK";
2640
+ TROUGH: "TROUGH";
2641
+ }>;
2642
+ threshold: z.ZodNumber;
2643
+ }, z.core.$strip>;
2644
+ }, z.core.$strip>, z.ZodObject<{
2645
+ type: z.ZodLiteral<"upnl_bps">;
2646
+ data: z.ZodObject<{
2647
+ priceSource: z.ZodEnum<{
2648
+ mid: "mid";
2649
+ mark: "mark";
2650
+ }>;
2651
+ track: z.ZodEnum<{
2652
+ PEAK: "PEAK";
2653
+ TROUGH: "TROUGH";
2654
+ }>;
2655
+ threshold: z.ZodNumber;
2656
+ }, z.core.$strip>;
2657
+ }, z.core.$strip>, z.ZodObject<{
2658
+ type: z.ZodLiteral<"ratio_trailing">;
2659
+ data: z.ZodObject<{
2660
+ priceSource: z.ZodEnum<{
2661
+ mid: "mid";
2662
+ mark: "mark";
2663
+ }>;
2664
+ symbol_a: z.ZodString;
2665
+ symbol_b: z.ZodString;
2666
+ }, z.core.$strip>;
2667
+ }, z.core.$strip>, z.ZodObject<{
2668
+ type: z.ZodLiteral<"price_trailing">;
2669
+ data: z.ZodObject<{
2670
+ priceSource: z.ZodEnum<{
2671
+ mid: "mid";
2672
+ mark: "mark";
2673
+ }>;
2674
+ symbol: z.ZodString;
2675
+ }, z.core.$strip>;
2676
+ }, z.core.$strip>, z.ZodObject<{
2677
+ type: z.ZodLiteral<"weighted_ratio_trailing">;
2678
+ data: z.ZodObject<{
2679
+ priceSource: z.ZodEnum<{
2680
+ mid: "mid";
2681
+ mark: "mark";
2682
+ }>;
2683
+ basket: z.ZodArray<z.ZodObject<{
2684
+ symbol: z.ZodString;
2685
+ side: z.ZodEnum<{
2686
+ BUY: "BUY";
2687
+ SELL: "SELL";
2688
+ }>;
2689
+ weight: z.ZodNumber;
2690
+ }, z.core.$strip>>;
2691
+ }, z.core.$strip>;
2692
+ }, z.core.$strip>, z.ZodObject<{
2693
+ type: z.ZodLiteral<"notional_trailing">;
2694
+ data: z.ZodObject<{
2695
+ priceSource: z.ZodEnum<{
2696
+ mid: "mid";
2697
+ mark: "mark";
2698
+ }>;
2699
+ }, z.core.$strip>;
2700
+ }, z.core.$strip>, z.ZodObject<{
2701
+ type: z.ZodLiteral<"upnl_trailing">;
2702
+ data: z.ZodObject<{
2703
+ priceSource: z.ZodEnum<{
2704
+ mid: "mid";
2705
+ mark: "mark";
2706
+ }>;
2707
+ }, z.core.$strip>;
2708
+ }, z.core.$strip>, z.ZodObject<{
2709
+ type: z.ZodLiteral<"upnl_bps_trailing">;
2710
+ data: z.ZodObject<{
2711
+ priceSource: z.ZodEnum<{
2712
+ mid: "mid";
2713
+ mark: "mark";
2714
+ }>;
2715
+ }, z.core.$strip>;
2716
+ }, z.core.$strip>, z.ZodObject<{
2717
+ type: z.ZodLiteral<"funding_rate">;
2718
+ data: z.ZodObject<{
2719
+ connector: z.ZodEnum<{
2720
+ hyperliquid: "hyperliquid";
2721
+ binance: "binance";
2722
+ bybit: "bybit";
2723
+ okx: "okx";
2724
+ lighter: "lighter";
2725
+ }>;
2726
+ symbol: z.ZodString;
2727
+ track: z.ZodEnum<{
2728
+ PEAK: "PEAK";
2729
+ TROUGH: "TROUGH";
2730
+ }>;
2731
+ threshold: z.ZodNumber;
2732
+ }, z.core.$strip>;
2733
+ }, z.core.$strip>, z.ZodObject<{
2734
+ type: z.ZodLiteral<"prediction_market">;
2735
+ data: z.ZodObject<{
2736
+ source: z.ZodEnum<{
2737
+ kalshi: "kalshi";
2738
+ polymarket: "polymarket";
2739
+ }>;
2740
+ marketKey: z.ZodString;
2741
+ track: z.ZodEnum<{
2742
+ PEAK: "PEAK";
2743
+ TROUGH: "TROUGH";
2744
+ }>;
2745
+ threshold: z.ZodNumber;
2746
+ }, z.core.$strip>;
2747
+ }, z.core.$strip>, z.ZodObject<{
2748
+ type: z.ZodLiteral<"btc_dominance">;
2749
+ data: z.ZodObject<{
2750
+ source: z.ZodLiteral<"coingecko">;
2751
+ track: z.ZodEnum<{
2752
+ PEAK: "PEAK";
2753
+ TROUGH: "TROUGH";
2754
+ }>;
2755
+ threshold: z.ZodNumber;
2756
+ }, z.core.$strip>;
2757
+ }, z.core.$strip>], "type">;
2758
+ context: z.ZodObject<{
2759
+ type: z.ZodLiteral<"TWAP">;
2760
+ durationSec: z.ZodInt;
2761
+ sliceIntervalSec: z.ZodInt;
2762
+ randomization: z.ZodObject<{
2763
+ timingJitterBps: z.ZodInt;
2764
+ sizeJitterBps: z.ZodInt;
2765
+ }, z.core.$strip>;
2766
+ position: z.ZodObject<{
2767
+ id: z.ZodUUID;
2768
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
2769
+ }, z.core.$strip>;
2770
+ }, z.core.$strip>;
2771
+ trailing: z.ZodOptional<z.ZodObject<{
2772
+ mode: z.ZodEnum<{
2773
+ RELATIVE_BPS: "RELATIVE_BPS";
2774
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
2775
+ }>;
2776
+ deltaValue: z.ZodNumber;
2777
+ activationValue: z.ZodOptional<z.ZodNumber>;
2778
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
2779
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
2780
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
2781
+ }, z.core.$strip>>;
2782
+ }, z.core.$strip>], "intent">], "type">>;
2783
+ createdAt: z.ZodString;
2784
+ updatedAt: z.ZodString;
2785
+ }, z.core.$strip>;
2786
+ }, z.core.$strip>;
2787
+ export type LadderResponse = z.output<typeof LadderResponse>;
2788
+ export declare const LadderListResponse: z.ZodObject<{
2789
+ limit: z.ZodNumber;
2790
+ nextCursor: z.ZodOptional<z.ZodString>;
2791
+ ladders: z.ZodArray<z.ZodObject<{
2792
+ id: z.ZodUUID;
2793
+ connector: z.ZodEnum<{
2794
+ hyperliquid: "hyperliquid";
2795
+ binance: "binance";
2796
+ bybit: "bybit";
2797
+ okx: "okx";
2798
+ lighter: "lighter";
2799
+ }>;
2800
+ positionKey: z.ZodString;
2801
+ config: z.ZodObject<{
2802
+ thresholdStart: z.ZodNumber;
2803
+ thresholdEnd: z.ZodNumber;
2804
+ levels: z.ZodInt;
2805
+ weighting: z.ZodDefault<z.ZodLiteral<"EQUAL">>;
2806
+ }, z.core.$strip>;
2807
+ status: z.ZodEnum<{
2808
+ CANCELLED: "CANCELLED";
2809
+ ACTIVE: "ACTIVE";
2810
+ COMPLETED: "COMPLETED";
2811
+ }>;
2812
+ attachTriggers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
2813
+ intent: z.ZodLiteral<"CLOSE">;
2814
+ type: z.ZodLiteral<"MARKET">;
2815
+ bracketType: z.ZodEnum<{
2816
+ STOP_LOSS: "STOP_LOSS";
2817
+ TAKE_PROFIT: "TAKE_PROFIT";
2818
+ }>;
2819
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
2820
+ type: z.ZodLiteral<"notional">;
2821
+ data: z.ZodObject<{
2822
+ priceSource: z.ZodEnum<{
2823
+ mid: "mid";
2824
+ mark: "mark";
2825
+ }>;
2826
+ threshold: z.ZodNumber;
2827
+ }, z.core.$strip>;
2828
+ }, z.core.$strip>, z.ZodObject<{
2829
+ type: z.ZodLiteral<"upnl">;
2830
+ data: z.ZodObject<{
2831
+ priceSource: z.ZodEnum<{
2832
+ mid: "mid";
2833
+ mark: "mark";
2834
+ }>;
2835
+ threshold: z.ZodNumber;
2836
+ }, z.core.$strip>;
2837
+ }, z.core.$strip>, z.ZodObject<{
2838
+ type: z.ZodLiteral<"upnl_bps">;
2839
+ data: z.ZodObject<{
2840
+ priceSource: z.ZodEnum<{
2841
+ mid: "mid";
2842
+ mark: "mark";
2843
+ }>;
2844
+ threshold: z.ZodNumber;
2845
+ }, z.core.$strip>;
2846
+ }, z.core.$strip>], "type">;
2847
+ }, z.core.$strip>, z.ZodObject<{
2848
+ intent: z.ZodLiteral<"CLOSE">;
2849
+ type: z.ZodLiteral<"MARKET">;
2850
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
2851
+ type: z.ZodLiteral<"notional_trailing">;
2852
+ data: z.ZodObject<{
2853
+ priceSource: z.ZodEnum<{
2854
+ mid: "mid";
2855
+ mark: "mark";
2856
+ }>;
2857
+ }, z.core.$strip>;
2858
+ }, z.core.$strip>, z.ZodObject<{
2859
+ type: z.ZodLiteral<"upnl_trailing">;
2860
+ data: z.ZodObject<{
2861
+ priceSource: z.ZodEnum<{
2862
+ mid: "mid";
2863
+ mark: "mark";
2864
+ }>;
2865
+ }, z.core.$strip>;
2866
+ }, z.core.$strip>, z.ZodObject<{
2867
+ type: z.ZodLiteral<"upnl_bps_trailing">;
2868
+ data: z.ZodObject<{
2869
+ priceSource: z.ZodEnum<{
2870
+ mid: "mid";
2871
+ mark: "mark";
2872
+ }>;
2873
+ }, z.core.$strip>;
2874
+ }, z.core.$strip>], "type">;
2875
+ trailing: z.ZodObject<{
2876
+ mode: z.ZodEnum<{
2877
+ RELATIVE_BPS: "RELATIVE_BPS";
2878
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
2879
+ }>;
2880
+ deltaValue: z.ZodNumber;
2881
+ activationValue: z.ZodOptional<z.ZodNumber>;
2882
+ }, z.core.$strip>;
2883
+ }, z.core.$strip>]>>>;
2884
+ triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
2885
+ id: z.ZodUUID;
2886
+ tradeAccountId: z.ZodUUID;
2887
+ connector: z.ZodEnum<{
2888
+ hyperliquid: "hyperliquid";
2889
+ binance: "binance";
2890
+ bybit: "bybit";
2891
+ okx: "okx";
2892
+ lighter: "lighter";
2893
+ }>;
2894
+ status: z.ZodEnum<{
2895
+ CANCELLED: "CANCELLED";
2896
+ ACTIVE: "ACTIVE";
2897
+ TRIGGERED: "TRIGGERED";
2898
+ }>;
2899
+ ladderId: z.ZodOptional<z.ZodUUID>;
2900
+ ladderIndex: z.ZodOptional<z.ZodNumber>;
2901
+ parentTriggerId: z.ZodOptional<z.ZodUUID>;
2902
+ triggeredAt: z.ZodOptional<z.ZodString>;
2903
+ cancelledAt: z.ZodOptional<z.ZodString>;
2904
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
2905
+ USER: "USER";
2906
+ POSITION_CLOSED: "POSITION_CLOSED";
2907
+ SYSTEM: "SYSTEM";
2908
+ POSITION_NETTED: "POSITION_NETTED";
2909
+ POSITION_REVERSED: "POSITION_REVERSED";
2910
+ }>>;
2911
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
2912
+ id: z.ZodUUID;
2913
+ cloid: z.ZodOptional<z.ZodString>;
2914
+ exchangeFillId: z.ZodOptional<z.ZodString>;
2915
+ status: z.ZodEnum<{
2916
+ PROVISIONAL: "PROVISIONAL";
2917
+ CONFIRMED: "CONFIRMED";
2918
+ RECONCILED: "RECONCILED";
2919
+ }>;
2920
+ tradeAccountId: z.ZodUUID;
2921
+ symbol: z.ZodString;
2922
+ positionId: z.ZodUUID;
2923
+ connector: z.ZodEnum<{
2924
+ hyperliquid: "hyperliquid";
2925
+ binance: "binance";
2926
+ bybit: "bybit";
2927
+ okx: "okx";
2928
+ lighter: "lighter";
2929
+ }>;
2930
+ side: z.ZodEnum<{
2931
+ BUY: "BUY";
2932
+ SELL: "SELL";
2933
+ }>;
2934
+ reduceOnly: z.ZodBoolean;
2935
+ isExternal: z.ZodBoolean;
2936
+ synthetic: z.ZodBoolean;
2937
+ quantity: z.ZodString;
2938
+ price: z.ZodString;
2939
+ usd: z.ZodString;
2940
+ tradeFee: z.ZodOptional<z.ZodString>;
2941
+ pearFee: z.ZodOptional<z.ZodString>;
2942
+ timestamp: z.ZodString;
2943
+ original: z.ZodOptional<z.ZodObject<{
2944
+ exchangeFillId: z.ZodString;
2945
+ quantity: z.ZodString;
2946
+ }, z.core.$strip>>;
2947
+ }, z.core.$strip>>>;
2948
+ bracketType: z.ZodEnum<{
2949
+ STOP_LOSS: "STOP_LOSS";
2950
+ TAKE_PROFIT: "TAKE_PROFIT";
2951
+ NONE: "NONE";
2952
+ }>;
2953
+ semanticBracketType: z.ZodOptional<z.ZodEnum<{
2954
+ STOP_LOSS: "STOP_LOSS";
2955
+ TAKE_PROFIT: "TAKE_PROFIT";
2956
+ NONE: "NONE";
2957
+ }>>;
2958
+ createdAt: z.ZodString;
2959
+ updatedAt: z.ZodString;
2960
+ intent: z.ZodLiteral<"OPEN">;
2961
+ type: z.ZodLiteral<"MARKET">;
2962
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
2963
+ type: z.ZodLiteral<"ratio">;
2964
+ data: z.ZodObject<{
2965
+ priceSource: z.ZodEnum<{
2966
+ mid: "mid";
2967
+ mark: "mark";
2968
+ }>;
2969
+ symbol_a: z.ZodString;
2970
+ symbol_b: z.ZodString;
2971
+ track: z.ZodEnum<{
2972
+ PEAK: "PEAK";
2973
+ TROUGH: "TROUGH";
2974
+ }>;
2975
+ threshold: z.ZodNumber;
2976
+ }, z.core.$strip>;
2977
+ }, z.core.$strip>, z.ZodObject<{
2978
+ type: z.ZodLiteral<"price">;
2979
+ data: z.ZodObject<{
2980
+ priceSource: z.ZodEnum<{
2981
+ mid: "mid";
2982
+ mark: "mark";
2983
+ }>;
2984
+ symbol: z.ZodString;
2985
+ track: z.ZodEnum<{
2986
+ PEAK: "PEAK";
2987
+ TROUGH: "TROUGH";
2988
+ }>;
2989
+ threshold: z.ZodNumber;
2990
+ }, z.core.$strip>;
2991
+ }, z.core.$strip>, z.ZodObject<{
2992
+ type: z.ZodLiteral<"weighted_ratio">;
2993
+ data: z.ZodObject<{
2994
+ priceSource: z.ZodEnum<{
2995
+ mid: "mid";
2996
+ mark: "mark";
2997
+ }>;
2998
+ basket: z.ZodArray<z.ZodObject<{
2999
+ symbol: z.ZodString;
3000
+ side: z.ZodEnum<{
3001
+ BUY: "BUY";
3002
+ SELL: "SELL";
3003
+ }>;
3004
+ weight: z.ZodNumber;
3005
+ }, z.core.$strip>>;
3006
+ track: z.ZodEnum<{
3007
+ PEAK: "PEAK";
3008
+ TROUGH: "TROUGH";
3009
+ }>;
3010
+ threshold: z.ZodNumber;
3011
+ }, z.core.$strip>;
3012
+ }, z.core.$strip>, z.ZodObject<{
3013
+ type: z.ZodLiteral<"funding_rate">;
3014
+ data: z.ZodObject<{
3015
+ connector: z.ZodEnum<{
3016
+ hyperliquid: "hyperliquid";
3017
+ binance: "binance";
3018
+ bybit: "bybit";
3019
+ okx: "okx";
3020
+ lighter: "lighter";
3021
+ }>;
3022
+ symbol: z.ZodString;
3023
+ track: z.ZodEnum<{
3024
+ PEAK: "PEAK";
3025
+ TROUGH: "TROUGH";
3026
+ }>;
3027
+ threshold: z.ZodNumber;
3028
+ }, z.core.$strip>;
3029
+ }, z.core.$strip>, z.ZodObject<{
3030
+ type: z.ZodLiteral<"prediction_market">;
3031
+ data: z.ZodObject<{
3032
+ source: z.ZodEnum<{
3033
+ kalshi: "kalshi";
3034
+ polymarket: "polymarket";
3035
+ }>;
3036
+ marketKey: z.ZodString;
3037
+ track: z.ZodEnum<{
3038
+ PEAK: "PEAK";
3039
+ TROUGH: "TROUGH";
3040
+ }>;
3041
+ threshold: z.ZodNumber;
3042
+ }, z.core.$strip>;
3043
+ }, z.core.$strip>, z.ZodObject<{
3044
+ type: z.ZodLiteral<"btc_dominance">;
3045
+ data: z.ZodObject<{
3046
+ source: z.ZodLiteral<"coingecko">;
3047
+ track: z.ZodEnum<{
3048
+ PEAK: "PEAK";
3049
+ TROUGH: "TROUGH";
3050
+ }>;
3051
+ threshold: z.ZodNumber;
3052
+ }, z.core.$strip>;
3053
+ }, z.core.$strip>], "type">;
3054
+ context: z.ZodObject<{
3055
+ type: z.ZodLiteral<"MARKET">;
3056
+ legs: z.ZodTuple<[z.ZodObject<{
3057
+ symbol: z.ZodString;
3058
+ id: z.ZodOptional<z.ZodString>;
3059
+ side: z.ZodEnum<{
3060
+ BUY: "BUY";
3061
+ SELL: "SELL";
3062
+ }>;
3063
+ mode: z.ZodEnum<{
3064
+ QUANTITY: "QUANTITY";
3065
+ USD: "USD";
3066
+ }>;
1371
3067
  amount: z.ZodString;
1372
- reduceOnly: z.ZodBoolean;
1373
3068
  }, z.core.$strip>], z.ZodObject<{
1374
3069
  symbol: z.ZodString;
3070
+ id: z.ZodOptional<z.ZodString>;
1375
3071
  side: z.ZodEnum<{
1376
3072
  BUY: "BUY";
1377
3073
  SELL: "SELL";
@@ -1381,20 +3077,18 @@ export declare const LadderResponse: z.ZodObject<{
1381
3077
  USD: "USD";
1382
3078
  }>;
1383
3079
  amount: z.ZodString;
1384
- reduceOnly: z.ZodBoolean;
3080
+ }, z.core.$strip>>;
3081
+ attachedTriggers: z.ZodArray<z.ZodObject<{
3082
+ kind: z.ZodEnum<{
3083
+ STATIC: "STATIC";
3084
+ TRAILING: "TRAILING";
3085
+ }>;
3086
+ bracketType: z.ZodEnum<{
3087
+ STOP_LOSS: "STOP_LOSS";
3088
+ TAKE_PROFIT: "TAKE_PROFIT";
3089
+ }>;
1385
3090
  }, z.core.$strip>>;
1386
3091
  }, z.core.$strip>;
1387
- trailing: z.ZodOptional<z.ZodObject<{
1388
- mode: z.ZodEnum<{
1389
- RELATIVE_BPS: "RELATIVE_BPS";
1390
- ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
1391
- }>;
1392
- deltaValue: z.ZodNumber;
1393
- activationValue: z.ZodOptional<z.ZodNumber>;
1394
- bestMetricSeen: z.ZodOptional<z.ZodNumber>;
1395
- currentStopValue: z.ZodOptional<z.ZodNumber>;
1396
- stopBreachedAt: z.ZodOptional<z.ZodNumber>;
1397
- }, z.core.$strip>>;
1398
3092
  }, z.core.$strip>, z.ZodObject<{
1399
3093
  id: z.ZodUUID;
1400
3094
  tradeAccountId: z.ZodUUID;
@@ -1471,7 +3165,7 @@ export declare const LadderResponse: z.ZodObject<{
1471
3165
  }>>;
1472
3166
  createdAt: z.ZodString;
1473
3167
  updatedAt: z.ZodString;
1474
- intent: z.ZodLiteral<"CLOSE">;
3168
+ intent: z.ZodLiteral<"ADJUST">;
1475
3169
  type: z.ZodLiteral<"MARKET">;
1476
3170
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1477
3171
  type: z.ZodLiteral<"ratio">;
@@ -1562,65 +3256,6 @@ export declare const LadderResponse: z.ZodObject<{
1562
3256
  }>;
1563
3257
  threshold: z.ZodNumber;
1564
3258
  }, z.core.$strip>;
1565
- }, z.core.$strip>, z.ZodObject<{
1566
- type: z.ZodLiteral<"ratio_trailing">;
1567
- data: z.ZodObject<{
1568
- priceSource: z.ZodEnum<{
1569
- mid: "mid";
1570
- mark: "mark";
1571
- }>;
1572
- symbol_a: z.ZodString;
1573
- symbol_b: z.ZodString;
1574
- }, z.core.$strip>;
1575
- }, z.core.$strip>, z.ZodObject<{
1576
- type: z.ZodLiteral<"price_trailing">;
1577
- data: z.ZodObject<{
1578
- priceSource: z.ZodEnum<{
1579
- mid: "mid";
1580
- mark: "mark";
1581
- }>;
1582
- symbol: z.ZodString;
1583
- }, z.core.$strip>;
1584
- }, z.core.$strip>, z.ZodObject<{
1585
- type: z.ZodLiteral<"weighted_ratio_trailing">;
1586
- data: z.ZodObject<{
1587
- priceSource: z.ZodEnum<{
1588
- mid: "mid";
1589
- mark: "mark";
1590
- }>;
1591
- basket: z.ZodArray<z.ZodObject<{
1592
- symbol: z.ZodString;
1593
- side: z.ZodEnum<{
1594
- BUY: "BUY";
1595
- SELL: "SELL";
1596
- }>;
1597
- weight: z.ZodNumber;
1598
- }, z.core.$strip>>;
1599
- }, z.core.$strip>;
1600
- }, z.core.$strip>, z.ZodObject<{
1601
- type: z.ZodLiteral<"notional_trailing">;
1602
- data: z.ZodObject<{
1603
- priceSource: z.ZodEnum<{
1604
- mid: "mid";
1605
- mark: "mark";
1606
- }>;
1607
- }, z.core.$strip>;
1608
- }, z.core.$strip>, z.ZodObject<{
1609
- type: z.ZodLiteral<"upnl_trailing">;
1610
- data: z.ZodObject<{
1611
- priceSource: z.ZodEnum<{
1612
- mid: "mid";
1613
- mark: "mark";
1614
- }>;
1615
- }, z.core.$strip>;
1616
- }, z.core.$strip>, z.ZodObject<{
1617
- type: z.ZodLiteral<"upnl_bps_trailing">;
1618
- data: z.ZodObject<{
1619
- priceSource: z.ZodEnum<{
1620
- mid: "mid";
1621
- mark: "mark";
1622
- }>;
1623
- }, z.core.$strip>;
1624
3259
  }, z.core.$strip>, z.ZodObject<{
1625
3260
  type: z.ZodLiteral<"funding_rate">;
1626
3261
  data: z.ZodObject<{
@@ -1634,156 +3269,81 @@ export declare const LadderResponse: z.ZodObject<{
1634
3269
  symbol: z.ZodString;
1635
3270
  track: z.ZodEnum<{
1636
3271
  PEAK: "PEAK";
1637
- TROUGH: "TROUGH";
1638
- }>;
1639
- threshold: z.ZodNumber;
1640
- }, z.core.$strip>;
1641
- }, z.core.$strip>, z.ZodObject<{
1642
- type: z.ZodLiteral<"prediction_market">;
1643
- data: z.ZodObject<{
1644
- source: z.ZodEnum<{
1645
- kalshi: "kalshi";
1646
- polymarket: "polymarket";
1647
- }>;
1648
- marketKey: z.ZodString;
1649
- track: z.ZodEnum<{
1650
- PEAK: "PEAK";
1651
- TROUGH: "TROUGH";
1652
- }>;
1653
- threshold: z.ZodNumber;
1654
- }, z.core.$strip>;
1655
- }, z.core.$strip>, z.ZodObject<{
1656
- type: z.ZodLiteral<"btc_dominance">;
1657
- data: z.ZodObject<{
1658
- source: z.ZodLiteral<"coingecko">;
1659
- track: z.ZodEnum<{
1660
- PEAK: "PEAK";
1661
- TROUGH: "TROUGH";
1662
- }>;
1663
- threshold: z.ZodNumber;
1664
- }, z.core.$strip>;
1665
- }, z.core.$strip>], "type">;
1666
- context: z.ZodObject<{
1667
- type: z.ZodLiteral<"MARKET">;
1668
- position: z.ZodObject<{
1669
- id: z.ZodUUID;
1670
- initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
1671
- }, z.core.$strip>;
1672
- }, z.core.$strip>;
1673
- trailing: z.ZodOptional<z.ZodObject<{
1674
- mode: z.ZodEnum<{
1675
- RELATIVE_BPS: "RELATIVE_BPS";
1676
- ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
1677
- }>;
1678
- deltaValue: z.ZodNumber;
1679
- activationValue: z.ZodOptional<z.ZodNumber>;
1680
- bestMetricSeen: z.ZodOptional<z.ZodNumber>;
1681
- currentStopValue: z.ZodOptional<z.ZodNumber>;
1682
- stopBreachedAt: z.ZodOptional<z.ZodNumber>;
1683
- }, z.core.$strip>>;
1684
- }, z.core.$strip>], "intent">], "type">>;
1685
- createdAt: z.ZodString;
1686
- updatedAt: z.ZodString;
1687
- }, z.core.$strip>;
1688
- }, z.core.$strip>;
1689
- export type LadderResponse = z.output<typeof LadderResponse>;
1690
- export declare const LadderListResponse: z.ZodObject<{
1691
- limit: z.ZodNumber;
1692
- nextCursor: z.ZodOptional<z.ZodString>;
1693
- ladders: z.ZodArray<z.ZodObject<{
1694
- id: z.ZodUUID;
1695
- connector: z.ZodEnum<{
1696
- hyperliquid: "hyperliquid";
1697
- binance: "binance";
1698
- bybit: "bybit";
1699
- okx: "okx";
1700
- lighter: "lighter";
1701
- }>;
1702
- positionKey: z.ZodString;
1703
- config: z.ZodObject<{
1704
- thresholdStart: z.ZodNumber;
1705
- thresholdEnd: z.ZodNumber;
1706
- levels: z.ZodInt;
1707
- weighting: z.ZodDefault<z.ZodLiteral<"EQUAL">>;
1708
- }, z.core.$strip>;
1709
- status: z.ZodEnum<{
1710
- CANCELLED: "CANCELLED";
1711
- ACTIVE: "ACTIVE";
1712
- COMPLETED: "COMPLETED";
1713
- }>;
1714
- attachTriggers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1715
- intent: z.ZodLiteral<"CLOSE">;
1716
- type: z.ZodLiteral<"MARKET">;
1717
- bracketType: z.ZodEnum<{
1718
- STOP_LOSS: "STOP_LOSS";
1719
- TAKE_PROFIT: "TAKE_PROFIT";
1720
- }>;
1721
- condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1722
- type: z.ZodLiteral<"notional">;
1723
- data: z.ZodObject<{
1724
- priceSource: z.ZodEnum<{
1725
- mid: "mid";
1726
- mark: "mark";
3272
+ TROUGH: "TROUGH";
1727
3273
  }>;
1728
3274
  threshold: z.ZodNumber;
1729
3275
  }, z.core.$strip>;
1730
3276
  }, z.core.$strip>, z.ZodObject<{
1731
- type: z.ZodLiteral<"upnl">;
3277
+ type: z.ZodLiteral<"prediction_market">;
1732
3278
  data: z.ZodObject<{
1733
- priceSource: z.ZodEnum<{
1734
- mid: "mid";
1735
- mark: "mark";
3279
+ source: z.ZodEnum<{
3280
+ kalshi: "kalshi";
3281
+ polymarket: "polymarket";
3282
+ }>;
3283
+ marketKey: z.ZodString;
3284
+ track: z.ZodEnum<{
3285
+ PEAK: "PEAK";
3286
+ TROUGH: "TROUGH";
1736
3287
  }>;
1737
3288
  threshold: z.ZodNumber;
1738
3289
  }, z.core.$strip>;
1739
3290
  }, z.core.$strip>, z.ZodObject<{
1740
- type: z.ZodLiteral<"upnl_bps">;
3291
+ type: z.ZodLiteral<"btc_dominance">;
1741
3292
  data: z.ZodObject<{
1742
- priceSource: z.ZodEnum<{
1743
- mid: "mid";
1744
- mark: "mark";
3293
+ source: z.ZodLiteral<"coingecko">;
3294
+ track: z.ZodEnum<{
3295
+ PEAK: "PEAK";
3296
+ TROUGH: "TROUGH";
1745
3297
  }>;
1746
3298
  threshold: z.ZodNumber;
1747
3299
  }, z.core.$strip>;
1748
3300
  }, z.core.$strip>], "type">;
1749
- }, z.core.$strip>, z.ZodObject<{
1750
- intent: z.ZodLiteral<"CLOSE">;
1751
- type: z.ZodLiteral<"MARKET">;
1752
- condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1753
- type: z.ZodLiteral<"notional_trailing">;
1754
- data: z.ZodObject<{
1755
- priceSource: z.ZodEnum<{
1756
- mid: "mid";
1757
- mark: "mark";
1758
- }>;
3301
+ context: z.ZodObject<{
3302
+ type: z.ZodLiteral<"MARKET">;
3303
+ position: z.ZodObject<{
3304
+ id: z.ZodUUID;
3305
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
1759
3306
  }, z.core.$strip>;
1760
- }, z.core.$strip>, z.ZodObject<{
1761
- type: z.ZodLiteral<"upnl_trailing">;
1762
- data: z.ZodObject<{
1763
- priceSource: z.ZodEnum<{
1764
- mid: "mid";
1765
- mark: "mark";
3307
+ legs: z.ZodTuple<[z.ZodObject<{
3308
+ id: z.ZodOptional<z.ZodString>;
3309
+ symbol: z.ZodString;
3310
+ side: z.ZodEnum<{
3311
+ BUY: "BUY";
3312
+ SELL: "SELL";
1766
3313
  }>;
1767
- }, z.core.$strip>;
1768
- }, z.core.$strip>, z.ZodObject<{
1769
- type: z.ZodLiteral<"upnl_bps_trailing">;
1770
- data: z.ZodObject<{
1771
- priceSource: z.ZodEnum<{
1772
- mid: "mid";
1773
- mark: "mark";
3314
+ mode: z.ZodEnum<{
3315
+ QUANTITY: "QUANTITY";
3316
+ USD: "USD";
1774
3317
  }>;
1775
- }, z.core.$strip>;
1776
- }, z.core.$strip>], "type">;
1777
- trailing: z.ZodObject<{
3318
+ amount: z.ZodString;
3319
+ reduceOnly: z.ZodBoolean;
3320
+ }, z.core.$strip>], z.ZodObject<{
3321
+ id: z.ZodOptional<z.ZodString>;
3322
+ symbol: z.ZodString;
3323
+ side: z.ZodEnum<{
3324
+ BUY: "BUY";
3325
+ SELL: "SELL";
3326
+ }>;
3327
+ mode: z.ZodEnum<{
3328
+ QUANTITY: "QUANTITY";
3329
+ USD: "USD";
3330
+ }>;
3331
+ amount: z.ZodString;
3332
+ reduceOnly: z.ZodBoolean;
3333
+ }, z.core.$strip>>;
3334
+ }, z.core.$strip>;
3335
+ trailing: z.ZodOptional<z.ZodObject<{
1778
3336
  mode: z.ZodEnum<{
1779
3337
  RELATIVE_BPS: "RELATIVE_BPS";
1780
3338
  ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
1781
3339
  }>;
1782
3340
  deltaValue: z.ZodNumber;
1783
3341
  activationValue: z.ZodOptional<z.ZodNumber>;
1784
- }, z.core.$strip>;
1785
- }, z.core.$strip>]>>>;
1786
- triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
3342
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
3343
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
3344
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
3345
+ }, z.core.$strip>>;
3346
+ }, z.core.$strip>, z.ZodObject<{
1787
3347
  id: z.ZodUUID;
1788
3348
  tradeAccountId: z.ZodUUID;
1789
3349
  connector: z.ZodEnum<{
@@ -1859,7 +3419,7 @@ export declare const LadderListResponse: z.ZodObject<{
1859
3419
  }>>;
1860
3420
  createdAt: z.ZodString;
1861
3421
  updatedAt: z.ZodString;
1862
- intent: z.ZodLiteral<"OPEN">;
3422
+ intent: z.ZodLiteral<"CLOSE">;
1863
3423
  type: z.ZodLiteral<"MARKET">;
1864
3424
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1865
3425
  type: z.ZodLiteral<"ratio">;
@@ -1911,6 +3471,104 @@ export declare const LadderListResponse: z.ZodObject<{
1911
3471
  }>;
1912
3472
  threshold: z.ZodNumber;
1913
3473
  }, z.core.$strip>;
3474
+ }, z.core.$strip>, z.ZodObject<{
3475
+ type: z.ZodLiteral<"notional">;
3476
+ data: z.ZodObject<{
3477
+ priceSource: z.ZodEnum<{
3478
+ mid: "mid";
3479
+ mark: "mark";
3480
+ }>;
3481
+ track: z.ZodEnum<{
3482
+ PEAK: "PEAK";
3483
+ TROUGH: "TROUGH";
3484
+ }>;
3485
+ threshold: z.ZodNumber;
3486
+ }, z.core.$strip>;
3487
+ }, z.core.$strip>, z.ZodObject<{
3488
+ type: z.ZodLiteral<"upnl">;
3489
+ data: z.ZodObject<{
3490
+ priceSource: z.ZodEnum<{
3491
+ mid: "mid";
3492
+ mark: "mark";
3493
+ }>;
3494
+ track: z.ZodEnum<{
3495
+ PEAK: "PEAK";
3496
+ TROUGH: "TROUGH";
3497
+ }>;
3498
+ threshold: z.ZodNumber;
3499
+ }, z.core.$strip>;
3500
+ }, z.core.$strip>, z.ZodObject<{
3501
+ type: z.ZodLiteral<"upnl_bps">;
3502
+ data: z.ZodObject<{
3503
+ priceSource: z.ZodEnum<{
3504
+ mid: "mid";
3505
+ mark: "mark";
3506
+ }>;
3507
+ track: z.ZodEnum<{
3508
+ PEAK: "PEAK";
3509
+ TROUGH: "TROUGH";
3510
+ }>;
3511
+ threshold: z.ZodNumber;
3512
+ }, z.core.$strip>;
3513
+ }, z.core.$strip>, z.ZodObject<{
3514
+ type: z.ZodLiteral<"ratio_trailing">;
3515
+ data: z.ZodObject<{
3516
+ priceSource: z.ZodEnum<{
3517
+ mid: "mid";
3518
+ mark: "mark";
3519
+ }>;
3520
+ symbol_a: z.ZodString;
3521
+ symbol_b: z.ZodString;
3522
+ }, z.core.$strip>;
3523
+ }, z.core.$strip>, z.ZodObject<{
3524
+ type: z.ZodLiteral<"price_trailing">;
3525
+ data: z.ZodObject<{
3526
+ priceSource: z.ZodEnum<{
3527
+ mid: "mid";
3528
+ mark: "mark";
3529
+ }>;
3530
+ symbol: z.ZodString;
3531
+ }, z.core.$strip>;
3532
+ }, z.core.$strip>, z.ZodObject<{
3533
+ type: z.ZodLiteral<"weighted_ratio_trailing">;
3534
+ data: z.ZodObject<{
3535
+ priceSource: z.ZodEnum<{
3536
+ mid: "mid";
3537
+ mark: "mark";
3538
+ }>;
3539
+ basket: z.ZodArray<z.ZodObject<{
3540
+ symbol: z.ZodString;
3541
+ side: z.ZodEnum<{
3542
+ BUY: "BUY";
3543
+ SELL: "SELL";
3544
+ }>;
3545
+ weight: z.ZodNumber;
3546
+ }, z.core.$strip>>;
3547
+ }, z.core.$strip>;
3548
+ }, z.core.$strip>, z.ZodObject<{
3549
+ type: z.ZodLiteral<"notional_trailing">;
3550
+ data: z.ZodObject<{
3551
+ priceSource: z.ZodEnum<{
3552
+ mid: "mid";
3553
+ mark: "mark";
3554
+ }>;
3555
+ }, z.core.$strip>;
3556
+ }, z.core.$strip>, z.ZodObject<{
3557
+ type: z.ZodLiteral<"upnl_trailing">;
3558
+ data: z.ZodObject<{
3559
+ priceSource: z.ZodEnum<{
3560
+ mid: "mid";
3561
+ mark: "mark";
3562
+ }>;
3563
+ }, z.core.$strip>;
3564
+ }, z.core.$strip>, z.ZodObject<{
3565
+ type: z.ZodLiteral<"upnl_bps_trailing">;
3566
+ data: z.ZodObject<{
3567
+ priceSource: z.ZodEnum<{
3568
+ mid: "mid";
3569
+ mark: "mark";
3570
+ }>;
3571
+ }, z.core.$strip>;
1914
3572
  }, z.core.$strip>, z.ZodObject<{
1915
3573
  type: z.ZodLiteral<"funding_rate">;
1916
3574
  data: z.ZodObject<{
@@ -1955,41 +3613,23 @@ export declare const LadderListResponse: z.ZodObject<{
1955
3613
  }, z.core.$strip>], "type">;
1956
3614
  context: z.ZodObject<{
1957
3615
  type: z.ZodLiteral<"MARKET">;
1958
- legs: z.ZodTuple<[z.ZodObject<{
1959
- symbol: z.ZodString;
1960
- side: z.ZodEnum<{
1961
- BUY: "BUY";
1962
- SELL: "SELL";
1963
- }>;
1964
- mode: z.ZodEnum<{
1965
- QUANTITY: "QUANTITY";
1966
- USD: "USD";
1967
- }>;
1968
- amount: z.ZodString;
1969
- }, z.core.$strip>], z.ZodObject<{
1970
- symbol: z.ZodString;
1971
- side: z.ZodEnum<{
1972
- BUY: "BUY";
1973
- SELL: "SELL";
1974
- }>;
1975
- mode: z.ZodEnum<{
1976
- QUANTITY: "QUANTITY";
1977
- USD: "USD";
1978
- }>;
1979
- amount: z.ZodString;
1980
- }, z.core.$strip>>;
1981
- attachedTriggers: z.ZodArray<z.ZodObject<{
1982
- kind: z.ZodEnum<{
1983
- STATIC: "STATIC";
1984
- TRAILING: "TRAILING";
1985
- }>;
1986
- bracketType: z.ZodEnum<{
1987
- STOP_LOSS: "STOP_LOSS";
1988
- TAKE_PROFIT: "TAKE_PROFIT";
1989
- }>;
1990
- }, z.core.$strip>>;
3616
+ position: z.ZodObject<{
3617
+ id: z.ZodUUID;
3618
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
3619
+ }, z.core.$strip>;
1991
3620
  }, z.core.$strip>;
1992
- }, z.core.$strip>, z.ZodObject<{
3621
+ trailing: z.ZodOptional<z.ZodObject<{
3622
+ mode: z.ZodEnum<{
3623
+ RELATIVE_BPS: "RELATIVE_BPS";
3624
+ ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
3625
+ }>;
3626
+ deltaValue: z.ZodNumber;
3627
+ activationValue: z.ZodOptional<z.ZodNumber>;
3628
+ bestMetricSeen: z.ZodOptional<z.ZodNumber>;
3629
+ currentStopValue: z.ZodOptional<z.ZodNumber>;
3630
+ stopBreachedAt: z.ZodOptional<z.ZodNumber>;
3631
+ }, z.core.$strip>>;
3632
+ }, z.core.$strip>], "intent">, z.ZodDiscriminatedUnion<[z.ZodObject<{
1993
3633
  id: z.ZodUUID;
1994
3634
  tradeAccountId: z.ZodUUID;
1995
3635
  connector: z.ZodEnum<{
@@ -2066,7 +3706,8 @@ export declare const LadderListResponse: z.ZodObject<{
2066
3706
  createdAt: z.ZodString;
2067
3707
  updatedAt: z.ZodString;
2068
3708
  intent: z.ZodLiteral<"ADJUST">;
2069
- type: z.ZodLiteral<"MARKET">;
3709
+ type: z.ZodLiteral<"TWAP">;
3710
+ scheduleId: z.ZodOptional<z.ZodUUID>;
2070
3711
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
2071
3712
  type: z.ZodLiteral<"ratio">;
2072
3713
  data: z.ZodObject<{
@@ -2199,36 +3840,35 @@ export declare const LadderListResponse: z.ZodObject<{
2199
3840
  }, z.core.$strip>;
2200
3841
  }, z.core.$strip>], "type">;
2201
3842
  context: z.ZodObject<{
2202
- type: z.ZodLiteral<"MARKET">;
3843
+ type: z.ZodLiteral<"TWAP">;
3844
+ durationSec: z.ZodInt;
3845
+ sliceIntervalSec: z.ZodInt;
3846
+ randomization: z.ZodObject<{
3847
+ timingJitterBps: z.ZodInt;
3848
+ sizeJitterBps: z.ZodInt;
3849
+ }, z.core.$strip>;
2203
3850
  position: z.ZodObject<{
2204
3851
  id: z.ZodUUID;
2205
3852
  initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
2206
3853
  }, z.core.$strip>;
2207
3854
  legs: z.ZodTuple<[z.ZodObject<{
3855
+ id: z.ZodOptional<z.ZodString>;
2208
3856
  symbol: z.ZodString;
2209
3857
  side: z.ZodEnum<{
2210
3858
  BUY: "BUY";
2211
3859
  SELL: "SELL";
2212
3860
  }>;
2213
- mode: z.ZodEnum<{
2214
- QUANTITY: "QUANTITY";
2215
- USD: "USD";
2216
- }>;
2217
- amount: z.ZodString;
2218
- reduceOnly: z.ZodBoolean;
2219
- }, z.core.$strip>], z.ZodObject<{
3861
+ weight: z.ZodNumber;
3862
+ }, z.core.$strict>], z.ZodObject<{
3863
+ id: z.ZodOptional<z.ZodString>;
2220
3864
  symbol: z.ZodString;
2221
3865
  side: z.ZodEnum<{
2222
3866
  BUY: "BUY";
2223
3867
  SELL: "SELL";
2224
3868
  }>;
2225
- mode: z.ZodEnum<{
2226
- QUANTITY: "QUANTITY";
2227
- USD: "USD";
2228
- }>;
2229
- amount: z.ZodString;
2230
- reduceOnly: z.ZodBoolean;
2231
- }, z.core.$strip>>;
3869
+ weight: z.ZodNumber;
3870
+ }, z.core.$strict>>;
3871
+ targetNotional: z.ZodString;
2232
3872
  }, z.core.$strip>;
2233
3873
  trailing: z.ZodOptional<z.ZodObject<{
2234
3874
  mode: z.ZodEnum<{
@@ -2318,7 +3958,8 @@ export declare const LadderListResponse: z.ZodObject<{
2318
3958
  createdAt: z.ZodString;
2319
3959
  updatedAt: z.ZodString;
2320
3960
  intent: z.ZodLiteral<"CLOSE">;
2321
- type: z.ZodLiteral<"MARKET">;
3961
+ type: z.ZodLiteral<"TWAP">;
3962
+ scheduleId: z.ZodOptional<z.ZodUUID>;
2322
3963
  condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
2323
3964
  type: z.ZodLiteral<"ratio">;
2324
3965
  data: z.ZodObject<{
@@ -2510,7 +4151,13 @@ export declare const LadderListResponse: z.ZodObject<{
2510
4151
  }, z.core.$strip>;
2511
4152
  }, z.core.$strip>], "type">;
2512
4153
  context: z.ZodObject<{
2513
- type: z.ZodLiteral<"MARKET">;
4154
+ type: z.ZodLiteral<"TWAP">;
4155
+ durationSec: z.ZodInt;
4156
+ sliceIntervalSec: z.ZodInt;
4157
+ randomization: z.ZodObject<{
4158
+ timingJitterBps: z.ZodInt;
4159
+ sizeJitterBps: z.ZodInt;
4160
+ }, z.core.$strip>;
2514
4161
  position: z.ZodObject<{
2515
4162
  id: z.ZodUUID;
2516
4163
  initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;