@pear-protocol/types 1.2.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.
@@ -3,6 +3,7 @@ export declare const ExecutionIntent: z.ZodEnum<{
3
3
  OPEN: "OPEN";
4
4
  CLOSE: "CLOSE";
5
5
  ADJUST: "ADJUST";
6
+ REVERSE: "REVERSE";
6
7
  }>;
7
8
  export type ExecutionIntent = z.infer<typeof ExecutionIntent>;
8
9
  export declare const ExecutionOrderType: z.ZodEnum<{
@@ -48,6 +49,7 @@ export declare const BaseExecution: z.ZodObject<{
48
49
  OPEN: "OPEN";
49
50
  CLOSE: "CLOSE";
50
51
  ADJUST: "ADJUST";
52
+ REVERSE: "REVERSE";
51
53
  }>;
52
54
  orderType: z.ZodEnum<{
53
55
  MARKET: "MARKET";
@@ -315,6 +317,64 @@ export declare const MarketCloseExecution: z.ZodObject<{
315
317
  exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
316
318
  }, z.core.$strip>;
317
319
  }, z.core.$strip>;
320
+ export declare const MarketReverseExecution: z.ZodObject<{
321
+ id: z.ZodUUID;
322
+ connector: z.ZodEnum<{
323
+ hyperliquid: "hyperliquid";
324
+ binance: "binance";
325
+ bybit: "bybit";
326
+ okx: "okx";
327
+ lighter: "lighter";
328
+ }>;
329
+ status: z.ZodEnum<{
330
+ CANCELLED: "CANCELLED";
331
+ IDLE: "IDLE";
332
+ ACTIVE: "ACTIVE";
333
+ COMPLETED: "COMPLETED";
334
+ FAILED: "FAILED";
335
+ }>;
336
+ error: z.ZodOptional<z.ZodString>;
337
+ createdAt: z.ZodString;
338
+ updatedAt: z.ZodString;
339
+ orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
340
+ id: z.ZodUUID;
341
+ connector: z.ZodEnum<{
342
+ hyperliquid: "hyperliquid";
343
+ binance: "binance";
344
+ bybit: "bybit";
345
+ okx: "okx";
346
+ lighter: "lighter";
347
+ }>;
348
+ status: z.ZodEnum<{
349
+ PENDING: "PENDING";
350
+ PARTIAL: "PARTIAL";
351
+ FILLED: "FILLED";
352
+ CANCELLED: "CANCELLED";
353
+ REJECTED: "REJECTED";
354
+ }>;
355
+ error: z.ZodOptional<z.ZodString>;
356
+ createdAt: z.ZodString;
357
+ updatedAt: z.ZodString;
358
+ type: z.ZodLiteral<"MARKET">;
359
+ symbol: z.ZodString;
360
+ side: z.ZodEnum<{
361
+ BUY: "BUY";
362
+ SELL: "SELL";
363
+ }>;
364
+ reduceOnly: z.ZodBoolean;
365
+ leverage: z.ZodInt;
366
+ quantity: z.ZodString;
367
+ price: z.ZodString;
368
+ filledQuantity: z.ZodString;
369
+ filledPrice: z.ZodOptional<z.ZodString>;
370
+ }, z.core.$strip>], "type">>>;
371
+ intent: z.ZodLiteral<"REVERSE">;
372
+ orderType: z.ZodLiteral<"MARKET">;
373
+ position: z.ZodObject<{
374
+ id: z.ZodUUID;
375
+ exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
376
+ }, z.core.$strip>;
377
+ }, z.core.$strip>;
318
378
  export declare const MarketExecution: z.ZodDiscriminatedUnion<[z.ZodObject<{
319
379
  id: z.ZodUUID;
320
380
  connector: z.ZodEnum<{
@@ -532,6 +592,63 @@ export declare const MarketExecution: z.ZodDiscriminatedUnion<[z.ZodObject<{
532
592
  id: z.ZodUUID;
533
593
  exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
534
594
  }, z.core.$strip>;
595
+ }, z.core.$strip>, z.ZodObject<{
596
+ id: z.ZodUUID;
597
+ connector: z.ZodEnum<{
598
+ hyperliquid: "hyperliquid";
599
+ binance: "binance";
600
+ bybit: "bybit";
601
+ okx: "okx";
602
+ lighter: "lighter";
603
+ }>;
604
+ status: z.ZodEnum<{
605
+ CANCELLED: "CANCELLED";
606
+ IDLE: "IDLE";
607
+ ACTIVE: "ACTIVE";
608
+ COMPLETED: "COMPLETED";
609
+ FAILED: "FAILED";
610
+ }>;
611
+ error: z.ZodOptional<z.ZodString>;
612
+ createdAt: z.ZodString;
613
+ updatedAt: z.ZodString;
614
+ orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
615
+ id: z.ZodUUID;
616
+ connector: z.ZodEnum<{
617
+ hyperliquid: "hyperliquid";
618
+ binance: "binance";
619
+ bybit: "bybit";
620
+ okx: "okx";
621
+ lighter: "lighter";
622
+ }>;
623
+ status: z.ZodEnum<{
624
+ PENDING: "PENDING";
625
+ PARTIAL: "PARTIAL";
626
+ FILLED: "FILLED";
627
+ CANCELLED: "CANCELLED";
628
+ REJECTED: "REJECTED";
629
+ }>;
630
+ error: z.ZodOptional<z.ZodString>;
631
+ createdAt: z.ZodString;
632
+ updatedAt: z.ZodString;
633
+ type: z.ZodLiteral<"MARKET">;
634
+ symbol: z.ZodString;
635
+ side: z.ZodEnum<{
636
+ BUY: "BUY";
637
+ SELL: "SELL";
638
+ }>;
639
+ reduceOnly: z.ZodBoolean;
640
+ leverage: z.ZodInt;
641
+ quantity: z.ZodString;
642
+ price: z.ZodString;
643
+ filledQuantity: z.ZodString;
644
+ filledPrice: z.ZodOptional<z.ZodString>;
645
+ }, z.core.$strip>], "type">>>;
646
+ intent: z.ZodLiteral<"REVERSE">;
647
+ orderType: z.ZodLiteral<"MARKET">;
648
+ position: z.ZodObject<{
649
+ id: z.ZodUUID;
650
+ exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
651
+ }, z.core.$strip>;
535
652
  }, z.core.$strip>], "intent">;
