@pear-protocol/types 2.23.0 → 2.25.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 (46) hide show
  1. package/dist/copy/entities.d.ts +162 -10
  2. package/dist/copy/responses.d.ts +96 -11
  3. package/dist/execution/entities.d.ts +260 -43
  4. package/dist/execution/queries.d.ts +3 -2
  5. package/dist/execution/responses.d.ts +144 -24
  6. package/dist/fill/entities.d.ts +60 -1
  7. package/dist/fill/queries.d.ts +1 -0
  8. package/dist/fill/responses.d.ts +34 -4
  9. package/dist/index.js +743 -411
  10. package/dist/ladder/entities.d.ts +141 -24
  11. package/dist/ladder/payloads.d.ts +60 -24
  12. package/dist/ladder/queries.d.ts +2 -2
  13. package/dist/ladder/responses.d.ts +420 -69
  14. package/dist/leverage/payloads.d.ts +6 -1
  15. package/dist/notification/entities.d.ts +209 -7
  16. package/dist/notification/responses.d.ts +99 -2
  17. package/dist/order/entities.d.ts +3 -3
  18. package/dist/position/entities.d.ts +5 -5
  19. package/dist/position/responses.d.ts +4 -4
  20. package/dist/realtime/frames.d.ts +38 -6
  21. package/dist/realtime/public-events.d.ts +19 -3
  22. package/dist/rewards/entities.d.ts +18 -0
  23. package/dist/rewards/index.d.ts +1 -0
  24. package/dist/rewards/queries.d.ts +7 -0
  25. package/dist/rewards/responses.d.ts +52 -0
  26. package/dist/schedule/entities.d.ts +155 -19
  27. package/dist/schedule/index.d.ts +1 -0
  28. package/dist/schedule/queries.d.ts +3 -2
  29. package/dist/schedule/responses.d.ts +142 -19
  30. package/dist/sync/payloads.d.ts +56 -88
  31. package/dist/tca/responses.d.ts +12 -12
  32. package/dist/trade/payloads.d.ts +60 -24
  33. package/dist/trade/responses.d.ts +360 -60
  34. package/dist/traders/performance.d.ts +4 -0
  35. package/dist/traders/public.d.ts +537 -285
  36. package/dist/trigger/common/index.d.ts +8 -2
  37. package/dist/trigger/entities/conditions.d.ts +40 -0
  38. package/dist/trigger/entities/index.d.ts +339 -32
  39. package/dist/trigger/payloads/conditions.d.ts +70 -38
  40. package/dist/trigger/payloads/index.d.ts +408 -216
  41. package/dist/trigger/queries.d.ts +2 -2
  42. package/dist/trigger/responses.d.ts +218 -20
  43. package/dist/users/entities.d.ts +1 -0
  44. package/dist/users/payloads.d.ts +1 -0
  45. package/dist/users/response.d.ts +2 -0
  46. package/package.json +1 -1
@@ -13,10 +13,10 @@ export declare const ScheduleListResponse: z.ZodObject<{
13
13
  lighter_rhc: "lighter_rhc";
14
14
  }>;
15
15
  status: z.ZodEnum<{
16
- FAILED: "FAILED";
17
16
  ACTIVE: "ACTIVE";
18
- CANCELLED: "CANCELLED";
19
17
  COMPLETED: "COMPLETED";
18
+ FAILED: "FAILED";
19
+ CANCELLED: "CANCELLED";
20
20
  }>;
21
21
  positionKey: z.ZodString;
