@pear-protocol/types 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,6 +37,13 @@ const CreateMarketClose = z.object({
37
37
  */
38
38
  clientId: ClientIdCode
39
39
  });
40
+ const CreateMarketReverse = z.object({
41
+ type: z.literal("MARKET"),
42
+ /**
43
+ * Attribution route code (client_ids.code)
44
+ */
45
+ clientId: ClientIdCode
46
+ });
40
47
  const CreateMarketCloseAll = z.object({
41
48
  type: z.literal("MARKET"),
42
49
  /**
@@ -47,6 +54,7 @@ const CreateMarketCloseAll = z.object({
47
54
  const CreateTradeOpen = z.discriminatedUnion("type", [CreateMarketOpen]);
48
55
  const CreateTradeAdjust = z.discriminatedUnion("type", [CreateMarketAdjust]);
49
56
  const CreateTradeClose = z.discriminatedUnion("type", [CreateMarketClose]);
57
+ const CreateTradeReverse = z.discriminatedUnion("type", [CreateMarketReverse]);
50
58
  const CreateTradeCloseAll = z.discriminatedUnion("type", [CreateMarketCloseAll]);
51
59
 
52
- export { CreateMarketAdjust, CreateMarketClose, CreateMarketCloseAll, CreateMarketOpen, CreateTradeAdjust, CreateTradeClose, CreateTradeCloseAll, CreateTradeOpen };
60
+ export { CreateMarketAdjust, CreateMarketClose, CreateMarketCloseAll, CreateMarketOpen, CreateMarketReverse, CreateTradeAdjust, CreateTradeClose, CreateTradeCloseAll, CreateTradeOpen, CreateTradeReverse };
@@ -217,6 +217,63 @@ export declare const CreateTradeOpenResponse: z.ZodObject<{
217
217
  id: z.ZodUUID;
218
218
  exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
219
219
  }, z.core.$strip>;
220
+ }, z.core.$strip>, z.ZodObject<{
221
+ id: z.ZodUUID;
222
+ connector: z.ZodEnum<{
223
+ hyperliquid: "hyperliquid";
224
+ binance: "binance";
225
+ bybit: "bybit";
226
+ okx: "okx";
227
+ lighter: "lighter";
228
+ }>;
229
+ status: z.ZodEnum<{
230
+ CANCELLED: "CANCELLED";
231
+ IDLE: "IDLE";
232
+ ACTIVE: "ACTIVE";
233
+ COMPLETED: "COMPLETED";
234
+ FAILED: "FAILED";
235
+ }>;
236
+ error: z.ZodOptional<z.ZodString>;
237
+ createdAt: z.ZodString;
238
+ updatedAt: z.ZodString;
239
+ orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
240
+ id: z.ZodUUID;
241
+ connector: z.ZodEnum<{
242
+ hyperliquid: "hyperliquid";
243
+ binance: "binance";
244
+ bybit: "bybit";
245
+ okx: "okx";
246
+ lighter: "lighter";
247
+ }>;
248
+ status: z.ZodEnum<{
249
+ PENDING: "PENDING";
250
+ PARTIAL: "PARTIAL";
251
+ FILLED: "FILLED";
252
+ CANCELLED: "CANCELLED";
253
+ REJECTED: "REJECTED";
254
+ }>;
255
+ error: z.ZodOptional<z.ZodString>;
256
+ createdAt: z.ZodString;
257
+ updatedAt: z.ZodString;
258
+ type: z.ZodLiteral<"MARKET">;
259
+ symbol: z.ZodString;
260
+ side: z.ZodEnum<{
261
+ BUY: "BUY";
262
+ SELL: "SELL";
263
+ }>;
264
+ reduceOnly: z.ZodBoolean;
265
+ leverage: z.ZodInt;
266
+ quantity: z.ZodString;
267
+ price: z.ZodString;
268
+ filledQuantity: z.ZodString;
269
+ filledPrice: z.ZodOptional<z.ZodString>;
270
+ }, z.core.$strip>], "type">>>;
271
+ intent: z.ZodLiteral<"REVERSE">;
272
+ orderType: z.ZodLiteral<"MARKET">;
273
+ position: z.ZodObject<{
274
+ id: z.ZodUUID;
275
+ exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
276
+ }, z.core.$strip>;
220
277
  }, z.core.$strip>], "intent">], "orderType">;
221
278
  }, z.core.$strip>;
222
279
  export type CreateTradeOpenResponse = z.output<typeof CreateTradeOpenResponse>;
@@ -438,6 +495,63 @@ export declare const CreateTradeAdjustResponse: z.ZodObject<{
438
495
  id: z.ZodUUID;
439
496
  exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
440
497
  }, z.core.$strip>;
498
+ }, z.core.$strip>, z.ZodObject<{
499
+ id: z.ZodUUID;
500
+ connector: z.ZodEnum<{
501
+ hyperliquid: "hyperliquid";
502
+ binance: "binance";
503
+ bybit: "bybit";
504
+ okx: "okx";
505
+ lighter: "lighter";
506
+ }>;
507
+ status: z.ZodEnum<{
508
+ CANCELLED: "CANCELLED";
509
+ IDLE: "IDLE";
510
+ ACTIVE: "ACTIVE";
511
+ COMPLETED: "COMPLETED";
512
+ FAILED: "FAILED";
513
+ }>;
514
+ error: z.ZodOptional<z.ZodString>;
515
+ createdAt: z.ZodString;
516
+ updatedAt: z.ZodString;
517
+ orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
518
+ id: z.ZodUUID;
519
+ connector: z.ZodEnum<{
520
+ hyperliquid: "hyperliquid";
521
+ binance: "binance";
522
+ bybit: "bybit";
523
+ okx: "okx";
524
+ lighter: "lighter";
525
+ }>;
526
+ status: z.ZodEnum<{
527
+ PENDING: "PENDING";
528
+ PARTIAL: "PARTIAL";
529
+ FILLED: "FILLED";
530
+ CANCELLED: "CANCELLED";
531
+ REJECTED: "REJECTED";
532
+ }>;
533
+ error: z.ZodOptional<z.ZodString>;
534
+ createdAt: z.ZodString;
535
+ updatedAt: z.ZodString;
536
+ type: z.ZodLiteral<"MARKET">;
537
+ symbol: z.ZodString;
538
+ side: z.ZodEnum<{
539
+ BUY: "BUY";
540
+ SELL: "SELL";
541
+ }>;
542
+ reduceOnly: z.ZodBoolean;
543
+ leverage: z.ZodInt;
544
+ quantity: z.ZodString;
545
+ price: z.ZodString;
546
+ filledQuantity: z.ZodString;
547
+ filledPrice: z.ZodOptional<z.ZodString>;
548
+ }, z.core.$strip>], "type">>>;
549
+ intent: z.ZodLiteral<"REVERSE">;
550
+ orderType: z.ZodLiteral<"MARKET">;
551
+ position: z.ZodObject<{
552
+ id: z.ZodUUID;
553
+ exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
554
+ }, z.core.$strip>;
441
555
  }, z.core.$strip>], "intent">], "orderType">;
442
556
  }, z.core.$strip>;
443
557
  export type CreateTradeAdjustResponse = z.output<typeof CreateTradeAdjustResponse>;
@@ -659,9 +773,344 @@ export declare const CreateTradeCloseResponse: z.ZodObject<{
659
773
  id: z.ZodUUID;
660
774
  exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
661
775
  }, z.core.$strip>;
776
+ }, z.core.$strip>, z.ZodObject<{
777
+ id: z.ZodUUID;
778
+ connector: z.ZodEnum<{
779
+ hyperliquid: "hyperliquid";
780
+ binance: "binance";
781
+ bybit: "bybit";
782
+ okx: "okx";
783
+ lighter: "lighter";
784
+ }>;
785
+ status: z.ZodEnum<{
786
+ CANCELLED: "CANCELLED";
787
+ IDLE: "IDLE";
788
+ ACTIVE: "ACTIVE";
789
+ COMPLETED: "COMPLETED";
790
+ FAILED: "FAILED";
791
+ }>;
792
+ error: z.ZodOptional<z.ZodString>;
793
+ createdAt: z.ZodString;
794
+ updatedAt: z.ZodString;
795
+ orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
796
+ id: z.ZodUUID;
797
+ connector: z.ZodEnum<{
798
+ hyperliquid: "hyperliquid";
799
+ binance: "binance";
800
+ bybit: "bybit";
801
+ okx: "okx";
802
+ lighter: "lighter";
803
+ }>;
804
+ status: z.ZodEnum<{
805
+ PENDING: "PENDING";
806
+ PARTIAL: "PARTIAL";
807
+ FILLED: "FILLED";
808
+ CANCELLED: "CANCELLED";
809
+ REJECTED: "REJECTED";
810
+ }>;
811
+ error: z.ZodOptional<z.ZodString>;
812
+ createdAt: z.ZodString;
813
+ updatedAt: z.ZodString;
814
+ type: z.ZodLiteral<"MARKET">;
815
+ symbol: z.ZodString;
816
+ side: z.ZodEnum<{
817
+ BUY: "BUY";
818
+ SELL: "SELL";
819
+ }>;
820
+ reduceOnly: z.ZodBoolean;
821
+ leverage: z.ZodInt;
822
+ quantity: z.ZodString;
823
+ price: z.ZodString;
824
+ filledQuantity: z.ZodString;
825
+ filledPrice: z.ZodOptional<z.ZodString>;
826
+ }, z.core.$strip>], "type">>>;
827
+ intent: z.ZodLiteral<"REVERSE">;
828
+ orderType: z.ZodLiteral<"MARKET">;
829
+ position: z.ZodObject<{
830
+ id: z.ZodUUID;
831
+ exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
832
+ }, z.core.$strip>;
662
833
  }, z.core.$strip>], "intent">], "orderType">;
663
834
  }, z.core.$strip>;
664
835
  export type CreateTradeCloseResponse = z.output<typeof CreateTradeCloseResponse>;
836
+ export declare const CreateTradeReverseResponse: z.ZodObject<{
837
+ execution: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
838
+ id: z.ZodUUID;
839
+ connector: z.ZodEnum<{
840
+ hyperliquid: "hyperliquid";
841
+ binance: "binance";
842
+ bybit: "bybit";
843
+ okx: "okx";
844
+ lighter: "lighter";
845
+ }>;
846
+ status: z.ZodEnum<{
847
+ CANCELLED: "CANCELLED";
848
+ IDLE: "IDLE";
849
+ ACTIVE: "ACTIVE";
850
+ COMPLETED: "COMPLETED";
851
+ FAILED: "FAILED";
852
+ }>;
853
+ error: z.ZodOptional<z.ZodString>;
854
+ createdAt: z.ZodString;
855
+ updatedAt: z.ZodString;
856
+ orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
857
+ id: z.ZodUUID;
858
+ connector: z.ZodEnum<{
859
+ hyperliquid: "hyperliquid";
860
+ binance: "binance";
861
+ bybit: "bybit";
862
+ okx: "okx";
863
+ lighter: "lighter";
864
+ }>;
865
+ status: z.ZodEnum<{
866
+ PENDING: "PENDING";
867
+ PARTIAL: "PARTIAL";
868
+ FILLED: "FILLED";
869
+ CANCELLED: "CANCELLED";
870
+ REJECTED: "REJECTED";
871
+ }>;
872
+ error: z.ZodOptional<z.ZodString>;
873
+ createdAt: z.ZodString;
874
+ updatedAt: z.ZodString;
875
+ type: z.ZodLiteral<"MARKET">;
876
+ symbol: z.ZodString;
877
+ side: z.ZodEnum<{
878
+ BUY: "BUY";
879
+ SELL: "SELL";
880
+ }>;
881
+ reduceOnly: z.ZodBoolean;
882
+ leverage: z.ZodInt;
883
+ quantity: z.ZodString;
884
+ price: z.ZodString;
885
+ filledQuantity: z.ZodString;
886
+ filledPrice: z.ZodOptional<z.ZodString>;
887
+ }, z.core.$strip>], "type">>>;
888
+ intent: z.ZodLiteral<"OPEN">;
889
+ orderType: z.ZodLiteral<"MARKET">;
890
+ legs: z.ZodTuple<[z.ZodObject<{
891
+ symbol: z.ZodString;
892
+ side: z.ZodEnum<{
893
+ BUY: "BUY";
894
+ SELL: "SELL";
895
+ }>;
896
+ mode: z.ZodEnum<{
897
+ QUANTITY: "QUANTITY";
898
+ USD: "USD";
899
+ }>;
900
+ amount: z.ZodString;
901
+ reduceOnly: z.ZodBoolean;
902
+ }, z.core.$strip>], z.ZodObject<{
903
+ symbol: z.ZodString;
904
+ side: z.ZodEnum<{
905
+ BUY: "BUY";
906
+ SELL: "SELL";
907
+ }>;
908
+ mode: z.ZodEnum<{
909
+ QUANTITY: "QUANTITY";
910
+ USD: "USD";
911
+ }>;
912
+ amount: z.ZodString;
913
+ reduceOnly: z.ZodBoolean;
914
+ }, z.core.$strip>>;
915
+ }, z.core.$strip>, z.ZodObject<{
916
+ id: z.ZodUUID;
917
+ connector: z.ZodEnum<{
918
+ hyperliquid: "hyperliquid";
919
+ binance: "binance";
920
+ bybit: "bybit";
921
+ okx: "okx";
922
+ lighter: "lighter";
923
+ }>;
924
+ status: z.ZodEnum<{
925
+ CANCELLED: "CANCELLED";
926
+ IDLE: "IDLE";
927
+ ACTIVE: "ACTIVE";
928
+ COMPLETED: "COMPLETED";
929
+ FAILED: "FAILED";
930
+ }>;
931
+ error: z.ZodOptional<z.ZodString>;
932
+ createdAt: z.ZodString;
933
+ updatedAt: z.ZodString;
934
+ orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
935
+ id: z.ZodUUID;
936
+ connector: z.ZodEnum<{
937
+ hyperliquid: "hyperliquid";
938
+ binance: "binance";
939
+ bybit: "bybit";
940
+ okx: "okx";
941
+ lighter: "lighter";
942
+ }>;
943
+ status: z.ZodEnum<{
944
+ PENDING: "PENDING";
945
+ PARTIAL: "PARTIAL";
946
+ FILLED: "FILLED";
947
+ CANCELLED: "CANCELLED";
948
+ REJECTED: "REJECTED";
949
+ }>;
950
+ error: z.ZodOptional<z.ZodString>;
951
+ createdAt: z.ZodString;
952
+ updatedAt: z.ZodString;
953
+ type: z.ZodLiteral<"MARKET">;
954
+ symbol: z.ZodString;
955
+ side: z.ZodEnum<{
956
+ BUY: "BUY";
957
+ SELL: "SELL";
958
+ }>;
959
+ reduceOnly: z.ZodBoolean;
960
+ leverage: z.ZodInt;
961
+ quantity: z.ZodString;
962
+ price: z.ZodString;
963
+ filledQuantity: z.ZodString;
964
+ filledPrice: z.ZodOptional<z.ZodString>;
965
+ }, z.core.$strip>], "type">>>;
966
+ intent: z.ZodLiteral<"ADJUST">;
967
+ orderType: z.ZodLiteral<"MARKET">;
968
+ position: z.ZodObject<{
969
+ id: z.ZodUUID;
970
+ exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
971
+ }, z.core.$strip>;
972
+ legs: z.ZodTuple<[z.ZodObject<{
973
+ symbol: z.ZodString;
974
+ side: z.ZodEnum<{
975
+ BUY: "BUY";
976
+ SELL: "SELL";
977
+ }>;
978
+ mode: z.ZodEnum<{
979
+ QUANTITY: "QUANTITY";
980
+ USD: "USD";
981
+ }>;
982
+ amount: z.ZodString;
983
+ reduceOnly: z.ZodBoolean;
984
+ }, z.core.$strip>], z.ZodObject<{
985
+ symbol: z.ZodString;
986
+ side: z.ZodEnum<{
987
+ BUY: "BUY";
988
+ SELL: "SELL";
989
+ }>;
990
+ mode: z.ZodEnum<{
991
+ QUANTITY: "QUANTITY";
992
+ USD: "USD";
993
+ }>;
994
+ amount: z.ZodString;
995
+ reduceOnly: z.ZodBoolean;
996
+ }, z.core.$strip>>;
997
+ }, z.core.$strip>, z.ZodObject<{
998
+ id: z.ZodUUID;
999
+ connector: z.ZodEnum<{
1000
+ hyperliquid: "hyperliquid";
1001
+ binance: "binance";
1002
+ bybit: "bybit";
1003
+ okx: "okx";
1004
+ lighter: "lighter";
1005
+ }>;
1006
+ status: z.ZodEnum<{
1007
+ CANCELLED: "CANCELLED";
1008
+ IDLE: "IDLE";
1009
+ ACTIVE: "ACTIVE";
1010
+ COMPLETED: "COMPLETED";
1011
+ FAILED: "FAILED";
1012
+ }>;
1013
+ error: z.ZodOptional<z.ZodString>;
1014
+ createdAt: z.ZodString;
1015
+ updatedAt: z.ZodString;
1016
+ orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1017
+ id: z.ZodUUID;
1018
+ connector: z.ZodEnum<{
1019
+ hyperliquid: "hyperliquid";
1020
+ binance: "binance";
1021
+ bybit: "bybit";
1022
+ okx: "okx";
1023
+ lighter: "lighter";
1024
+ }>;
1025
+ status: z.ZodEnum<{
1026
+ PENDING: "PENDING";
1027
+ PARTIAL: "PARTIAL";
1028
+ FILLED: "FILLED";
1029
+ CANCELLED: "CANCELLED";
1030
+ REJECTED: "REJECTED";
1031
+ }>;
1032
+ error: z.ZodOptional<z.ZodString>;
1033
+ createdAt: z.ZodString;
1034
+ updatedAt: z.ZodString;
1035
+ type: z.ZodLiteral<"MARKET">;
1036
+ symbol: z.ZodString;
1037
+ side: z.ZodEnum<{
1038
+ BUY: "BUY";
1039
+ SELL: "SELL";
1040
+ }>;
1041
+ reduceOnly: z.ZodBoolean;
1042
+ leverage: z.ZodInt;
1043
+ quantity: z.ZodString;
1044
+ price: z.ZodString;
1045
+ filledQuantity: z.ZodString;
1046
+ filledPrice: z.ZodOptional<z.ZodString>;
1047
+ }, z.core.$strip>], "type">>>;
1048
+ intent: z.ZodLiteral<"CLOSE">;
1049
+ orderType: z.ZodLiteral<"MARKET">;
1050
+ position: z.ZodObject<{
1051
+ id: z.ZodUUID;
1052
+ exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
1053
+ }, z.core.$strip>;
1054
+ }, z.core.$strip>, z.ZodObject<{
1055
+ id: z.ZodUUID;
1056
+ connector: z.ZodEnum<{
1057
+ hyperliquid: "hyperliquid";
1058
+ binance: "binance";
1059
+ bybit: "bybit";
1060
+ okx: "okx";
1061
+ lighter: "lighter";
1062
+ }>;
1063
+ status: z.ZodEnum<{
1064
+ CANCELLED: "CANCELLED";
1065
+ IDLE: "IDLE";
1066
+ ACTIVE: "ACTIVE";
1067
+ COMPLETED: "COMPLETED";
1068
+ FAILED: "FAILED";
1069
+ }>;
1070
+ error: z.ZodOptional<z.ZodString>;
1071
+ createdAt: z.ZodString;
1072
+ updatedAt: z.ZodString;
1073
+ orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1074
+ id: z.ZodUUID;
1075
+ connector: z.ZodEnum<{
1076
+ hyperliquid: "hyperliquid";
1077
+ binance: "binance";
1078
+ bybit: "bybit";
1079
+ okx: "okx";
1080
+ lighter: "lighter";
1081
+ }>;
1082
+ status: z.ZodEnum<{
1083
+ PENDING: "PENDING";
1084
+ PARTIAL: "PARTIAL";
1085
+ FILLED: "FILLED";
1086
+ CANCELLED: "CANCELLED";
1087
+ REJECTED: "REJECTED";
1088
+ }>;
1089
+ error: z.ZodOptional<z.ZodString>;
1090
+ createdAt: z.ZodString;
1091
+ updatedAt: z.ZodString;
1092
+ type: z.ZodLiteral<"MARKET">;
1093
+ symbol: z.ZodString;
1094
+ side: z.ZodEnum<{
1095
+ BUY: "BUY";
1096
+ SELL: "SELL";
1097
+ }>;
1098
+ reduceOnly: z.ZodBoolean;
1099
+ leverage: z.ZodInt;
1100
+ quantity: z.ZodString;
1101
+ price: z.ZodString;
1102
+ filledQuantity: z.ZodString;
1103
+ filledPrice: z.ZodOptional<z.ZodString>;
1104
+ }, z.core.$strip>], "type">>>;
1105
+ intent: z.ZodLiteral<"REVERSE">;
1106
+ orderType: z.ZodLiteral<"MARKET">;
1107
+ position: z.ZodObject<{
1108
+ id: z.ZodUUID;
1109
+ exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
1110
+ }, z.core.$strip>;
1111
+ }, z.core.$strip>], "intent">], "orderType">;
1112
+ }, z.core.$strip>;
1113
+ export type CreateTradeReverseResponse = z.output<typeof CreateTradeReverseResponse>;
665
1114
  export declare const CreateTradeCloseAllResponse: z.ZodObject<{
666
1115
  executions: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
667
1116
  id: z.ZodUUID;
@@ -880,6 +1329,63 @@ export declare const CreateTradeCloseAllResponse: z.ZodObject<{
880
1329
  id: z.ZodUUID;
881
1330
  exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
882
1331
  }, z.core.$strip>;
1332
+ }, z.core.$strip>, z.ZodObject<{
1333
+ id: z.ZodUUID;
1334
+ connector: z.ZodEnum<{
1335
+ hyperliquid: "hyperliquid";
1336
+ binance: "binance";
1337
+ bybit: "bybit";
1338
+ okx: "okx";
1339
+ lighter: "lighter";
1340
+ }>;
1341
+ status: z.ZodEnum<{
1342
+ CANCELLED: "CANCELLED";
1343
+ IDLE: "IDLE";
1344
+ ACTIVE: "ACTIVE";
1345
+ COMPLETED: "COMPLETED";
1346
+ FAILED: "FAILED";
1347
+ }>;
1348
+ error: z.ZodOptional<z.ZodString>;
1349
+ createdAt: z.ZodString;
1350
+ updatedAt: z.ZodString;
1351
+ orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1352
+ id: z.ZodUUID;
1353
+ connector: z.ZodEnum<{
1354
+ hyperliquid: "hyperliquid";
1355
+ binance: "binance";
1356
+ bybit: "bybit";
1357
+ okx: "okx";
1358
+ lighter: "lighter";
1359
+ }>;
1360
+ status: z.ZodEnum<{
1361
+ PENDING: "PENDING";
1362
+ PARTIAL: "PARTIAL";
1363
+ FILLED: "FILLED";
1364
+ CANCELLED: "CANCELLED";
1365
+ REJECTED: "REJECTED";
1366
+ }>;
1367
+ error: z.ZodOptional<z.ZodString>;
1368
+ createdAt: z.ZodString;
1369
+ updatedAt: z.ZodString;
1370
+ type: z.ZodLiteral<"MARKET">;
1371
+ symbol: z.ZodString;
1372
+ side: z.ZodEnum<{
1373
+ BUY: "BUY";
1374
+ SELL: "SELL";
1375
+ }>;
1376
+ reduceOnly: z.ZodBoolean;
1377
+ leverage: z.ZodInt;
1378
+ quantity: z.ZodString;
1379
+ price: z.ZodString;
1380
+ filledQuantity: z.ZodString;
1381
+ filledPrice: z.ZodOptional<z.ZodString>;
1382
+ }, z.core.$strip>], "type">>>;
1383
+ intent: z.ZodLiteral<"REVERSE">;
1384
+ orderType: z.ZodLiteral<"MARKET">;
1385
+ position: z.ZodObject<{
1386
+ id: z.ZodUUID;
1387
+ exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
1388
+ }, z.core.$strip>;
883
1389
  }, z.core.$strip>], "intent">], "orderType">>;
884
1390
  }, z.core.$strip>;
885
1391
  export type CreateTradeCloseAllResponse = z.output<typeof CreateTradeCloseAllResponse>;
@@ -4,6 +4,7 @@ import { Execution } from '../execution/entities';
4
4
  const CreateTradeOpenResponse = z.object({ execution: Execution });
5
5
  const CreateTradeAdjustResponse = z.object({ execution: Execution });
6
6
  const CreateTradeCloseResponse = z.object({ execution: Execution });
7
+ const CreateTradeReverseResponse = z.object({ execution: Execution });
7
8
  const CreateTradeCloseAllResponse = z.object({ executions: z.array(Execution) });
8
9
 
9
- export { CreateTradeAdjustResponse, CreateTradeCloseAllResponse, CreateTradeCloseResponse, CreateTradeOpenResponse };
10
+ export { CreateTradeAdjustResponse, CreateTradeCloseAllResponse, CreateTradeCloseResponse, CreateTradeOpenResponse, CreateTradeReverseResponse };
@@ -15,6 +15,7 @@ export declare const TriggerCancelledReason: z.ZodEnum<{
15
15
  POSITION_CLOSED: "POSITION_CLOSED";
16
16
  SYSTEM: "SYSTEM";
17
17
  POSITION_NETTED: "POSITION_NETTED";
18
+ POSITION_REVERSED: "POSITION_REVERSED";
18
19
  }>;
19
20
  export type TriggerCancelledReason = z.infer<typeof TriggerCancelledReason>;
20
21
  export declare const BracketType: z.ZodEnum<{
@@ -2,7 +2,13 @@ import { z } from 'zod';
2
2
 
3
3
  const TriggerIntent = z.enum(["OPEN", "CLOSE"]);
4
4
  const TriggerStatus = z.enum(["ACTIVE", "TRIGGERED", "CANCELLED"]);
5
- const TriggerCancelledReason = z.enum(["POSITION_CLOSED", "USER", "SYSTEM", "POSITION_NETTED"]);
5
+ const TriggerCancelledReason = z.enum([
6
+ "POSITION_CLOSED",
7
+ "USER",
8
+ "SYSTEM",
9
+ "POSITION_NETTED",
10
+ "POSITION_REVERSED"
11
+ ]);
6
12
  const BracketType = z.enum(["STOP_LOSS", "TAKE_PROFIT", "NONE"]);
7
13
  const MetricTrack = z.enum(["PEAK", "TROUGH"]);
8
14
  const TpSlBracketType = z.enum(["TAKE_PROFIT", "STOP_LOSS"]);