536
653
  export declare const Execution: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
537
654
  id: z.ZodUUID;
@@ -750,12 +867,70 @@ export declare const Execution: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion
750
867
  id: z.ZodUUID;
751
868
  exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
752
869
  }, z.core.$strip>;
870
+ }, z.core.$strip>, z.ZodObject<{
871
+ id: z.ZodUUID;
872
+ connector: z.ZodEnum<{
873
+ hyperliquid: "hyperliquid";
874
+ binance: "binance";
875
+ bybit: "bybit";
876
+ okx: "okx";
877
+ lighter: "lighter";
878
+ }>;
879
+ status: z.ZodEnum<{
880
+ CANCELLED: "CANCELLED";
881
+ IDLE: "IDLE";
882
+ ACTIVE: "ACTIVE";
883
+ COMPLETED: "COMPLETED";
884
+ FAILED: "FAILED";
885
+ }>;
886
+ error: z.ZodOptional<z.ZodString>;
887
+ createdAt: z.ZodString;
888
+ updatedAt: z.ZodString;
889
+ orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
890
+ id: z.ZodUUID;
891
+ connector: z.ZodEnum<{
892
+ hyperliquid: "hyperliquid";
893
+ binance: "binance";
894
+ bybit: "bybit";
895
+ okx: "okx";
896
+ lighter: "lighter";
897
+ }>;
898
+ status: z.ZodEnum<{
899
+ PENDING: "PENDING";
900
+ PARTIAL: "PARTIAL";
901
+ FILLED: "FILLED";
902
+ CANCELLED: "CANCELLED";
903
+ REJECTED: "REJECTED";
904
+ }>;
905
+ error: z.ZodOptional<z.ZodString>;
906
+ createdAt: z.ZodString;
907
+ updatedAt: z.ZodString;
908
+ type: z.ZodLiteral<"MARKET">;
909
+ symbol: z.ZodString;
910
+ side: z.ZodEnum<{
911
+ BUY: "BUY";
912
+ SELL: "SELL";
913
+ }>;
914
+ reduceOnly: z.ZodBoolean;
915
+ leverage: z.ZodInt;
916
+ quantity: z.ZodString;
917
+ price: z.ZodString;
918
+ filledQuantity: z.ZodString;
919
+ filledPrice: z.ZodOptional<z.ZodString>;
920
+ }, z.core.$strip>], "type">>>;
921
+ intent: z.ZodLiteral<"REVERSE">;
922
+ orderType: z.ZodLiteral<"MARKET">;
923
+ position: z.ZodObject<{
924
+ id: z.ZodUUID;
925
+ exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
926
+ }, z.core.$strip>;
753
927
  }, z.core.$strip>], "intent">], "orderType">;