22
22
  executionType: z.ZodEnum<{
@@ -27,13 +27,32 @@ export declare const ScheduleListResponse: z.ZodObject<{
27
27
  endAt: z.ZodString;
28
28
  cancelledAt: z.ZodOptional<z.ZodString>;
29
29
  cancelledReason: z.ZodOptional<z.ZodEnum<{
30
- USER: "USER";
31
30
  POSITION_CLOSED: "POSITION_CLOSED";
31
+ USER: "USER";
32
32
  SYSTEM: "SYSTEM";
33
33
  POSITION_NETTED: "POSITION_NETTED";
34
34
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
35
35
  POSITION_REVERSED: "POSITION_REVERSED";
36
36
  }>>;
37
+ failure: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
38
+ reason: z.ZodEnum<{
39
+ EXPIRED: "EXPIRED";
40
+ INVALID_SCHEDULE: "INVALID_SCHEDULE";
41
+ POSITION_UNAVAILABLE: "POSITION_UNAVAILABLE";
42
+ MARKET_DATA_UNAVAILABLE: "MARKET_DATA_UNAVAILABLE";
43
+ NO_PLACEABLE_LEG: "NO_PLACEABLE_LEG";
44
+ LEG_BELOW_VENUE_MINIMUM: "LEG_BELOW_VENUE_MINIMUM";
45
+ }>;
46
+ }, z.core.$strip>, z.ZodObject<{
47
+ reason: z.ZodEnum<{
48
+ SLICE_ERRORED: "SLICE_ERRORED";
49
+ LEG_FAILED: "LEG_FAILED";
50
+ REMAINDER_UNFILLED: "REMAINDER_UNFILLED";
51
+ REPEATED_SLICE_FAILURES: "REPEATED_SLICE_FAILURES";
52
+ }>;
53
+ executionId: z.ZodOptional<z.ZodUUID>;
54
+ }, z.core.$strip>], "reason">>;
55
+ failedAt: z.ZodOptional<z.ZodString>;
37
56
  createdAt: z.ZodString;
38
57
  updatedAt: z.ZodString;
39
58
  executedSliceCount: z.ZodNumber;
@@ -71,10 +90,10 @@ export declare const ScheduleListResponse: z.ZodObject<{
71
90
  lighter_rhc: "lighter_rhc";
72
91
  }>;
73
92
  status: z.ZodEnum<{
74
- FAILED: "FAILED";
75
93
  ACTIVE: "ACTIVE";
76
- CANCELLED: "CANCELLED";
77
94
  COMPLETED: "COMPLETED";
95
+ FAILED: "FAILED";
96
+ CANCELLED: "CANCELLED";
78
97
  }>;
79
98
  positionKey: z.ZodString;
80
99
  executionType: z.ZodEnum<{
@@ -85,13 +104,32 @@ export declare const ScheduleListResponse: z.ZodObject<{
85
104
  endAt: z.ZodString;
86
105
  cancelledAt: z.ZodOptional<z.ZodString>;
87
106
  cancelledReason: z.ZodOptional<z.ZodEnum<{
88
- USER: "USER";
89
107
  POSITION_CLOSED: "POSITION_CLOSED";
108
+ USER: "USER";
90
109
  SYSTEM: "SYSTEM";
91
110
  POSITION_NETTED: "POSITION_NETTED";
92
111
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
93
112
  POSITION_REVERSED: "POSITION_REVERSED";
94
113
  }>>;
114
+ failure: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
115
+ reason: z.ZodEnum<{
116
+ EXPIRED: "EXPIRED";
117
+ INVALID_SCHEDULE: "INVALID_SCHEDULE";
118
+ POSITION_UNAVAILABLE: "POSITION_UNAVAILABLE";
119
+ MARKET_DATA_UNAVAILABLE: "MARKET_DATA_UNAVAILABLE";
120
+ NO_PLACEABLE_LEG: "NO_PLACEABLE_LEG";
121
+ LEG_BELOW_VENUE_MINIMUM: "LEG_BELOW_VENUE_MINIMUM";
122
+ }>;
123
+ }, z.core.$strip>, z.ZodObject<{
124
+ reason: z.ZodEnum<{
125
+ SLICE_ERRORED: "SLICE_ERRORED";
126
+ LEG_FAILED: "LEG_FAILED";
127
+ REMAINDER_UNFILLED: "REMAINDER_UNFILLED";
128
+ REPEATED_SLICE_FAILURES: "REPEATED_SLICE_FAILURES";
129
+ }>;
130
+ executionId: z.ZodOptional<z.ZodUUID>;
131
+ }, z.core.$strip>], "reason">>;
132
+ failedAt: z.ZodOptional<z.ZodString>;
95
133
  createdAt: z.ZodString;
96
134
  updatedAt: z.ZodString;
97
135
  executedSliceCount: z.ZodNumber;
@@ -126,10 +164,10 @@ export declare const ScheduleDetailResponse: z.ZodObject<{
126
164
  lighter_rhc: "lighter_rhc";
127
165
  }>;