754
928
  export type ExecutionLeg = z.infer<typeof ExecutionLeg>;
755
929
  export type BaseExecution = z.output<typeof BaseExecution>;
756
930
  export type MarketOpenExecution = z.output<typeof MarketOpenExecution>;
757
931
  export type MarketAdjustExecution = z.output<typeof MarketAdjustExecution>;
758
932
  export type MarketCloseExecution = z.output<typeof MarketCloseExecution>;
933
+ export type MarketReverseExecution = z.output<typeof MarketReverseExecution>;
759
934
  export type MarketExecution = z.output<typeof MarketExecution>;
760
935
  export type Execution = z.output<typeof Execution>;
761
936
  export {};
@@ -5,7 +5,7 @@ import { InstrumentId } from '../instrument';
5
5
  import { Order } from '../order';
6
6
  import { Position } from '../position';
7
7
 
8
- const ExecutionIntent = z.enum(["OPEN", "CLOSE", "ADJUST"]);
8
+ const ExecutionIntent = z.enum(["OPEN", "CLOSE", "ADJUST", "REVERSE"]);
9
9
  const ExecutionOrderType = z.enum(["MARKET"]);
10
10
  const ExecutionStatus = z.enum(["IDLE", "ACTIVE", "COMPLETED", "FAILED", "CANCELLED"]);
11
11
  const ExecutionLegMode = z.enum(["QUANTITY", "USD"]);
@@ -115,11 +115,26 @@ const MarketCloseExecution = BaseExecution.extend({
115
115
  */
116
116
  position: Position.pick({ id: true, exposure: true })
117
117
  });
118
+ const MarketReverseExecution = BaseExecution.extend({
119
+ /**
120
+ * Intent
121
+ */
122
+ intent: z.literal("REVERSE"),
123
+ /**
124
+ * Order type
125
+ */
126
+ orderType: z.literal("MARKET"),
127
+ /**
128
+ * Position
129
+ */
130
+ position: Position.pick({ id: true, exposure: true })
131
+ });
118
132
  const MarketExecution = z.discriminatedUnion("intent", [
119
133
  MarketOpenExecution,
120
134
  MarketAdjustExecution,
121
- MarketCloseExecution
135
+ MarketCloseExecution,
136
+ MarketReverseExecution
122
137
  ]);
123
138
  const Execution = z.discriminatedUnion("orderType", [MarketExecution]);
124
139
 
125
- export { BaseExecution, Execution, ExecutionIntent, ExecutionLegMode, ExecutionOrderType, ExecutionStatus, MarketAdjustExecution, MarketCloseExecution, MarketExecution, MarketOpenExecution };
140
+ export { BaseExecution, Execution, ExecutionIntent, ExecutionLegMode, ExecutionOrderType, ExecutionStatus, MarketAdjustExecution, MarketCloseExecution, MarketExecution, MarketOpenExecution, MarketReverseExecution };
@@ -219,6 +219,63 @@ export declare const ExecutionListResponse: z.ZodObject<{
219
219
  id: z.ZodUUID;
220
220
  exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
221
221
  }, z.core.$strip>;