128
166
  status: z.ZodEnum<{
129
- FAILED: "FAILED";
130
167
  ACTIVE: "ACTIVE";
131
- CANCELLED: "CANCELLED";
132
168
  COMPLETED: "COMPLETED";
169
+ FAILED: "FAILED";
170
+ CANCELLED: "CANCELLED";
133
171
  }>;
134
172
  positionKey: z.ZodString;
135
173
  executionType: z.ZodEnum<{
@@ -140,13 +178,32 @@ export declare const ScheduleDetailResponse: z.ZodObject<{
140
178
  endAt: z.ZodString;
141
179
  cancelledAt: z.ZodOptional<z.ZodString>;
142
180
  cancelledReason: z.ZodOptional<z.ZodEnum<{
143
- USER: "USER";
144
181
  POSITION_CLOSED: "POSITION_CLOSED";
182
+ USER: "USER";
145
183
  SYSTEM: "SYSTEM";
146
184
  POSITION_NETTED: "POSITION_NETTED";
147
185
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
148
186
  POSITION_REVERSED: "POSITION_REVERSED";
149
187
  }>>;
188
+ failure: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
189
+ reason: z.ZodEnum<{
190
+ EXPIRED: "EXPIRED";
191
+ INVALID_SCHEDULE: "INVALID_SCHEDULE";
192
+ POSITION_UNAVAILABLE: "POSITION_UNAVAILABLE";
193
+ MARKET_DATA_UNAVAILABLE: "MARKET_DATA_UNAVAILABLE";
194
+ NO_PLACEABLE_LEG: "NO_PLACEABLE_LEG";
195
+ LEG_BELOW_VENUE_MINIMUM: "LEG_BELOW_VENUE_MINIMUM";
196
+ }>;
197
+ }, z.core.$strip>, z.ZodObject<{
198
+ reason: z.ZodEnum<{
199
+ SLICE_ERRORED: "SLICE_ERRORED";
200
+ LEG_FAILED: "LEG_FAILED";
201
+ REMAINDER_UNFILLED: "REMAINDER_UNFILLED";
202
+ REPEATED_SLICE_FAILURES: "REPEATED_SLICE_FAILURES";
203
+ }>;
204
+ executionId: z.ZodOptional<z.ZodUUID>;
205
+ }, z.core.$strip>], "reason">>;
206
+ failedAt: z.ZodOptional<z.ZodString>;
150
207
  createdAt: z.ZodString;
151
208
  updatedAt: z.ZodString;
152
209
  executedSliceCount: z.ZodNumber;
@@ -184,10 +241,10 @@ export declare const ScheduleDetailResponse: z.ZodObject<{
184
241
  lighter_rhc: "lighter_rhc";
185
242
  }>;
186
243
  status: z.ZodEnum<{
187
- FAILED: "FAILED";
188
244
  ACTIVE: "ACTIVE";
189
- CANCELLED: "CANCELLED";
190
245
  COMPLETED: "COMPLETED";
246
+ FAILED: "FAILED";
247
+ CANCELLED: "CANCELLED";
191
248
  }>;
192
249
  positionKey: z.ZodString;
193
250
  executionType: z.ZodEnum<{
@@ -198,13 +255,32 @@ export declare const ScheduleDetailResponse: z.ZodObject<{
198
255
  endAt: z.ZodString;
199
256
  cancelledAt: z.ZodOptional<z.ZodString>;
200
257
  cancelledReason: z.ZodOptional<z.ZodEnum<{
201
- USER: "USER";
202
258
  POSITION_CLOSED: "POSITION_CLOSED";
259
+ USER: "USER";
203
260
  SYSTEM: "SYSTEM";
204
261
  POSITION_NETTED: "POSITION_NETTED";
205
262
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
206
263
  POSITION_REVERSED: "POSITION_REVERSED";
207
264
  }>>;
265
+ failure: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
266
+ reason: z.ZodEnum<{
267
+ EXPIRED: "EXPIRED";
268
+ INVALID_SCHEDULE: "INVALID_SCHEDULE";
269
+ POSITION_UNAVAILABLE: "POSITION_UNAVAILABLE";
270
+ MARKET_DATA_UNAVAILABLE: "MARKET_DATA_UNAVAILABLE";
271
+ NO_PLACEABLE_LEG: "NO_PLACEABLE_LEG";
272
+ LEG_BELOW_VENUE_MINIMUM: "LEG_BELOW_VENUE_MINIMUM";
273
+ }>;
274
+ }, z.core.$strip>, z.ZodObject<{
275
+ reason: z.ZodEnum<{
276
+ SLICE_ERRORED: "SLICE_ERRORED";
277
+ LEG_FAILED: "LEG_FAILED";
278
+ REMAINDER_UNFILLED: "REMAINDER_UNFILLED";
279
+ REPEATED_SLICE_FAILURES: "REPEATED_SLICE_FAILURES";
280
+ }>;
281
+ executionId: z.ZodOptional<z.ZodUUID>;
282
+ }, z.core.$strip>], "reason">>;
283
+ failedAt: z.ZodOptional<z.ZodString>;
208
284
  createdAt: z.ZodString;