222
+ }, z.core.$strip>, z.ZodObject<{
223
+ id: z.ZodUUID;
224
+ connector: z.ZodEnum<{
225
+ hyperliquid: "hyperliquid";
226
+ binance: "binance";
227
+ bybit: "bybit";
228
+ okx: "okx";
229
+ lighter: "lighter";
230
+ }>;
231
+ status: z.ZodEnum<{
232
+ CANCELLED: "CANCELLED";
233
+ IDLE: "IDLE";
234
+ ACTIVE: "ACTIVE";
235
+ COMPLETED: "COMPLETED";
236
+ FAILED: "FAILED";
237
+ }>;
238
+ error: z.ZodOptional<z.ZodString>;
239
+ createdAt: z.ZodString;
240
+ updatedAt: z.ZodString;
241
+ orders: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
242
+ id: z.ZodUUID;
243
+ connector: z.ZodEnum<{
244
+ hyperliquid: "hyperliquid";
245
+ binance: "binance";
246
+ bybit: "bybit";
247
+ okx: "okx";
248
+ lighter: "lighter";
249
+ }>;
250
+ status: z.ZodEnum<{
251
+ PENDING: "PENDING";
252
+ PARTIAL: "PARTIAL";
253
+ FILLED: "FILLED";
254
+ CANCELLED: "CANCELLED";
255
+ REJECTED: "REJECTED";
256
+ }>;
257
+ error: z.ZodOptional<z.ZodString>;
258
+ createdAt: z.ZodString;
259
+ updatedAt: z.ZodString;
260
+ type: z.ZodLiteral<"MARKET">;
261
+ symbol: z.ZodString;
262
+ side: z.ZodEnum<{
263
+ BUY: "BUY";
264
+ SELL: "SELL";
265
+ }>;
266
+ reduceOnly: z.ZodBoolean;
267
+ leverage: z.ZodInt;
268
+ quantity: z.ZodString;
269
+ price: z.ZodString;
270
+ filledQuantity: z.ZodString;
271
+ filledPrice: z.ZodOptional<z.ZodString>;
272
+ }, z.core.$strip>], "type">>>;
273
+ intent: z.ZodLiteral<"REVERSE">;
274
+ orderType: z.ZodLiteral<"MARKET">;
275
+ position: z.ZodObject<{
276
+ id: z.ZodUUID;
277
+ exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
278
+ }, z.core.$strip>;
222
279
  }, z.core.$strip>], "intent">], "orderType">>;
223
280
  }, z.core.$strip>;
224
281
  export type ExecutionListResponse = z.output<typeof ExecutionListResponse>;
@@ -30,6 +30,7 @@ export declare const ScheduleCancelledReason: z.ZodEnum<{
30
30
  POSITION_CLOSED: "POSITION_CLOSED";
31
31
  SYSTEM: "SYSTEM";
32
32
  POSITION_NETTED: "POSITION_NETTED";
33
+ POSITION_REVERSED: "POSITION_REVERSED";
33
34
  }>;
34
35
  export type ScheduleCancelledReason = z.infer<typeof ScheduleCancelledReason>;
35
36
  declare const TWAPSliceOpenLeg: z.ZodObject<{
@@ -84,6 +85,7 @@ declare const BaseSchedule: z.ZodObject<{
84
85
  POSITION_CLOSED: "POSITION_CLOSED";
85
86
  SYSTEM: "SYSTEM";
86
87
  POSITION_NETTED: "POSITION_NETTED";
88
+ POSITION_REVERSED: "POSITION_REVERSED";
87
89
  }>>;
88
90
  createdAt: z.ZodString;
89
91
  updatedAt: z.ZodString;
@@ -152,6 +154,7 @@ export declare const TWAPOpen: z.ZodObject<{
152
154
  POSITION_CLOSED: "POSITION_CLOSED";
153
155
  SYSTEM: "SYSTEM";
154
156
  POSITION_NETTED: "POSITION_NETTED";
157
+ POSITION_REVERSED: "POSITION_REVERSED";
155
158
  }>>;
156
159
  createdAt: z.ZodString;
157
160
  updatedAt: z.ZodString;
@@ -237,6 +240,7 @@ export declare const TWAPClose: z.ZodObject<{
237
240
  POSITION_CLOSED: "POSITION_CLOSED";
238
241
  SYSTEM: "SYSTEM";
239
242
  POSITION_NETTED: "POSITION_NETTED";
243
+ POSITION_REVERSED: "POSITION_REVERSED";
240
244
  }>>;
241
245
  createdAt: z.ZodString;
242
246
  updatedAt: z.ZodString;
@@ -314,6 +318,7 @@ export declare const Schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
314
318
  POSITION_CLOSED: "POSITION_CLOSED";
315
319
  SYSTEM: "SYSTEM";
316
320
  POSITION_NETTED: "POSITION_NETTED";
321
+ POSITION_REVERSED: "POSITION_REVERSED";
317
322
  }>>;
318
323
  createdAt: z.ZodString;
319
324
  updatedAt: z.ZodString;
@@ -398,6 +403,7 @@ export declare const Schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
398
403
  POSITION_CLOSED: "POSITION_CLOSED";
399
404
  SYSTEM: "SYSTEM";
400
405
  POSITION_NETTED: "POSITION_NETTED";
406
+ POSITION_REVERSED: "POSITION_REVERSED";
401
407
  }>>;
402
408
  createdAt: z.ZodString;
403
409
  updatedAt: z.ZodString;
@@ -9,7 +9,13 @@ const ScheduleStatus = z.enum(["ACTIVE", "COMPLETED", "FAILED", "CANCELLED"]);
9
9
  const ScheduleIntent = z.enum(["OPEN", "CLOSE"]);
10
10
  const ScheduleExecutionType = z.enum(["MARKET"]);
11
11
  const ScheduleSliceMode = z.enum(["QUANTITY", "USD"]);