209
285
  updatedAt: z.ZodString;
210
286
  executedSliceCount: z.ZodNumber;
@@ -241,7 +317,9 @@ export declare const ScheduleDetailResponse: z.ZodObject<{
241
317
  }>;
242
318
  tradeAccountId: z.ZodUUID;
243
319
  symbol: z.ZodString;
244
- positionId: z.ZodUUID;
320
+ executionId: z.ZodOptional<z.ZodUUID>;
321
+ scheduleId: z.ZodOptional<z.ZodUUID>;
322
+ triggerId: z.ZodOptional<z.ZodUUID>;
245
323
  connector: z.ZodEnum<{
246
324
  hyperliquid: "hyperliquid";
247
325
  binance: "binance";
@@ -267,6 +345,13 @@ export declare const ScheduleDetailResponse: z.ZodObject<{
267
345
  exchangeFillId: z.ZodString;
268
346
  quantity: z.ZodString;
269
347
  }, z.core.$strip>>;
348
+ assignments: z.ZodArray<z.ZodObject<{
349
+ positionId: z.ZodUUID;
350
+ quantity: z.ZodString;
351
+ usd: z.ZodString;
352
+ tradeFee: z.ZodOptional<z.ZodString>;
353
+ pearFee: z.ZodOptional<z.ZodString>;
354
+ }, z.core.$strip>>;
270
355
  }, z.core.$strip>>>;