12
- const ScheduleCancelledReason = z.enum(["POSITION_CLOSED", "USER", "SYSTEM", "POSITION_NETTED"]);
12
+ const ScheduleCancelledReason = z.enum([
13
+ "POSITION_CLOSED",
14
+ "USER",
15
+ "SYSTEM",
16
+ "POSITION_NETTED",
17
+ "POSITION_REVERSED"
18
+ ]);
13
19
  const TWAPSliceOpenLeg = z.object({
14
20
  /**
15
21
  * Instrument ID
@@ -30,6 +30,7 @@ export declare const ScheduleListResponse: z.ZodObject<{
30
30
  POSITION_CLOSED: "POSITION_CLOSED";
31
31
  SYSTEM: "SYSTEM";
32
32
  POSITION_NETTED: "POSITION_NETTED";
33
+ POSITION_REVERSED: "POSITION_REVERSED";
33
34
  }>>;
34
35
  createdAt: z.ZodString;
35
36
  updatedAt: z.ZodString;
@@ -114,6 +115,7 @@ export declare const ScheduleListResponse: z.ZodObject<{
114
115
  POSITION_CLOSED: "POSITION_CLOSED";
115
116
  SYSTEM: "SYSTEM";
116
117
  POSITION_NETTED: "POSITION_NETTED";
118
+ POSITION_REVERSED: "POSITION_REVERSED";
117
119
  }>>;
118
120
  createdAt: z.ZodString;
119
121
  updatedAt: z.ZodString;
@@ -194,6 +196,7 @@ export declare const CreateScheduleResponse: z.ZodObject<{
194
196
  POSITION_CLOSED: "POSITION_CLOSED";
195
197
  SYSTEM: "SYSTEM";
196
198
  POSITION_NETTED: "POSITION_NETTED";
199
+ POSITION_REVERSED: "POSITION_REVERSED";
197
200
  }>>;
198
201
  createdAt: z.ZodString;
199
202
  updatedAt: z.ZodString;
@@ -278,6 +281,7 @@ export declare const CreateScheduleResponse: z.ZodObject<{
278
281
  POSITION_CLOSED: "POSITION_CLOSED";
279
282
  SYSTEM: "SYSTEM";
280
283
  POSITION_NETTED: "POSITION_NETTED";
284
+ POSITION_REVERSED: "POSITION_REVERSED";
281
285
  }>>;
282
286
  createdAt: z.ZodString;
283
287
  updatedAt: z.ZodString;
@@ -117,6 +117,7 @@ export declare const TcaExecutionSummaryContextResponse: z.ZodObject<{
117
117
  OPEN: "OPEN";
118
118
  CLOSE: "CLOSE";
119
119
  ADJUST: "ADJUST";
120
+ REVERSE: "REVERSE";
120
121
  }>;
121
122
  orderType: z.ZodEnum<{
122
123
  MARKET: "MARKET";
@@ -157,6 +158,7 @@ export declare const TcaExecutionSummaryResponse: z.ZodObject<{
157
158
  OPEN: "OPEN";
158
159
  CLOSE: "CLOSE";
159
160
  ADJUST: "ADJUST";
161
+ REVERSE: "REVERSE";
160
162
  }>;
161
163
  orderType: z.ZodEnum<{
162
164
  MARKET: "MARKET";
@@ -210,6 +212,7 @@ export declare const TcaExecutionResponse: z.ZodObject<{
210
212
  OPEN: "OPEN";
211
213
  CLOSE: "CLOSE";
212
214
  ADJUST: "ADJUST";
215
+ REVERSE: "REVERSE";
213
216
  }>;
214
217
  orderType: z.ZodEnum<{
215
218
  MARKET: "MARKET";
@@ -427,6 +430,7 @@ export declare const TcaSummaryResponse: z.ZodObject<{
427
430
  OPEN: "OPEN";
428
431
  CLOSE: "CLOSE";
429
432
  ADJUST: "ADJUST";
433
+ REVERSE: "REVERSE";
430
434
  }>;
431
435
  orderType: z.ZodEnum<{
432
436
  MARKET: "MARKET";
@@ -131,6 +131,10 @@ export declare const CreateMarketClose: z.ZodObject<{
131
131
  type: z.ZodLiteral<"MARKET">;
132
132
  clientId: z.ZodOptional<z.ZodString>;
133
133
  }, z.core.$strip>;
134
+ export declare const CreateMarketReverse: z.ZodObject<{
135
+ type: z.ZodLiteral<"MARKET">;
136
+ clientId: z.ZodOptional<z.ZodString>;
137
+ }, z.core.$strip>;
134
138
  export declare const CreateMarketCloseAll: z.ZodObject<{
135
139
  type: z.ZodLiteral<"MARKET">;
136
140
  clientId: z.ZodOptional<z.ZodString>;
@@ -267,6 +271,10 @@ export declare const CreateTradeClose: z.ZodDiscriminatedUnion<[z.ZodObject<{
267
271
  type: z.ZodLiteral<"MARKET">;
268
272
  clientId: z.ZodOptional<z.ZodString>;
269
273
  }, z.core.$strip>], "type">;
274
+ export declare const CreateTradeReverse: z.ZodDiscriminatedUnion<[z.ZodObject<{
275
+ type: z.ZodLiteral<"MARKET">;
276
+ clientId: z.ZodOptional<z.ZodString>;
277
+ }, z.core.$strip>], "type">;
270
278
  export declare const CreateTradeCloseAll: z.ZodDiscriminatedUnion<[z.ZodObject<{
271
279
  type: z.ZodLiteral<"MARKET">;
272
280
  clientId: z.ZodOptional<z.ZodString>;
@@ -274,8 +282,10 @@ export declare const CreateTradeCloseAll: z.ZodDiscriminatedUnion<[z.ZodObject<{
274
282
  export type CreateMarketOpen = z.output<typeof CreateMarketOpen>;
275
283
  export type CreateMarketAdjust = z.output<typeof CreateMarketAdjust>;
276
284
  export type CreateMarketClose = z.output<typeof CreateMarketClose>;
285
+ export type CreateMarketReverse = z.output<typeof CreateMarketReverse>;
277
286
  export type CreateMarketCloseAll = z.output<typeof CreateMarketCloseAll>;
278
287
  export type CreateTradeOpen = z.output<typeof CreateTradeOpen>;
279
288
  export type CreateTradeAdjust = z.output<typeof CreateTradeAdjust>;
280
289
  export type CreateTradeClose = z.output<typeof CreateTradeClose>;
290
+ export type CreateTradeReverse = z.output<typeof CreateTradeReverse>;
281
291
  export type CreateTradeCloseAll = z.output<typeof CreateTradeCloseAll>;
@@ -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"]);
@@ -32,6 +32,7 @@ declare const BaseTrigger: z.ZodObject<{
32
32
  POSITION_CLOSED: "POSITION_CLOSED";
33
33
  SYSTEM: "SYSTEM";
34
34
  POSITION_NETTED: "POSITION_NETTED";
35
+ POSITION_REVERSED: "POSITION_REVERSED";
35
36
  }>>;
36
37
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
37
38
  id: z.ZodUUID;
@@ -109,6 +110,7 @@ export declare const TriggerMarketOpen: z.ZodObject<{
109
110
  POSITION_CLOSED: "POSITION_CLOSED";
110
111
  SYSTEM: "SYSTEM";
111
112
  POSITION_NETTED: "POSITION_NETTED";
113
+ POSITION_REVERSED: "POSITION_REVERSED";
112
114
  }>>;
113
115
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
114
116
  id: z.ZodUUID;
@@ -306,6 +308,7 @@ export declare const TriggerMarketAdjust: z.ZodObject<{
306
308
  POSITION_CLOSED: "POSITION_CLOSED";
307
309
  SYSTEM: "SYSTEM";
308
310
  POSITION_NETTED: "POSITION_NETTED";
311
+ POSITION_REVERSED: "POSITION_REVERSED";
309
312
  }>>;
310
313
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
311
314
  id: z.ZodUUID;
@@ -549,6 +552,7 @@ export declare const TriggerMarketClose: z.ZodObject<{
549
552
  POSITION_CLOSED: "POSITION_CLOSED";
550
553
  SYSTEM: "SYSTEM";
551
554
  POSITION_NETTED: "POSITION_NETTED";
555
+ POSITION_REVERSED: "POSITION_REVERSED";
552
556
  }>>;
553
557
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
554
558
  id: z.ZodUUID;
@@ -826,6 +830,7 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
826
830
  POSITION_CLOSED: "POSITION_CLOSED";
827
831
  SYSTEM: "SYSTEM";
828
832
  POSITION_NETTED: "POSITION_NETTED";
833
+ POSITION_REVERSED: "POSITION_REVERSED";
829
834
  }>>;
830
835
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
831
836
  id: z.ZodUUID;
@@ -1022,6 +1027,7 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1022
1027
  POSITION_CLOSED: "POSITION_CLOSED";
1023
1028
  SYSTEM: "SYSTEM";
1024
1029
  POSITION_NETTED: "POSITION_NETTED";
1030
+ POSITION_REVERSED: "POSITION_REVERSED";
1025
1031
  }>>;
1026
1032
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1027
1033
  id: z.ZodUUID;
@@ -1264,6 +1270,7 @@ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
1264
1270
  POSITION_CLOSED: "POSITION_CLOSED";
1265
1271
  SYSTEM: "SYSTEM";
1266
1272
  POSITION_NETTED: "POSITION_NETTED";
1273
+ POSITION_REVERSED: "POSITION_REVERSED";
1267
1274
  }>>;
1268
1275
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1269
1276
  id: z.ZodUUID;
@@ -1541,6 +1548,7 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1541
1548
  POSITION_CLOSED: "POSITION_CLOSED";
1542
1549
  SYSTEM: "SYSTEM";
1543
1550
  POSITION_NETTED: "POSITION_NETTED";
1551
+ POSITION_REVERSED: "POSITION_REVERSED";
1544
1552
  }>>;
1545
1553
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1546
1554
  id: z.ZodUUID;
@@ -1737,6 +1745,7 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1737
1745
  POSITION_CLOSED: "POSITION_CLOSED";
1738
1746
  SYSTEM: "SYSTEM";
1739
1747
  POSITION_NETTED: "POSITION_NETTED";
1748
+ POSITION_REVERSED: "POSITION_REVERSED";
1740
1749
  }>>;
1741
1750
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1742
1751
  id: z.ZodUUID;
@@ -1979,6 +1988,7 @@ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[
1979
1988
  POSITION_CLOSED: "POSITION_CLOSED";
1980
1989
  SYSTEM: "SYSTEM";
1981
1990
  POSITION_NETTED: "POSITION_NETTED";
1991
+ POSITION_REVERSED: "POSITION_REVERSED";
1982
1992
  }>>;
1983
1993
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1984
1994
  id: z.ZodUUID;
@@ -24,6 +24,7 @@ export declare const TriggerListResponse: z.ZodObject<{
24
24
  POSITION_CLOSED: "POSITION_CLOSED";
25
25
  SYSTEM: "SYSTEM";
26
26
  POSITION_NETTED: "POSITION_NETTED";
27
+ POSITION_REVERSED: "POSITION_REVERSED";
27
28
  }>>;
28
29
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
29
30
  id: z.ZodUUID;
@@ -220,6 +221,7 @@ export declare const TriggerListResponse: z.ZodObject<{
220
221
  POSITION_CLOSED: "POSITION_CLOSED";
221
222
  SYSTEM: "SYSTEM";
222
223
  POSITION_NETTED: "POSITION_NETTED";
224
+ POSITION_REVERSED: "POSITION_REVERSED";
223
225
  }>>;
224
226
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
225
227
  id: z.ZodUUID;
@@ -462,6 +464,7 @@ export declare const TriggerListResponse: z.ZodObject<{
462
464
  POSITION_CLOSED: "POSITION_CLOSED";
463
465
  SYSTEM: "SYSTEM";
464
466
  POSITION_NETTED: "POSITION_NETTED";
467
+ POSITION_REVERSED: "POSITION_REVERSED";
465
468
  }>>;
466
469
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
467
470
  id: z.ZodUUID;
@@ -742,6 +745,7 @@ export declare const CreateTriggerResponse: z.ZodObject<{
742
745
  POSITION_CLOSED: "POSITION_CLOSED";
743
746
  SYSTEM: "SYSTEM";
744
747
  POSITION_NETTED: "POSITION_NETTED";
748
+ POSITION_REVERSED: "POSITION_REVERSED";
745
749
  }>>;
746
750
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
747
751
  id: z.ZodUUID;
@@ -938,6 +942,7 @@ export declare const CreateTriggerResponse: z.ZodObject<{
938
942
  POSITION_CLOSED: "POSITION_CLOSED";
939
943
  SYSTEM: "SYSTEM";
940
944
  POSITION_NETTED: "POSITION_NETTED";
945
+ POSITION_REVERSED: "POSITION_REVERSED";
941
946
  }>>;
942
947
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
943
948
  id: z.ZodUUID;
@@ -1180,6 +1185,7 @@ export declare const CreateTriggerResponse: z.ZodObject<{
1180
1185
  POSITION_CLOSED: "POSITION_CLOSED";
1181
1186
  SYSTEM: "SYSTEM";
1182
1187
  POSITION_NETTED: "POSITION_NETTED";
1188
+ POSITION_REVERSED: "POSITION_REVERSED";
1183
1189
  }>>;
1184
1190
  fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1185
1191
  id: z.ZodUUID;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/types",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "Pear Protocol Types definitions",
5
5
  "private": false,
6
6
  "type": "module",