271
356
  }, z.core.$strip>, z.ZodObject<{
272
357
  index: z.ZodNumber;
@@ -291,10 +376,10 @@ export declare const CreateScheduleResponse: z.ZodObject<{
291
376
  lighter_rhc: "lighter_rhc";
292
377
  }>;
293
378
  status: z.ZodEnum<{
294
- FAILED: "FAILED";
295
379
  ACTIVE: "ACTIVE";
296
- CANCELLED: "CANCELLED";
297
380
  COMPLETED: "COMPLETED";
381
+ FAILED: "FAILED";
382
+ CANCELLED: "CANCELLED";
298
383
  }>;
299
384
  positionKey: z.ZodString;
300
385
  executionType: z.ZodEnum<{
@@ -305,13 +390,32 @@ export declare const CreateScheduleResponse: z.ZodObject<{
305
390
  endAt: z.ZodString;
306
391
  cancelledAt: z.ZodOptional<z.ZodString>;
307
392
  cancelledReason: z.ZodOptional<z.ZodEnum<{
308
- USER: "USER";
309
393
  POSITION_CLOSED: "POSITION_CLOSED";
394
+ USER: "USER";
310
395
  SYSTEM: "SYSTEM";
311
396
  POSITION_NETTED: "POSITION_NETTED";
312
397
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
313
398
  POSITION_REVERSED: "POSITION_REVERSED";
314
399
  }>>;
400
+ failure: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
401
+ reason: z.ZodEnum<{
402
+ EXPIRED: "EXPIRED";
403
+ INVALID_SCHEDULE: "INVALID_SCHEDULE";
404
+ POSITION_UNAVAILABLE: "POSITION_UNAVAILABLE";
405
+ MARKET_DATA_UNAVAILABLE: "MARKET_DATA_UNAVAILABLE";
406
+ NO_PLACEABLE_LEG: "NO_PLACEABLE_LEG";
407
+ LEG_BELOW_VENUE_MINIMUM: "LEG_BELOW_VENUE_MINIMUM";
408
+ }>;
409
+ }, z.core.$strip>, z.ZodObject<{
410
+ reason: z.ZodEnum<{
411
+ SLICE_ERRORED: "SLICE_ERRORED";
412
+ LEG_FAILED: "LEG_FAILED";
413
+ REMAINDER_UNFILLED: "REMAINDER_UNFILLED";
414
+ REPEATED_SLICE_FAILURES: "REPEATED_SLICE_FAILURES";
415
+ }>;
416
+ executionId: z.ZodOptional<z.ZodUUID>;
417
+ }, z.core.$strip>], "reason">>;
418
+ failedAt: z.ZodOptional<z.ZodString>;
315
419
  createdAt: z.ZodString;
316
420
  updatedAt: z.ZodString;
317
421
  executedSliceCount: z.ZodNumber;
@@ -349,10 +453,10 @@ export declare const CreateScheduleResponse: z.ZodObject<{
349
453
  lighter_rhc: "lighter_rhc";
350
454
  }>;
351
455
  status: z.ZodEnum<{
352
- FAILED: "FAILED";
353
456
  ACTIVE: "ACTIVE";
354
- CANCELLED: "CANCELLED";
355
457
  COMPLETED: "COMPLETED";
458
+ FAILED: "FAILED";
459
+ CANCELLED: "CANCELLED";
356
460
  }>;
357
461
  positionKey: z.ZodString;
358
462
  executionType: z.ZodEnum<{
@@ -363,13 +467,32 @@ export declare const CreateScheduleResponse: z.ZodObject<{
363
467
  endAt: z.ZodString;
364
468
  cancelledAt: z.ZodOptional<z.ZodString>;
365
469
  cancelledReason: z.ZodOptional<z.ZodEnum<{
366
- USER: "USER";
367
470
  POSITION_CLOSED: "POSITION_CLOSED";
471
+ USER: "USER";
368
472
  SYSTEM: "SYSTEM";
369
473
  POSITION_NETTED: "POSITION_NETTED";
370
474
  POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
371
475
  POSITION_REVERSED: "POSITION_REVERSED";
372
476
  }>>;
477
+ failure: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
478
+ reason: z.ZodEnum<{
479
+ EXPIRED: "EXPIRED";
480
+ INVALID_SCHEDULE: "INVALID_SCHEDULE";
481
+ POSITION_UNAVAILABLE: "POSITION_UNAVAILABLE";
482
+ MARKET_DATA_UNAVAILABLE: "MARKET_DATA_UNAVAILABLE";
483
+ NO_PLACEABLE_LEG: "NO_PLACEABLE_LEG";
484
+ LEG_BELOW_VENUE_MINIMUM: "LEG_BELOW_VENUE_MINIMUM";
485
+ }>;
486
+ }, z.core.$strip>, z.ZodObject<{
487
+ reason: z.ZodEnum<{
488
+ SLICE_ERRORED: "SLICE_ERRORED";
489
+ LEG_FAILED: "LEG_FAILED";
490
+ REMAINDER_UNFILLED: "REMAINDER_UNFILLED";
491
+ REPEATED_SLICE_FAILURES: "REPEATED_SLICE_FAILURES";
492
+ }>;
493
+ executionId: z.ZodOptional<z.ZodUUID>;
494
+ }, z.core.$strip>], "reason">>;
495
+ failedAt: z.ZodOptional<z.ZodString>;
373
496
  createdAt: z.ZodString;
374
497
  updatedAt: z.ZodString;
375
498
  executedSliceCount: z.ZodNumber;
@@ -51,7 +51,7 @@ export declare const ExternalPosition: z.ZodObject<{
51
51
  }, z.core.$strip>;
52
52
  export type ExternalPosition = z.output<typeof ExternalPosition>;
53
53
  /**
54
- * A single fill bound to a positionKey basket. Every fill carries a price/usd:
54
+ * A canonical source receipt shared by its position assignments. Every fill carries a price/usd:
55
55
  * real and gap/opening synthetics a genuine value, unpriceable gone-close
56
56
  * synthetics "0" (consumers treat 0-price as unpriceable).
57
57
  */
@@ -81,23 +81,25 @@ export declare const ApplicableFill: z.ZodObject<{
81
81
  tradeFee: z.ZodString;
82
82
  builderFee: z.ZodString;
83
83
  closedReason: z.ZodOptional<z.ZodEnum<{
84
- NETTED: "NETTED";
85
84
  USER: "USER";
86
85
  LIQUIDATED: "LIQUIDATED";
86
+ NETTED: "NETTED";
87
87
  }>>;
88
88
  liquidation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
89
89
  mark: z.ZodString;
90
- outcome: z.ZodOptional<z.ZodEnum<{
91
- CLOSED: "CLOSED";
92
- REDUCED: "REDUCED";
93
- }>>;
94
90
  }, z.core.$strip>>>;
95
- original: z.ZodOptional<z.ZodObject<{
96
- exchangeFillId: z.ZodString;
97
- quantity: z.ZodString;
98
- }, z.core.$strip>>;
99
91
  }, z.core.$strip>;
100
92
  export type ApplicableFill = z.output<typeof ApplicableFill>;
93
+ /** A positive share of one canonical receipt assigned to a position. */
94
+ export declare const ApplicableFillAssignment: z.ZodObject<{
95
+ exchangeFillId: z.ZodString;
96
+ quantity: z.ZodString;
97
+ liquidationOutcome: z.ZodOptional<z.ZodEnum<{
98
+ CLOSED: "CLOSED";
99
+ REDUCED: "REDUCED";
100
+ }>>;
101
+ }, z.core.$strip>;
102
+ export type ApplicableFillAssignment = z.output<typeof ApplicableFillAssignment>;
101
103
  /**
102
104
  * Position metadata for an applicable. Consumed ONLY when the apply step CREATES a
103
105
  * new position for the positionKey. On merge into an existing position it is
@@ -130,51 +132,17 @@ export declare const ApplicablePosition: z.ZodObject<{
130
132
  CLOSED: "CLOSED";
131
133
  }>;
132
134
  closedReason: z.ZodOptional<z.ZodEnum<{
133
- NETTED: "NETTED";
134
135
  USER: "USER";
135
136
  LIQUIDATED: "LIQUIDATED";
137
+ NETTED: "NETTED";
136
138
  }>>;
137
- fills: z.ZodArray<z.ZodObject<{
139
+ assignments: z.ZodArray<z.ZodObject<{
138
140
  exchangeFillId: z.ZodString;
139
- cloid: z.ZodNullable<z.ZodString>;
140
- connector: z.ZodEnum<{
141
- hyperliquid: "hyperliquid";
142
- binance: "binance";
143
- bybit: "bybit";
144
- okx: "okx";
145
- lighter: "lighter";
146
- lighter_rhc: "lighter_rhc";
147
- }>;
148
- symbol: z.ZodString;
149
- side: z.ZodEnum<{
150
- BUY: "BUY";
151
- SELL: "SELL";
152
- }>;
153
141
  quantity: z.ZodString;
154
- price: z.ZodString;
155
- usd: z.ZodString;
156
- timestamp: z.ZodNumber;
157
- reduceOnly: z.ZodBoolean;
158
- synthetic: z.ZodBoolean;
159
- isExternal: z.ZodBoolean;
160
- tradeFee: z.ZodString;
161
- builderFee: z.ZodString;
162
- closedReason: z.ZodOptional<z.ZodEnum<{
163
- NETTED: "NETTED";
164
- USER: "USER";
165
- LIQUIDATED: "LIQUIDATED";
142
+ liquidationOutcome: z.ZodOptional<z.ZodEnum<{
143
+ CLOSED: "CLOSED";
144
+ REDUCED: "REDUCED";
166
145
  }>>;
167
- liquidation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
168
- mark: z.ZodString;
169
- outcome: z.ZodOptional<z.ZodEnum<{
170
- CLOSED: "CLOSED";
171
- REDUCED: "REDUCED";
172
- }>>;
173
- }, z.core.$strip>>>;
174
- original: z.ZodOptional<z.ZodObject<{
175
- exchangeFillId: z.ZodString;
176
- quantity: z.ZodString;
177
- }, z.core.$strip>>;
178
146
  }, z.core.$strip>>;
179
147
  metadata: z.ZodObject<{
180
148
  initialExposureUSD: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
@@ -225,6 +193,40 @@ export type CreateApplicablesBulkFields = z.output<typeof CreateApplicablesBulkF
225
193
  *
226
194
  */
227
195
  export declare const CreateApplicablesRequest: z.ZodObject<{
196
+ fills: z.ZodArray<z.ZodObject<{
197
+ exchangeFillId: z.ZodString;
198
+ cloid: z.ZodNullable<z.ZodString>;
199
+ connector: z.ZodEnum<{
200
+ hyperliquid: "hyperliquid";
201
+ binance: "binance";
202
+ bybit: "bybit";
203
+ okx: "okx";
204
+ lighter: "lighter";
205
+ lighter_rhc: "lighter_rhc";
206
+ }>;
207
+ symbol: z.ZodString;
208
+ side: z.ZodEnum<{
209
+ BUY: "BUY";
210
+ SELL: "SELL";
211
+ }>;
212
+ quantity: z.ZodString;
213
+ price: z.ZodString;
214
+ usd: z.ZodString;
215
+ timestamp: z.ZodNumber;
216
+ reduceOnly: z.ZodBoolean;
217
+ synthetic: z.ZodBoolean;
218
+ isExternal: z.ZodBoolean;
219
+ tradeFee: z.ZodString;
220
+ builderFee: z.ZodString;
221
+ closedReason: z.ZodOptional<z.ZodEnum<{
222
+ USER: "USER";
223
+ LIQUIDATED: "LIQUIDATED";
224
+ NETTED: "NETTED";
225
+ }>>;
226
+ liquidation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
227
+ mark: z.ZodString;
228
+ }, z.core.$strip>>>;
229
+ }, z.core.$strip>>;
228
230
  applicables: z.ZodArray<z.ZodObject<{
229
231
  positionKey: z.ZodString;
230
232
  exposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
@@ -238,51 +240,17 @@ export declare const CreateApplicablesRequest: z.ZodObject<{
238
240
  CLOSED: "CLOSED";
239
241
  }>;
240
242
  closedReason: z.ZodOptional<z.ZodEnum<{
241
- NETTED: "NETTED";
242
243
  USER: "USER";
243
244
  LIQUIDATED: "LIQUIDATED";
245
+ NETTED: "NETTED";
244
246
  }>>;
245
- fills: z.ZodArray<z.ZodObject<{
247
+ assignments: z.ZodArray<z.ZodObject<{
246
248
  exchangeFillId: z.ZodString;
247
- cloid: z.ZodNullable<z.ZodString>;
248
- connector: z.ZodEnum<{
249
- hyperliquid: "hyperliquid";
250
- binance: "binance";
251
- bybit: "bybit";
252
- okx: "okx";
253
- lighter: "lighter";
254
- lighter_rhc: "lighter_rhc";
255
- }>;
256
- symbol: z.ZodString;
257
- side: z.ZodEnum<{
258
- BUY: "BUY";
259
- SELL: "SELL";
260
- }>;
261
249
  quantity: z.ZodString;
262
- price: z.ZodString;
263
- usd: z.ZodString;
264
- timestamp: z.ZodNumber;
265
- reduceOnly: z.ZodBoolean;
266
- synthetic: z.ZodBoolean;
267
- isExternal: z.ZodBoolean;
268
- tradeFee: z.ZodString;
269
- builderFee: z.ZodString;
270
- closedReason: z.ZodOptional<z.ZodEnum<{
271
- NETTED: "NETTED";
272
- USER: "USER";
273
- LIQUIDATED: "LIQUIDATED";
250
+ liquidationOutcome: z.ZodOptional<z.ZodEnum<{
251
+ CLOSED: "CLOSED";
252
+ REDUCED: "REDUCED";
274
253
  }>>;
275
- liquidation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
276
- mark: z.ZodString;
277
- outcome: z.ZodOptional<z.ZodEnum<{
278
- CLOSED: "CLOSED";
279
- REDUCED: "REDUCED";
280
- }>>;
281
- }, z.core.$strip>>>;
282
- original: z.ZodOptional<z.ZodObject<{
283
- exchangeFillId: z.ZodString;
284
- quantity: z.ZodString;
285
- }, z.core.$strip>>;
286
254
  }, z.core.$strip>>;
287
255
  metadata: z.ZodObject<{
288
256
  initialExposureUSD: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
@@ -118,19 +118,19 @@ export type TcaExecutionSummaryLegResponse = z.output<typeof TcaExecutionSummary
118
118
  export declare const TcaExecutionSummaryContextResponse: z.ZodObject<{
119
119
  intent: z.ZodEnum<{
120
120
  OPEN: "OPEN";
121
- ADJUST: "ADJUST";
122
121
  CLOSE: "CLOSE";
122
+ ADJUST: "ADJUST";
123
123
  REVERSE: "REVERSE";
124
124
  }>;
125
125
  orderType: z.ZodEnum<{
126
126
  MARKET: "MARKET";
127
127
  }>;
128
128
  executionStatus: z.ZodEnum<{
129
- FAILED: "FAILED";
130
129
  ACTIVE: "ACTIVE";
130
+ COMPLETED: "COMPLETED";
131
+ FAILED: "FAILED";
131
132
  CANCELLED: "CANCELLED";
132
133
  IDLE: "IDLE";
133
- COMPLETED: "COMPLETED";
134
134
  }>;
135
135
  positionId: z.ZodOptional<z.ZodUUID>;
136
136
  scheduleId: z.ZodOptional<z.ZodUUID>;
@@ -160,19 +160,19 @@ export declare const TcaExecutionSummaryResponse: z.ZodObject<{
160
160
  executionContext: z.ZodOptional<z.ZodObject<{
161
161
  intent: z.ZodEnum<{
162
162
  OPEN: "OPEN";
163
- ADJUST: "ADJUST";
164
163
  CLOSE: "CLOSE";
164
+ ADJUST: "ADJUST";
165
165
  REVERSE: "REVERSE";
166
166
  }>;
167
167
  orderType: z.ZodEnum<{
168
168
  MARKET: "MARKET";
169
169
  }>;
170
170
  executionStatus: z.ZodEnum<{
171
- FAILED: "FAILED";
172
171
  ACTIVE: "ACTIVE";
172
+ COMPLETED: "COMPLETED";
173
+ FAILED: "FAILED";
173
174
  CANCELLED: "CANCELLED";
174
175
  IDLE: "IDLE";
175
- COMPLETED: "COMPLETED";
176
176
  }>;
177
177
  positionId: z.ZodOptional<z.ZodUUID>;
178
178
  scheduleId: z.ZodOptional<z.ZodUUID>;
@@ -215,19 +215,19 @@ export declare const TcaExecutionResponse: z.ZodObject<{
215
215
  executionContext: z.ZodOptional<z.ZodObject<{
216
216
  intent: z.ZodEnum<{
217
217
  OPEN: "OPEN";
218
- ADJUST: "ADJUST";
219
218
  CLOSE: "CLOSE";
219
+ ADJUST: "ADJUST";
220
220
  REVERSE: "REVERSE";
221
221
  }>;
222
222
  orderType: z.ZodEnum<{
223
223
  MARKET: "MARKET";
224
224
  }>;
225
225
  executionStatus: z.ZodEnum<{
226
- FAILED: "FAILED";
227
226
  ACTIVE: "ACTIVE";
227
+ COMPLETED: "COMPLETED";
228
+ FAILED: "FAILED";
228
229
  CANCELLED: "CANCELLED";
229
230
  IDLE: "IDLE";
230
- COMPLETED: "COMPLETED";
231
231
  }>;
232
232
  positionId: z.ZodOptional<z.ZodUUID>;
233
233
  scheduleId: z.ZodOptional<z.ZodUUID>;
@@ -438,19 +438,19 @@ export declare const TcaSummaryResponse: z.ZodObject<{
438
438
  executionContext: z.ZodOptional<z.ZodObject<{
439
439
  intent: z.ZodEnum<{
440
440
  OPEN: "OPEN";
441
- ADJUST: "ADJUST";
442
441
  CLOSE: "CLOSE";
442
+ ADJUST: "ADJUST";
443
443
  REVERSE: "REVERSE";
444
444
  }>;
445
445
  orderType: z.ZodEnum<{
446
446
  MARKET: "MARKET";
447
447
  }>;
448
448
  executionStatus: z.ZodEnum<{
449
- FAILED: "FAILED";
450
449
  ACTIVE: "ACTIVE";
450
+ COMPLETED: "COMPLETED";
451
+ FAILED: "FAILED";
451
452
  CANCELLED: "CANCELLED";
452
453
  IDLE: "IDLE";
453
- COMPLETED: "COMPLETED";
454
454
  }>;
455
455
  positionId: z.ZodOptional<z.ZodUUID>;
456
456
  scheduleId: z.ZodOptional<z.ZodUUID>;