@pear-protocol/types 0.0.1

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 (131) hide show
  1. package/dist/auth/entities.d.ts +9 -0
  2. package/dist/auth/entities.js +8 -0
  3. package/dist/auth/index.d.ts +3 -0
  4. package/dist/auth/index.js +3 -0
  5. package/dist/auth/payloads.d.ts +50 -0
  6. package/dist/auth/payloads.js +39 -0
  7. package/dist/auth/response.d.ts +55 -0
  8. package/dist/auth/response.js +21 -0
  9. package/dist/bundle.d.ts +17 -0
  10. package/dist/bundle.js +17 -0
  11. package/dist/common/array.d.ts +10 -0
  12. package/dist/common/array.js +10 -0
  13. package/dist/common/index.d.ts +3 -0
  14. package/dist/common/index.js +3 -0
  15. package/dist/common/refinement.d.ts +20 -0
  16. package/dist/common/refinement.js +60 -0
  17. package/dist/common/request.d.ts +11 -0
  18. package/dist/common/request.js +24 -0
  19. package/dist/common/response.d.ts +12 -0
  20. package/dist/common/response.js +28 -0
  21. package/dist/common/schema.d.ts +8 -0
  22. package/dist/common/schema.js +10 -0
  23. package/dist/common/trade-legs.d.ts +34 -0
  24. package/dist/common/trade-legs.js +30 -0
  25. package/dist/connector/index.d.ts +8 -0
  26. package/dist/connector/index.js +5 -0
  27. package/dist/execution/entities.d.ts +741 -0
  28. package/dist/execution/entities.js +125 -0
  29. package/dist/execution/index.d.ts +3 -0
  30. package/dist/execution/index.js +3 -0
  31. package/dist/execution/queries.d.ts +20 -0
  32. package/dist/execution/queries.js +14 -0
  33. package/dist/execution/responses.d.ts +218 -0
  34. package/dist/execution/responses.js +9 -0
  35. package/dist/fill/entities.d.ts +25 -0
  36. package/dist/fill/entities.js +61 -0
  37. package/dist/fill/index.d.ts +3 -0
  38. package/dist/fill/index.js +3 -0
  39. package/dist/fill/queries.d.ts +13 -0
  40. package/dist/fill/queries.js +11 -0
  41. package/dist/fill/responses.d.ts +55 -0
  42. package/dist/fill/responses.js +12 -0
  43. package/dist/funding/entities.d.ts +11 -0
  44. package/dist/funding/entities.js +16 -0
  45. package/dist/funding/index.d.ts +3 -0
  46. package/dist/funding/index.js +3 -0
  47. package/dist/funding/queries.d.ts +10 -0
  48. package/dist/funding/queries.js +8 -0
  49. package/dist/funding/responses.d.ts +8 -0
  50. package/dist/funding/responses.js +11 -0
  51. package/dist/index.d.ts +2 -0
  52. package/dist/index.js +3 -0
  53. package/dist/instrument/entities.d.ts +43 -0
  54. package/dist/instrument/entities.js +48 -0
  55. package/dist/instrument/index.d.ts +3 -0
  56. package/dist/instrument/index.js +3 -0
  57. package/dist/instrument/queries.d.ts +10 -0
  58. package/dist/instrument/queries.js +8 -0
  59. package/dist/instrument/responses.d.ts +37 -0
  60. package/dist/instrument/responses.js +11 -0
  61. package/dist/instrument-precision/index.d.ts +18 -0
  62. package/dist/instrument-precision/index.js +51 -0
  63. package/dist/misc/index.d.ts +3 -0
  64. package/dist/misc/index.js +1 -0
  65. package/dist/order/entities.d.ts +73 -0
  66. package/dist/order/entities.js +73 -0
  67. package/dist/order/index.d.ts +1 -0
  68. package/dist/order/index.js +1 -0
  69. package/dist/position/entities.d.ts +53 -0
  70. package/dist/position/entities.js +55 -0
  71. package/dist/position/index.d.ts +3 -0
  72. package/dist/position/index.js +3 -0
  73. package/dist/position/queries.d.ts +16 -0
  74. package/dist/position/queries.js +28 -0
  75. package/dist/position/responses.d.ts +28 -0
  76. package/dist/position/responses.js +8 -0
  77. package/dist/price/entities.d.ts +8 -0
  78. package/dist/price/entities.js +7 -0
  79. package/dist/price/index.d.ts +3 -0
  80. package/dist/price/index.js +3 -0
  81. package/dist/price/queries.d.ts +10 -0
  82. package/dist/price/queries.js +8 -0
  83. package/dist/price/responses.d.ts +6 -0
  84. package/dist/price/responses.js +15 -0
  85. package/dist/schedule/entities.d.ts +380 -0
  86. package/dist/schedule/entities.js +159 -0
  87. package/dist/schedule/index.d.ts +4 -0
  88. package/dist/schedule/index.js +4 -0
  89. package/dist/schedule/payloads.d.ts +72 -0
  90. package/dist/schedule/payloads.js +102 -0
  91. package/dist/schedule/queries.d.ts +18 -0
  92. package/dist/schedule/queries.js +12 -0
  93. package/dist/schedule/responses.d.ts +279 -0
  94. package/dist/schedule/responses.js +10 -0
  95. package/dist/trade/index.d.ts +2 -0
  96. package/dist/trade/index.js +2 -0
  97. package/dist/trade/payloads.d.ts +217 -0
  98. package/dist/trade/payloads.js +35 -0
  99. package/dist/trade/responses.d.ts +861 -0
  100. package/dist/trade/responses.js +9 -0
  101. package/dist/trade-accounts/entities.d.ts +50 -0
  102. package/dist/trade-accounts/entities.js +18 -0
  103. package/dist/trade-accounts/index.d.ts +3 -0
  104. package/dist/trade-accounts/index.js +3 -0
  105. package/dist/trade-accounts/payloads.d.ts +137 -0
  106. package/dist/trade-accounts/payloads.js +84 -0
  107. package/dist/trade-accounts/response.d.ts +65 -0
  108. package/dist/trade-accounts/response.js +41 -0
  109. package/dist/trigger/entities/conditions.d.ts +407 -0
  110. package/dist/trigger/entities/conditions.js +239 -0
  111. package/dist/trigger/entities/index.d.ts +1549 -0
  112. package/dist/trigger/entities/index.js +123 -0
  113. package/dist/trigger/index.d.ts +6 -0
  114. package/dist/trigger/index.js +6 -0
  115. package/dist/trigger/payloads/conditions.d.ts +340 -0
  116. package/dist/trigger/payloads/conditions.js +109 -0
  117. package/dist/trigger/payloads/index.d.ts +470 -0
  118. package/dist/trigger/payloads/index.js +47 -0
  119. package/dist/trigger/queries.d.ts +18 -0
  120. package/dist/trigger/queries.js +12 -0
  121. package/dist/trigger/responses.d.ts +1001 -0
  122. package/dist/trigger/responses.js +10 -0
  123. package/dist/users/entities.d.ts +16 -0
  124. package/dist/users/entities.js +14 -0
  125. package/dist/users/index.d.ts +3 -0
  126. package/dist/users/index.js +3 -0
  127. package/dist/users/payloads.d.ts +5 -0
  128. package/dist/users/payloads.js +7 -0
  129. package/dist/users/response.d.ts +23 -0
  130. package/dist/users/response.js +12 -0
  131. package/package.json +35 -0
@@ -0,0 +1,1549 @@
1
+ import { z } from 'zod';
2
+ export declare const TriggerIntent: z.ZodEnum<{
3
+ OPEN: "OPEN";
4
+ CLOSE: "CLOSE";
5
+ }>;
6
+ export type TriggerIntent = z.infer<typeof TriggerIntent>;
7
+ export declare const TriggerStatus: z.ZodEnum<{
8
+ CANCELLED: "CANCELLED";
9
+ ACTIVE: "ACTIVE";
10
+ TRIGGERED: "TRIGGERED";
11
+ }>;
12
+ export type TriggerStatus = z.infer<typeof TriggerStatus>;
13
+ export declare const TriggerCancelledReason: z.ZodEnum<{
14
+ USER: "USER";
15
+ POSITION_CLOSED: "POSITION_CLOSED";
16
+ SYSTEM: "SYSTEM";
17
+ }>;
18
+ export type TriggerCancelledReason = z.infer<typeof TriggerCancelledReason>;
19
+ declare const BaseTrigger: z.ZodObject<{
20
+ id: z.ZodUUID;
21
+ tradeAccountId: z.ZodUUID;
22
+ connector: z.ZodEnum<{
23
+ hyperliquid: "hyperliquid";
24
+ binanceusdm: "binanceusdm";
25
+ bybit: "bybit";
26
+ okx: "okx";
27
+ }>;
28
+ status: z.ZodEnum<{
29
+ CANCELLED: "CANCELLED";
30
+ ACTIVE: "ACTIVE";
31
+ TRIGGERED: "TRIGGERED";
32
+ }>;
33
+ triggeredAt: z.ZodOptional<z.ZodString>;
34
+ cancelledAt: z.ZodOptional<z.ZodString>;
35
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
36
+ USER: "USER";
37
+ POSITION_CLOSED: "POSITION_CLOSED";
38
+ SYSTEM: "SYSTEM";
39
+ }>>;
40
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
41
+ id: z.ZodUUID;
42
+ cloid: z.ZodOptional<z.ZodUUID>;
43
+ tradeAccountId: z.ZodUUID;
44
+ symbol: z.ZodString;
45
+ positionId: z.ZodUUID;
46
+ connector: z.ZodEnum<{
47
+ hyperliquid: "hyperliquid";
48
+ binanceusdm: "binanceusdm";
49
+ bybit: "bybit";
50
+ okx: "okx";
51
+ }>;
52
+ side: z.ZodEnum<{
53
+ BUY: "BUY";
54
+ SELL: "SELL";
55
+ }>;
56
+ reduceOnly: z.ZodBoolean;
57
+ quantity: z.ZodString;
58
+ price: z.ZodString;
59
+ usd: z.ZodString;
60
+ fee: z.ZodOptional<z.ZodString>;
61
+ timestamp: z.ZodString;
62
+ }, z.core.$strip>>>;
63
+ createdAt: z.ZodString;
64
+ updatedAt: z.ZodString;
65
+ }, z.core.$strip>;
66
+ export declare const TriggerMarketOpen: z.ZodObject<{
67
+ id: z.ZodUUID;
68
+ tradeAccountId: z.ZodUUID;
69
+ connector: z.ZodEnum<{
70
+ hyperliquid: "hyperliquid";
71
+ binanceusdm: "binanceusdm";
72
+ bybit: "bybit";
73
+ okx: "okx";
74
+ }>;
75
+ status: z.ZodEnum<{
76
+ CANCELLED: "CANCELLED";
77
+ ACTIVE: "ACTIVE";
78
+ TRIGGERED: "TRIGGERED";
79
+ }>;
80
+ triggeredAt: z.ZodOptional<z.ZodString>;
81
+ cancelledAt: z.ZodOptional<z.ZodString>;
82
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
83
+ USER: "USER";
84
+ POSITION_CLOSED: "POSITION_CLOSED";
85
+ SYSTEM: "SYSTEM";
86
+ }>>;
87
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
88
+ id: z.ZodUUID;
89
+ cloid: z.ZodOptional<z.ZodUUID>;
90
+ tradeAccountId: z.ZodUUID;
91
+ symbol: z.ZodString;
92
+ positionId: z.ZodUUID;
93
+ connector: z.ZodEnum<{
94
+ hyperliquid: "hyperliquid";
95
+ binanceusdm: "binanceusdm";
96
+ bybit: "bybit";
97
+ okx: "okx";
98
+ }>;
99
+ side: z.ZodEnum<{
100
+ BUY: "BUY";
101
+ SELL: "SELL";
102
+ }>;
103
+ reduceOnly: z.ZodBoolean;
104
+ quantity: z.ZodString;
105
+ price: z.ZodString;
106
+ usd: z.ZodString;
107
+ fee: z.ZodOptional<z.ZodString>;
108
+ timestamp: z.ZodString;
109
+ }, z.core.$strip>>>;
110
+ createdAt: z.ZodString;
111
+ updatedAt: z.ZodString;
112
+ intent: z.ZodLiteral<"OPEN">;
113
+ type: z.ZodLiteral<"MARKET">;
114
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
115
+ type: z.ZodLiteral<"ratio_v1">;
116
+ data: z.ZodObject<{
117
+ priceSource: z.ZodEnum<{
118
+ mid: "mid";
119
+ mark: "mark";
120
+ }>;
121
+ symbol_a: z.ZodString;
122
+ symbol_b: z.ZodString;
123
+ direction: z.ZodEnum<{
124
+ ABOVE: "ABOVE";
125
+ BELOW: "BELOW";
126
+ }>;
127
+ threshold: z.ZodNumber;
128
+ }, z.core.$strip>;
129
+ }, z.core.$strip>, z.ZodObject<{
130
+ type: z.ZodLiteral<"price_v1">;
131
+ data: z.ZodObject<{
132
+ priceSource: z.ZodEnum<{
133
+ mid: "mid";
134
+ mark: "mark";
135
+ }>;
136
+ symbol: z.ZodString;
137
+ direction: z.ZodEnum<{
138
+ ABOVE: "ABOVE";
139
+ BELOW: "BELOW";
140
+ }>;
141
+ threshold: z.ZodNumber;
142
+ }, z.core.$strip>;
143
+ }, z.core.$strip>, z.ZodObject<{
144
+ type: z.ZodLiteral<"index_v1">;
145
+ data: z.ZodObject<{
146
+ priceSource: z.ZodEnum<{
147
+ mid: "mid";
148
+ mark: "mark";
149
+ }>;
150
+ basket: z.ZodArray<z.ZodObject<{
151
+ symbol: z.ZodString;
152
+ weight: z.ZodNumber;
153
+ }, z.core.$strip>>;
154
+ direction: z.ZodEnum<{
155
+ ABOVE: "ABOVE";
156
+ BELOW: "BELOW";
157
+ }>;
158
+ threshold: z.ZodNumber;
159
+ }, z.core.$strip>;
160
+ }, z.core.$strip>, z.ZodObject<{
161
+ type: z.ZodLiteral<"weighted_ratio_v1">;
162
+ data: z.ZodObject<{
163
+ priceSource: z.ZodEnum<{
164
+ mid: "mid";
165
+ mark: "mark";
166
+ }>;
167
+ basket: z.ZodArray<z.ZodObject<{
168
+ symbol: z.ZodString;
169
+ side: z.ZodEnum<{
170
+ BUY: "BUY";
171
+ SELL: "SELL";
172
+ }>;
173
+ weight: z.ZodNumber;
174
+ }, z.core.$strip>>;
175
+ direction: z.ZodEnum<{
176
+ ABOVE: "ABOVE";
177
+ BELOW: "BELOW";
178
+ }>;
179
+ threshold: z.ZodNumber;
180
+ }, z.core.$strip>;
181
+ }, z.core.$strip>], "type">;
182
+ context: z.ZodObject<{
183
+ type: z.ZodLiteral<"MARKET">;
184
+ legs: z.ZodTuple<[z.ZodObject<{
185
+ symbol: z.ZodString;
186
+ side: z.ZodEnum<{
187
+ BUY: "BUY";
188
+ SELL: "SELL";
189
+ }>;
190
+ mode: z.ZodEnum<{
191
+ QUANTITY: "QUANTITY";
192
+ USD: "USD";
193
+ }>;
194
+ amount: z.ZodString;
195
+ }, z.core.$strip>], z.ZodObject<{
196
+ symbol: z.ZodString;
197
+ side: z.ZodEnum<{
198
+ BUY: "BUY";
199
+ SELL: "SELL";
200
+ }>;
201
+ mode: z.ZodEnum<{
202
+ QUANTITY: "QUANTITY";
203
+ USD: "USD";
204
+ }>;
205
+ amount: z.ZodString;
206
+ }, z.core.$strip>>;
207
+ }, z.core.$strip>;
208
+ }, z.core.$strip>;
209
+ export declare const TriggerMarketAdjust: z.ZodObject<{
210
+ id: z.ZodUUID;
211
+ tradeAccountId: z.ZodUUID;
212
+ connector: z.ZodEnum<{
213
+ hyperliquid: "hyperliquid";
214
+ binanceusdm: "binanceusdm";
215
+ bybit: "bybit";
216
+ okx: "okx";
217
+ }>;
218
+ status: z.ZodEnum<{
219
+ CANCELLED: "CANCELLED";
220
+ ACTIVE: "ACTIVE";
221
+ TRIGGERED: "TRIGGERED";
222
+ }>;
223
+ triggeredAt: z.ZodOptional<z.ZodString>;
224
+ cancelledAt: z.ZodOptional<z.ZodString>;
225
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
226
+ USER: "USER";
227
+ POSITION_CLOSED: "POSITION_CLOSED";
228
+ SYSTEM: "SYSTEM";
229
+ }>>;
230
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
231
+ id: z.ZodUUID;
232
+ cloid: z.ZodOptional<z.ZodUUID>;
233
+ tradeAccountId: z.ZodUUID;
234
+ symbol: z.ZodString;
235
+ positionId: z.ZodUUID;
236
+ connector: z.ZodEnum<{
237
+ hyperliquid: "hyperliquid";
238
+ binanceusdm: "binanceusdm";
239
+ bybit: "bybit";
240
+ okx: "okx";
241
+ }>;
242
+ side: z.ZodEnum<{
243
+ BUY: "BUY";
244
+ SELL: "SELL";
245
+ }>;
246
+ reduceOnly: z.ZodBoolean;
247
+ quantity: z.ZodString;
248
+ price: z.ZodString;
249
+ usd: z.ZodString;
250
+ fee: z.ZodOptional<z.ZodString>;
251
+ timestamp: z.ZodString;
252
+ }, z.core.$strip>>>;
253
+ createdAt: z.ZodString;
254
+ updatedAt: z.ZodString;
255
+ intent: z.ZodLiteral<"ADJUST">;
256
+ type: z.ZodLiteral<"MARKET">;
257
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
258
+ type: z.ZodLiteral<"ratio_v1">;
259
+ data: z.ZodObject<{
260
+ priceSource: z.ZodEnum<{
261
+ mid: "mid";
262
+ mark: "mark";
263
+ }>;
264
+ symbol_a: z.ZodString;
265
+ symbol_b: z.ZodString;
266
+ direction: z.ZodEnum<{
267
+ ABOVE: "ABOVE";
268
+ BELOW: "BELOW";
269
+ }>;
270
+ threshold: z.ZodNumber;
271
+ }, z.core.$strip>;
272
+ }, z.core.$strip>, z.ZodObject<{
273
+ type: z.ZodLiteral<"price_v1">;
274
+ data: z.ZodObject<{
275
+ priceSource: z.ZodEnum<{
276
+ mid: "mid";
277
+ mark: "mark";
278
+ }>;
279
+ symbol: z.ZodString;
280
+ direction: z.ZodEnum<{
281
+ ABOVE: "ABOVE";
282
+ BELOW: "BELOW";
283
+ }>;
284
+ threshold: z.ZodNumber;
285
+ }, z.core.$strip>;
286
+ }, z.core.$strip>, z.ZodObject<{
287
+ type: z.ZodLiteral<"index_v1">;
288
+ data: z.ZodObject<{
289
+ priceSource: z.ZodEnum<{
290
+ mid: "mid";
291
+ mark: "mark";
292
+ }>;
293
+ basket: z.ZodArray<z.ZodObject<{
294
+ symbol: z.ZodString;
295
+ weight: z.ZodNumber;
296
+ }, z.core.$strip>>;
297
+ direction: z.ZodEnum<{
298
+ ABOVE: "ABOVE";
299
+ BELOW: "BELOW";
300
+ }>;
301
+ threshold: z.ZodNumber;
302
+ }, z.core.$strip>;
303
+ }, z.core.$strip>, z.ZodObject<{
304
+ type: z.ZodLiteral<"weighted_ratio_v1">;
305
+ data: z.ZodObject<{
306
+ priceSource: z.ZodEnum<{
307
+ mid: "mid";
308
+ mark: "mark";
309
+ }>;
310
+ basket: z.ZodArray<z.ZodObject<{
311
+ symbol: z.ZodString;
312
+ side: z.ZodEnum<{
313
+ BUY: "BUY";
314
+ SELL: "SELL";
315
+ }>;
316
+ weight: z.ZodNumber;
317
+ }, z.core.$strip>>;
318
+ direction: z.ZodEnum<{
319
+ ABOVE: "ABOVE";
320
+ BELOW: "BELOW";
321
+ }>;
322
+ threshold: z.ZodNumber;
323
+ }, z.core.$strip>;
324
+ }, z.core.$strip>, z.ZodObject<{
325
+ type: z.ZodLiteral<"position_value_v1">;
326
+ data: z.ZodObject<{
327
+ priceSource: z.ZodEnum<{
328
+ mid: "mid";
329
+ mark: "mark";
330
+ }>;
331
+ direction: z.ZodEnum<{
332
+ ABOVE: "ABOVE";
333
+ BELOW: "BELOW";
334
+ }>;
335
+ threshold: z.ZodNumber;
336
+ }, z.core.$strip>;
337
+ }, z.core.$strip>, z.ZodObject<{
338
+ type: z.ZodLiteral<"position_upnl_value_v1">;
339
+ data: z.ZodObject<{
340
+ priceSource: z.ZodEnum<{
341
+ mid: "mid";
342
+ mark: "mark";
343
+ }>;
344
+ direction: z.ZodEnum<{
345
+ ABOVE: "ABOVE";
346
+ BELOW: "BELOW";
347
+ }>;
348
+ threshold: z.ZodNumber;
349
+ }, z.core.$strip>;
350
+ }, z.core.$strip>, z.ZodObject<{
351
+ type: z.ZodLiteral<"position_upnl_percentage_v1">;
352
+ data: z.ZodObject<{
353
+ priceSource: z.ZodEnum<{
354
+ mid: "mid";
355
+ mark: "mark";
356
+ }>;
357
+ direction: z.ZodEnum<{
358
+ ABOVE: "ABOVE";
359
+ BELOW: "BELOW";
360
+ }>;
361
+ threshold_bps: z.ZodNumber;
362
+ }, z.core.$strip>;
363
+ }, z.core.$strip>], "type">;
364
+ context: z.ZodObject<{
365
+ type: z.ZodLiteral<"MARKET">;
366
+ position: z.ZodObject<{
367
+ id: z.ZodUUID;
368
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodString>;
369
+ }, z.core.$strip>;
370
+ legs: z.ZodTuple<[z.ZodObject<{
371
+ symbol: z.ZodString;
372
+ side: z.ZodEnum<{
373
+ BUY: "BUY";
374
+ SELL: "SELL";
375
+ }>;
376
+ mode: z.ZodEnum<{
377
+ QUANTITY: "QUANTITY";
378
+ USD: "USD";
379
+ }>;
380
+ amount: z.ZodString;
381
+ reduceOnly: z.ZodBoolean;
382
+ }, z.core.$strip>], z.ZodObject<{
383
+ symbol: z.ZodString;
384
+ side: z.ZodEnum<{
385
+ BUY: "BUY";
386
+ SELL: "SELL";
387
+ }>;
388
+ mode: z.ZodEnum<{
389
+ QUANTITY: "QUANTITY";
390
+ USD: "USD";
391
+ }>;
392
+ amount: z.ZodString;
393
+ reduceOnly: z.ZodBoolean;
394
+ }, z.core.$strip>>;
395
+ }, z.core.$strip>;
396
+ }, z.core.$strip>;
397
+ export declare const TriggerMarketClose: z.ZodObject<{
398
+ id: z.ZodUUID;
399
+ tradeAccountId: z.ZodUUID;
400
+ connector: z.ZodEnum<{
401
+ hyperliquid: "hyperliquid";
402
+ binanceusdm: "binanceusdm";
403
+ bybit: "bybit";
404
+ okx: "okx";
405
+ }>;
406
+ status: z.ZodEnum<{
407
+ CANCELLED: "CANCELLED";
408
+ ACTIVE: "ACTIVE";
409
+ TRIGGERED: "TRIGGERED";
410
+ }>;
411
+ triggeredAt: z.ZodOptional<z.ZodString>;
412
+ cancelledAt: z.ZodOptional<z.ZodString>;
413
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
414
+ USER: "USER";
415
+ POSITION_CLOSED: "POSITION_CLOSED";
416
+ SYSTEM: "SYSTEM";
417
+ }>>;
418
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
419
+ id: z.ZodUUID;
420
+ cloid: z.ZodOptional<z.ZodUUID>;
421
+ tradeAccountId: z.ZodUUID;
422
+ symbol: z.ZodString;
423
+ positionId: z.ZodUUID;
424
+ connector: z.ZodEnum<{
425
+ hyperliquid: "hyperliquid";
426
+ binanceusdm: "binanceusdm";
427
+ bybit: "bybit";
428
+ okx: "okx";
429
+ }>;
430
+ side: z.ZodEnum<{
431
+ BUY: "BUY";
432
+ SELL: "SELL";
433
+ }>;
434
+ reduceOnly: z.ZodBoolean;
435
+ quantity: z.ZodString;
436
+ price: z.ZodString;
437
+ usd: z.ZodString;
438
+ fee: z.ZodOptional<z.ZodString>;
439
+ timestamp: z.ZodString;
440
+ }, z.core.$strip>>>;
441
+ createdAt: z.ZodString;
442
+ updatedAt: z.ZodString;
443
+ intent: z.ZodLiteral<"CLOSE">;
444
+ type: z.ZodLiteral<"MARKET">;
445
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
446
+ type: z.ZodLiteral<"ratio_v1">;
447
+ data: z.ZodObject<{
448
+ priceSource: z.ZodEnum<{
449
+ mid: "mid";
450
+ mark: "mark";
451
+ }>;
452
+ symbol_a: z.ZodString;
453
+ symbol_b: z.ZodString;
454
+ direction: z.ZodEnum<{
455
+ ABOVE: "ABOVE";
456
+ BELOW: "BELOW";
457
+ }>;
458
+ threshold: z.ZodNumber;
459
+ }, z.core.$strip>;
460
+ }, z.core.$strip>, z.ZodObject<{
461
+ type: z.ZodLiteral<"price_v1">;
462
+ data: z.ZodObject<{
463
+ priceSource: z.ZodEnum<{
464
+ mid: "mid";
465
+ mark: "mark";
466
+ }>;
467
+ symbol: z.ZodString;
468
+ direction: z.ZodEnum<{
469
+ ABOVE: "ABOVE";
470
+ BELOW: "BELOW";
471
+ }>;
472
+ threshold: z.ZodNumber;
473
+ }, z.core.$strip>;
474
+ }, z.core.$strip>, z.ZodObject<{
475
+ type: z.ZodLiteral<"index_v1">;
476
+ data: z.ZodObject<{
477
+ priceSource: z.ZodEnum<{
478
+ mid: "mid";
479
+ mark: "mark";
480
+ }>;
481
+ basket: z.ZodArray<z.ZodObject<{
482
+ symbol: z.ZodString;
483
+ weight: z.ZodNumber;
484
+ }, z.core.$strip>>;
485
+ direction: z.ZodEnum<{
486
+ ABOVE: "ABOVE";
487
+ BELOW: "BELOW";
488
+ }>;
489
+ threshold: z.ZodNumber;
490
+ }, z.core.$strip>;
491
+ }, z.core.$strip>, z.ZodObject<{
492
+ type: z.ZodLiteral<"weighted_ratio_v1">;
493
+ data: z.ZodObject<{
494
+ priceSource: z.ZodEnum<{
495
+ mid: "mid";
496
+ mark: "mark";
497
+ }>;
498
+ basket: z.ZodArray<z.ZodObject<{
499
+ symbol: z.ZodString;
500
+ side: z.ZodEnum<{
501
+ BUY: "BUY";
502
+ SELL: "SELL";
503
+ }>;
504
+ weight: z.ZodNumber;
505
+ }, z.core.$strip>>;
506
+ direction: z.ZodEnum<{
507
+ ABOVE: "ABOVE";
508
+ BELOW: "BELOW";
509
+ }>;
510
+ threshold: z.ZodNumber;
511
+ }, z.core.$strip>;
512
+ }, z.core.$strip>, z.ZodObject<{
513
+ type: z.ZodLiteral<"position_value_v1">;
514
+ data: z.ZodObject<{
515
+ priceSource: z.ZodEnum<{
516
+ mid: "mid";
517
+ mark: "mark";
518
+ }>;
519
+ direction: z.ZodEnum<{
520
+ ABOVE: "ABOVE";
521
+ BELOW: "BELOW";
522
+ }>;
523
+ threshold: z.ZodNumber;
524
+ }, z.core.$strip>;
525
+ }, z.core.$strip>, z.ZodObject<{
526
+ type: z.ZodLiteral<"position_upnl_value_v1">;
527
+ data: z.ZodObject<{
528
+ priceSource: z.ZodEnum<{
529
+ mid: "mid";
530
+ mark: "mark";
531
+ }>;
532
+ direction: z.ZodEnum<{
533
+ ABOVE: "ABOVE";
534
+ BELOW: "BELOW";
535
+ }>;
536
+ threshold: z.ZodNumber;
537
+ }, z.core.$strip>;
538
+ }, z.core.$strip>, z.ZodObject<{
539
+ type: z.ZodLiteral<"position_upnl_percentage_v1">;
540
+ data: z.ZodObject<{
541
+ priceSource: z.ZodEnum<{
542
+ mid: "mid";
543
+ mark: "mark";
544
+ }>;
545
+ direction: z.ZodEnum<{
546
+ ABOVE: "ABOVE";
547
+ BELOW: "BELOW";
548
+ }>;
549
+ threshold_bps: z.ZodNumber;
550
+ }, z.core.$strip>;
551
+ }, z.core.$strip>], "type">;
552
+ context: z.ZodObject<{
553
+ type: z.ZodLiteral<"MARKET">;
554
+ position: z.ZodObject<{
555
+ id: z.ZodUUID;
556
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodString>;
557
+ }, z.core.$strip>;
558
+ }, z.core.$strip>;
559
+ }, z.core.$strip>;
560
+ export declare const TriggerMarket: z.ZodDiscriminatedUnion<[z.ZodObject<{
561
+ id: z.ZodUUID;
562
+ tradeAccountId: z.ZodUUID;
563
+ connector: z.ZodEnum<{
564
+ hyperliquid: "hyperliquid";
565
+ binanceusdm: "binanceusdm";
566
+ bybit: "bybit";
567
+ okx: "okx";
568
+ }>;
569
+ status: z.ZodEnum<{
570
+ CANCELLED: "CANCELLED";
571
+ ACTIVE: "ACTIVE";
572
+ TRIGGERED: "TRIGGERED";
573
+ }>;
574
+ triggeredAt: z.ZodOptional<z.ZodString>;
575
+ cancelledAt: z.ZodOptional<z.ZodString>;
576
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
577
+ USER: "USER";
578
+ POSITION_CLOSED: "POSITION_CLOSED";
579
+ SYSTEM: "SYSTEM";
580
+ }>>;
581
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
582
+ id: z.ZodUUID;
583
+ cloid: z.ZodOptional<z.ZodUUID>;
584
+ tradeAccountId: z.ZodUUID;
585
+ symbol: z.ZodString;
586
+ positionId: z.ZodUUID;
587
+ connector: z.ZodEnum<{
588
+ hyperliquid: "hyperliquid";
589
+ binanceusdm: "binanceusdm";
590
+ bybit: "bybit";
591
+ okx: "okx";
592
+ }>;
593
+ side: z.ZodEnum<{
594
+ BUY: "BUY";
595
+ SELL: "SELL";
596
+ }>;
597
+ reduceOnly: z.ZodBoolean;
598
+ quantity: z.ZodString;
599
+ price: z.ZodString;
600
+ usd: z.ZodString;
601
+ fee: z.ZodOptional<z.ZodString>;
602
+ timestamp: z.ZodString;
603
+ }, z.core.$strip>>>;
604
+ createdAt: z.ZodString;
605
+ updatedAt: z.ZodString;
606
+ intent: z.ZodLiteral<"OPEN">;
607
+ type: z.ZodLiteral<"MARKET">;
608
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
609
+ type: z.ZodLiteral<"ratio_v1">;
610
+ data: z.ZodObject<{
611
+ priceSource: z.ZodEnum<{
612
+ mid: "mid";
613
+ mark: "mark";
614
+ }>;
615
+ symbol_a: z.ZodString;
616
+ symbol_b: z.ZodString;
617
+ direction: z.ZodEnum<{
618
+ ABOVE: "ABOVE";
619
+ BELOW: "BELOW";
620
+ }>;
621
+ threshold: z.ZodNumber;
622
+ }, z.core.$strip>;
623
+ }, z.core.$strip>, z.ZodObject<{
624
+ type: z.ZodLiteral<"price_v1">;
625
+ data: z.ZodObject<{
626
+ priceSource: z.ZodEnum<{
627
+ mid: "mid";
628
+ mark: "mark";
629
+ }>;
630
+ symbol: z.ZodString;
631
+ direction: z.ZodEnum<{
632
+ ABOVE: "ABOVE";
633
+ BELOW: "BELOW";
634
+ }>;
635
+ threshold: z.ZodNumber;
636
+ }, z.core.$strip>;
637
+ }, z.core.$strip>, z.ZodObject<{
638
+ type: z.ZodLiteral<"index_v1">;
639
+ data: z.ZodObject<{
640
+ priceSource: z.ZodEnum<{
641
+ mid: "mid";
642
+ mark: "mark";
643
+ }>;
644
+ basket: z.ZodArray<z.ZodObject<{
645
+ symbol: z.ZodString;
646
+ weight: z.ZodNumber;
647
+ }, z.core.$strip>>;
648
+ direction: z.ZodEnum<{
649
+ ABOVE: "ABOVE";
650
+ BELOW: "BELOW";
651
+ }>;
652
+ threshold: z.ZodNumber;
653
+ }, z.core.$strip>;
654
+ }, z.core.$strip>, z.ZodObject<{
655
+ type: z.ZodLiteral<"weighted_ratio_v1">;
656
+ data: z.ZodObject<{
657
+ priceSource: z.ZodEnum<{
658
+ mid: "mid";
659
+ mark: "mark";
660
+ }>;
661
+ basket: z.ZodArray<z.ZodObject<{
662
+ symbol: z.ZodString;
663
+ side: z.ZodEnum<{
664
+ BUY: "BUY";
665
+ SELL: "SELL";
666
+ }>;
667
+ weight: z.ZodNumber;
668
+ }, z.core.$strip>>;
669
+ direction: z.ZodEnum<{
670
+ ABOVE: "ABOVE";
671
+ BELOW: "BELOW";
672
+ }>;
673
+ threshold: z.ZodNumber;
674
+ }, z.core.$strip>;
675
+ }, z.core.$strip>], "type">;
676
+ context: z.ZodObject<{
677
+ type: z.ZodLiteral<"MARKET">;
678
+ legs: z.ZodTuple<[z.ZodObject<{
679
+ symbol: z.ZodString;
680
+ side: z.ZodEnum<{
681
+ BUY: "BUY";
682
+ SELL: "SELL";
683
+ }>;
684
+ mode: z.ZodEnum<{
685
+ QUANTITY: "QUANTITY";
686
+ USD: "USD";
687
+ }>;
688
+ amount: z.ZodString;
689
+ }, z.core.$strip>], z.ZodObject<{
690
+ symbol: z.ZodString;
691
+ side: z.ZodEnum<{
692
+ BUY: "BUY";
693
+ SELL: "SELL";
694
+ }>;
695
+ mode: z.ZodEnum<{
696
+ QUANTITY: "QUANTITY";
697
+ USD: "USD";
698
+ }>;
699
+ amount: z.ZodString;
700
+ }, z.core.$strip>>;
701
+ }, z.core.$strip>;
702
+ }, z.core.$strip>, z.ZodObject<{
703
+ id: z.ZodUUID;
704
+ tradeAccountId: z.ZodUUID;
705
+ connector: z.ZodEnum<{
706
+ hyperliquid: "hyperliquid";
707
+ binanceusdm: "binanceusdm";
708
+ bybit: "bybit";
709
+ okx: "okx";
710
+ }>;
711
+ status: z.ZodEnum<{
712
+ CANCELLED: "CANCELLED";
713
+ ACTIVE: "ACTIVE";
714
+ TRIGGERED: "TRIGGERED";
715
+ }>;
716
+ triggeredAt: z.ZodOptional<z.ZodString>;
717
+ cancelledAt: z.ZodOptional<z.ZodString>;
718
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
719
+ USER: "USER";
720
+ POSITION_CLOSED: "POSITION_CLOSED";
721
+ SYSTEM: "SYSTEM";
722
+ }>>;
723
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
724
+ id: z.ZodUUID;
725
+ cloid: z.ZodOptional<z.ZodUUID>;
726
+ tradeAccountId: z.ZodUUID;
727
+ symbol: z.ZodString;
728
+ positionId: z.ZodUUID;
729
+ connector: z.ZodEnum<{
730
+ hyperliquid: "hyperliquid";
731
+ binanceusdm: "binanceusdm";
732
+ bybit: "bybit";
733
+ okx: "okx";
734
+ }>;
735
+ side: z.ZodEnum<{
736
+ BUY: "BUY";
737
+ SELL: "SELL";
738
+ }>;
739
+ reduceOnly: z.ZodBoolean;
740
+ quantity: z.ZodString;
741
+ price: z.ZodString;
742
+ usd: z.ZodString;
743
+ fee: z.ZodOptional<z.ZodString>;
744
+ timestamp: z.ZodString;
745
+ }, z.core.$strip>>>;
746
+ createdAt: z.ZodString;
747
+ updatedAt: z.ZodString;
748
+ intent: z.ZodLiteral<"ADJUST">;
749
+ type: z.ZodLiteral<"MARKET">;
750
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
751
+ type: z.ZodLiteral<"ratio_v1">;
752
+ data: z.ZodObject<{
753
+ priceSource: z.ZodEnum<{
754
+ mid: "mid";
755
+ mark: "mark";
756
+ }>;
757
+ symbol_a: z.ZodString;
758
+ symbol_b: z.ZodString;
759
+ direction: z.ZodEnum<{
760
+ ABOVE: "ABOVE";
761
+ BELOW: "BELOW";
762
+ }>;
763
+ threshold: z.ZodNumber;
764
+ }, z.core.$strip>;
765
+ }, z.core.$strip>, z.ZodObject<{
766
+ type: z.ZodLiteral<"price_v1">;
767
+ data: z.ZodObject<{
768
+ priceSource: z.ZodEnum<{
769
+ mid: "mid";
770
+ mark: "mark";
771
+ }>;
772
+ symbol: z.ZodString;
773
+ direction: z.ZodEnum<{
774
+ ABOVE: "ABOVE";
775
+ BELOW: "BELOW";
776
+ }>;
777
+ threshold: z.ZodNumber;
778
+ }, z.core.$strip>;
779
+ }, z.core.$strip>, z.ZodObject<{
780
+ type: z.ZodLiteral<"index_v1">;
781
+ data: z.ZodObject<{
782
+ priceSource: z.ZodEnum<{
783
+ mid: "mid";
784
+ mark: "mark";
785
+ }>;
786
+ basket: z.ZodArray<z.ZodObject<{
787
+ symbol: z.ZodString;
788
+ weight: z.ZodNumber;
789
+ }, z.core.$strip>>;
790
+ direction: z.ZodEnum<{
791
+ ABOVE: "ABOVE";
792
+ BELOW: "BELOW";
793
+ }>;
794
+ threshold: z.ZodNumber;
795
+ }, z.core.$strip>;
796
+ }, z.core.$strip>, z.ZodObject<{
797
+ type: z.ZodLiteral<"weighted_ratio_v1">;
798
+ data: z.ZodObject<{
799
+ priceSource: z.ZodEnum<{
800
+ mid: "mid";
801
+ mark: "mark";
802
+ }>;
803
+ basket: z.ZodArray<z.ZodObject<{
804
+ symbol: z.ZodString;
805
+ side: z.ZodEnum<{
806
+ BUY: "BUY";
807
+ SELL: "SELL";
808
+ }>;
809
+ weight: z.ZodNumber;
810
+ }, z.core.$strip>>;
811
+ direction: z.ZodEnum<{
812
+ ABOVE: "ABOVE";
813
+ BELOW: "BELOW";
814
+ }>;
815
+ threshold: z.ZodNumber;
816
+ }, z.core.$strip>;
817
+ }, z.core.$strip>, z.ZodObject<{
818
+ type: z.ZodLiteral<"position_value_v1">;
819
+ data: z.ZodObject<{
820
+ priceSource: z.ZodEnum<{
821
+ mid: "mid";
822
+ mark: "mark";
823
+ }>;
824
+ direction: z.ZodEnum<{
825
+ ABOVE: "ABOVE";
826
+ BELOW: "BELOW";
827
+ }>;
828
+ threshold: z.ZodNumber;
829
+ }, z.core.$strip>;
830
+ }, z.core.$strip>, z.ZodObject<{
831
+ type: z.ZodLiteral<"position_upnl_value_v1">;
832
+ data: z.ZodObject<{
833
+ priceSource: z.ZodEnum<{
834
+ mid: "mid";
835
+ mark: "mark";
836
+ }>;
837
+ direction: z.ZodEnum<{
838
+ ABOVE: "ABOVE";
839
+ BELOW: "BELOW";
840
+ }>;
841
+ threshold: z.ZodNumber;
842
+ }, z.core.$strip>;
843
+ }, z.core.$strip>, z.ZodObject<{
844
+ type: z.ZodLiteral<"position_upnl_percentage_v1">;
845
+ data: z.ZodObject<{
846
+ priceSource: z.ZodEnum<{
847
+ mid: "mid";
848
+ mark: "mark";
849
+ }>;
850
+ direction: z.ZodEnum<{
851
+ ABOVE: "ABOVE";
852
+ BELOW: "BELOW";
853
+ }>;
854
+ threshold_bps: z.ZodNumber;
855
+ }, z.core.$strip>;
856
+ }, z.core.$strip>], "type">;
857
+ context: z.ZodObject<{
858
+ type: z.ZodLiteral<"MARKET">;
859
+ position: z.ZodObject<{
860
+ id: z.ZodUUID;
861
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodString>;
862
+ }, z.core.$strip>;
863
+ legs: z.ZodTuple<[z.ZodObject<{
864
+ symbol: z.ZodString;
865
+ side: z.ZodEnum<{
866
+ BUY: "BUY";
867
+ SELL: "SELL";
868
+ }>;
869
+ mode: z.ZodEnum<{
870
+ QUANTITY: "QUANTITY";
871
+ USD: "USD";
872
+ }>;
873
+ amount: z.ZodString;
874
+ reduceOnly: z.ZodBoolean;
875
+ }, z.core.$strip>], z.ZodObject<{
876
+ symbol: z.ZodString;
877
+ side: z.ZodEnum<{
878
+ BUY: "BUY";
879
+ SELL: "SELL";
880
+ }>;
881
+ mode: z.ZodEnum<{
882
+ QUANTITY: "QUANTITY";
883
+ USD: "USD";
884
+ }>;
885
+ amount: z.ZodString;
886
+ reduceOnly: z.ZodBoolean;
887
+ }, z.core.$strip>>;
888
+ }, z.core.$strip>;
889
+ }, z.core.$strip>, z.ZodObject<{
890
+ id: z.ZodUUID;
891
+ tradeAccountId: z.ZodUUID;
892
+ connector: z.ZodEnum<{
893
+ hyperliquid: "hyperliquid";
894
+ binanceusdm: "binanceusdm";
895
+ bybit: "bybit";
896
+ okx: "okx";
897
+ }>;
898
+ status: z.ZodEnum<{
899
+ CANCELLED: "CANCELLED";
900
+ ACTIVE: "ACTIVE";
901
+ TRIGGERED: "TRIGGERED";
902
+ }>;
903
+ triggeredAt: z.ZodOptional<z.ZodString>;
904
+ cancelledAt: z.ZodOptional<z.ZodString>;
905
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
906
+ USER: "USER";
907
+ POSITION_CLOSED: "POSITION_CLOSED";
908
+ SYSTEM: "SYSTEM";
909
+ }>>;
910
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
911
+ id: z.ZodUUID;
912
+ cloid: z.ZodOptional<z.ZodUUID>;
913
+ tradeAccountId: z.ZodUUID;
914
+ symbol: z.ZodString;
915
+ positionId: z.ZodUUID;
916
+ connector: z.ZodEnum<{
917
+ hyperliquid: "hyperliquid";
918
+ binanceusdm: "binanceusdm";
919
+ bybit: "bybit";
920
+ okx: "okx";
921
+ }>;
922
+ side: z.ZodEnum<{
923
+ BUY: "BUY";
924
+ SELL: "SELL";
925
+ }>;
926
+ reduceOnly: z.ZodBoolean;
927
+ quantity: z.ZodString;
928
+ price: z.ZodString;
929
+ usd: z.ZodString;
930
+ fee: z.ZodOptional<z.ZodString>;
931
+ timestamp: z.ZodString;
932
+ }, z.core.$strip>>>;
933
+ createdAt: z.ZodString;
934
+ updatedAt: z.ZodString;
935
+ intent: z.ZodLiteral<"CLOSE">;
936
+ type: z.ZodLiteral<"MARKET">;
937
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
938
+ type: z.ZodLiteral<"ratio_v1">;
939
+ data: z.ZodObject<{
940
+ priceSource: z.ZodEnum<{
941
+ mid: "mid";
942
+ mark: "mark";
943
+ }>;
944
+ symbol_a: z.ZodString;
945
+ symbol_b: z.ZodString;
946
+ direction: z.ZodEnum<{
947
+ ABOVE: "ABOVE";
948
+ BELOW: "BELOW";
949
+ }>;
950
+ threshold: z.ZodNumber;
951
+ }, z.core.$strip>;
952
+ }, z.core.$strip>, z.ZodObject<{
953
+ type: z.ZodLiteral<"price_v1">;
954
+ data: z.ZodObject<{
955
+ priceSource: z.ZodEnum<{
956
+ mid: "mid";
957
+ mark: "mark";
958
+ }>;
959
+ symbol: z.ZodString;
960
+ direction: z.ZodEnum<{
961
+ ABOVE: "ABOVE";
962
+ BELOW: "BELOW";
963
+ }>;
964
+ threshold: z.ZodNumber;
965
+ }, z.core.$strip>;
966
+ }, z.core.$strip>, z.ZodObject<{
967
+ type: z.ZodLiteral<"index_v1">;
968
+ data: z.ZodObject<{
969
+ priceSource: z.ZodEnum<{
970
+ mid: "mid";
971
+ mark: "mark";
972
+ }>;
973
+ basket: z.ZodArray<z.ZodObject<{
974
+ symbol: z.ZodString;
975
+ weight: z.ZodNumber;
976
+ }, z.core.$strip>>;
977
+ direction: z.ZodEnum<{
978
+ ABOVE: "ABOVE";
979
+ BELOW: "BELOW";
980
+ }>;
981
+ threshold: z.ZodNumber;
982
+ }, z.core.$strip>;
983
+ }, z.core.$strip>, z.ZodObject<{
984
+ type: z.ZodLiteral<"weighted_ratio_v1">;
985
+ data: z.ZodObject<{
986
+ priceSource: z.ZodEnum<{
987
+ mid: "mid";
988
+ mark: "mark";
989
+ }>;
990
+ basket: z.ZodArray<z.ZodObject<{
991
+ symbol: z.ZodString;
992
+ side: z.ZodEnum<{
993
+ BUY: "BUY";
994
+ SELL: "SELL";
995
+ }>;
996
+ weight: z.ZodNumber;
997
+ }, z.core.$strip>>;
998
+ direction: z.ZodEnum<{
999
+ ABOVE: "ABOVE";
1000
+ BELOW: "BELOW";
1001
+ }>;
1002
+ threshold: z.ZodNumber;
1003
+ }, z.core.$strip>;
1004
+ }, z.core.$strip>, z.ZodObject<{
1005
+ type: z.ZodLiteral<"position_value_v1">;
1006
+ data: z.ZodObject<{
1007
+ priceSource: z.ZodEnum<{
1008
+ mid: "mid";
1009
+ mark: "mark";
1010
+ }>;
1011
+ direction: z.ZodEnum<{
1012
+ ABOVE: "ABOVE";
1013
+ BELOW: "BELOW";
1014
+ }>;
1015
+ threshold: z.ZodNumber;
1016
+ }, z.core.$strip>;
1017
+ }, z.core.$strip>, z.ZodObject<{
1018
+ type: z.ZodLiteral<"position_upnl_value_v1">;
1019
+ data: z.ZodObject<{
1020
+ priceSource: z.ZodEnum<{
1021
+ mid: "mid";
1022
+ mark: "mark";
1023
+ }>;
1024
+ direction: z.ZodEnum<{
1025
+ ABOVE: "ABOVE";
1026
+ BELOW: "BELOW";
1027
+ }>;
1028
+ threshold: z.ZodNumber;
1029
+ }, z.core.$strip>;
1030
+ }, z.core.$strip>, z.ZodObject<{
1031
+ type: z.ZodLiteral<"position_upnl_percentage_v1">;
1032
+ data: z.ZodObject<{
1033
+ priceSource: z.ZodEnum<{
1034
+ mid: "mid";
1035
+ mark: "mark";
1036
+ }>;
1037
+ direction: z.ZodEnum<{
1038
+ ABOVE: "ABOVE";
1039
+ BELOW: "BELOW";
1040
+ }>;
1041
+ threshold_bps: z.ZodNumber;
1042
+ }, z.core.$strip>;
1043
+ }, z.core.$strip>], "type">;
1044
+ context: z.ZodObject<{
1045
+ type: z.ZodLiteral<"MARKET">;
1046
+ position: z.ZodObject<{
1047
+ id: z.ZodUUID;
1048
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodString>;
1049
+ }, z.core.$strip>;
1050
+ }, z.core.$strip>;
1051
+ }, z.core.$strip>], "intent">;
1052
+ export declare const Trigger: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
1053
+ id: z.ZodUUID;
1054
+ tradeAccountId: z.ZodUUID;
1055
+ connector: z.ZodEnum<{
1056
+ hyperliquid: "hyperliquid";
1057
+ binanceusdm: "binanceusdm";
1058
+ bybit: "bybit";
1059
+ okx: "okx";
1060
+ }>;
1061
+ status: z.ZodEnum<{
1062
+ CANCELLED: "CANCELLED";
1063
+ ACTIVE: "ACTIVE";
1064
+ TRIGGERED: "TRIGGERED";
1065
+ }>;
1066
+ triggeredAt: z.ZodOptional<z.ZodString>;
1067
+ cancelledAt: z.ZodOptional<z.ZodString>;
1068
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
1069
+ USER: "USER";
1070
+ POSITION_CLOSED: "POSITION_CLOSED";
1071
+ SYSTEM: "SYSTEM";
1072
+ }>>;
1073
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1074
+ id: z.ZodUUID;
1075
+ cloid: z.ZodOptional<z.ZodUUID>;
1076
+ tradeAccountId: z.ZodUUID;
1077
+ symbol: z.ZodString;
1078
+ positionId: z.ZodUUID;
1079
+ connector: z.ZodEnum<{
1080
+ hyperliquid: "hyperliquid";
1081
+ binanceusdm: "binanceusdm";
1082
+ bybit: "bybit";
1083
+ okx: "okx";
1084
+ }>;
1085
+ side: z.ZodEnum<{
1086
+ BUY: "BUY";
1087
+ SELL: "SELL";
1088
+ }>;
1089
+ reduceOnly: z.ZodBoolean;
1090
+ quantity: z.ZodString;
1091
+ price: z.ZodString;
1092
+ usd: z.ZodString;
1093
+ fee: z.ZodOptional<z.ZodString>;
1094
+ timestamp: z.ZodString;
1095
+ }, z.core.$strip>>>;
1096
+ createdAt: z.ZodString;
1097
+ updatedAt: z.ZodString;
1098
+ intent: z.ZodLiteral<"OPEN">;
1099
+ type: z.ZodLiteral<"MARKET">;
1100
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1101
+ type: z.ZodLiteral<"ratio_v1">;
1102
+ data: z.ZodObject<{
1103
+ priceSource: z.ZodEnum<{
1104
+ mid: "mid";
1105
+ mark: "mark";
1106
+ }>;
1107
+ symbol_a: z.ZodString;
1108
+ symbol_b: z.ZodString;
1109
+ direction: z.ZodEnum<{
1110
+ ABOVE: "ABOVE";
1111
+ BELOW: "BELOW";
1112
+ }>;
1113
+ threshold: z.ZodNumber;
1114
+ }, z.core.$strip>;
1115
+ }, z.core.$strip>, z.ZodObject<{
1116
+ type: z.ZodLiteral<"price_v1">;
1117
+ data: z.ZodObject<{
1118
+ priceSource: z.ZodEnum<{
1119
+ mid: "mid";
1120
+ mark: "mark";
1121
+ }>;
1122
+ symbol: z.ZodString;
1123
+ direction: z.ZodEnum<{
1124
+ ABOVE: "ABOVE";
1125
+ BELOW: "BELOW";
1126
+ }>;
1127
+ threshold: z.ZodNumber;
1128
+ }, z.core.$strip>;
1129
+ }, z.core.$strip>, z.ZodObject<{
1130
+ type: z.ZodLiteral<"index_v1">;
1131
+ data: z.ZodObject<{
1132
+ priceSource: z.ZodEnum<{
1133
+ mid: "mid";
1134
+ mark: "mark";
1135
+ }>;
1136
+ basket: z.ZodArray<z.ZodObject<{
1137
+ symbol: z.ZodString;
1138
+ weight: z.ZodNumber;
1139
+ }, z.core.$strip>>;
1140
+ direction: z.ZodEnum<{
1141
+ ABOVE: "ABOVE";
1142
+ BELOW: "BELOW";
1143
+ }>;
1144
+ threshold: z.ZodNumber;
1145
+ }, z.core.$strip>;
1146
+ }, z.core.$strip>, z.ZodObject<{
1147
+ type: z.ZodLiteral<"weighted_ratio_v1">;
1148
+ data: z.ZodObject<{
1149
+ priceSource: z.ZodEnum<{
1150
+ mid: "mid";
1151
+ mark: "mark";
1152
+ }>;
1153
+ basket: z.ZodArray<z.ZodObject<{
1154
+ symbol: z.ZodString;
1155
+ side: z.ZodEnum<{
1156
+ BUY: "BUY";
1157
+ SELL: "SELL";
1158
+ }>;
1159
+ weight: z.ZodNumber;
1160
+ }, z.core.$strip>>;
1161
+ direction: z.ZodEnum<{
1162
+ ABOVE: "ABOVE";
1163
+ BELOW: "BELOW";
1164
+ }>;
1165
+ threshold: z.ZodNumber;
1166
+ }, z.core.$strip>;
1167
+ }, z.core.$strip>], "type">;
1168
+ context: z.ZodObject<{
1169
+ type: z.ZodLiteral<"MARKET">;
1170
+ legs: z.ZodTuple<[z.ZodObject<{
1171
+ symbol: z.ZodString;
1172
+ side: z.ZodEnum<{
1173
+ BUY: "BUY";
1174
+ SELL: "SELL";
1175
+ }>;
1176
+ mode: z.ZodEnum<{
1177
+ QUANTITY: "QUANTITY";
1178
+ USD: "USD";
1179
+ }>;
1180
+ amount: z.ZodString;
1181
+ }, z.core.$strip>], z.ZodObject<{
1182
+ symbol: z.ZodString;
1183
+ side: z.ZodEnum<{
1184
+ BUY: "BUY";
1185
+ SELL: "SELL";
1186
+ }>;
1187
+ mode: z.ZodEnum<{
1188
+ QUANTITY: "QUANTITY";
1189
+ USD: "USD";
1190
+ }>;
1191
+ amount: z.ZodString;
1192
+ }, z.core.$strip>>;
1193
+ }, z.core.$strip>;
1194
+ }, z.core.$strip>, z.ZodObject<{
1195
+ id: z.ZodUUID;
1196
+ tradeAccountId: z.ZodUUID;
1197
+ connector: z.ZodEnum<{
1198
+ hyperliquid: "hyperliquid";
1199
+ binanceusdm: "binanceusdm";
1200
+ bybit: "bybit";
1201
+ okx: "okx";
1202
+ }>;
1203
+ status: z.ZodEnum<{
1204
+ CANCELLED: "CANCELLED";
1205
+ ACTIVE: "ACTIVE";
1206
+ TRIGGERED: "TRIGGERED";
1207
+ }>;
1208
+ triggeredAt: z.ZodOptional<z.ZodString>;
1209
+ cancelledAt: z.ZodOptional<z.ZodString>;
1210
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
1211
+ USER: "USER";
1212
+ POSITION_CLOSED: "POSITION_CLOSED";
1213
+ SYSTEM: "SYSTEM";
1214
+ }>>;
1215
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1216
+ id: z.ZodUUID;
1217
+ cloid: z.ZodOptional<z.ZodUUID>;
1218
+ tradeAccountId: z.ZodUUID;
1219
+ symbol: z.ZodString;
1220
+ positionId: z.ZodUUID;
1221
+ connector: z.ZodEnum<{
1222
+ hyperliquid: "hyperliquid";
1223
+ binanceusdm: "binanceusdm";
1224
+ bybit: "bybit";
1225
+ okx: "okx";
1226
+ }>;
1227
+ side: z.ZodEnum<{
1228
+ BUY: "BUY";
1229
+ SELL: "SELL";
1230
+ }>;
1231
+ reduceOnly: z.ZodBoolean;
1232
+ quantity: z.ZodString;
1233
+ price: z.ZodString;
1234
+ usd: z.ZodString;
1235
+ fee: z.ZodOptional<z.ZodString>;
1236
+ timestamp: z.ZodString;
1237
+ }, z.core.$strip>>>;
1238
+ createdAt: z.ZodString;
1239
+ updatedAt: z.ZodString;
1240
+ intent: z.ZodLiteral<"ADJUST">;
1241
+ type: z.ZodLiteral<"MARKET">;
1242
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1243
+ type: z.ZodLiteral<"ratio_v1">;
1244
+ data: z.ZodObject<{
1245
+ priceSource: z.ZodEnum<{
1246
+ mid: "mid";
1247
+ mark: "mark";
1248
+ }>;
1249
+ symbol_a: z.ZodString;
1250
+ symbol_b: z.ZodString;
1251
+ direction: z.ZodEnum<{
1252
+ ABOVE: "ABOVE";
1253
+ BELOW: "BELOW";
1254
+ }>;
1255
+ threshold: z.ZodNumber;
1256
+ }, z.core.$strip>;
1257
+ }, z.core.$strip>, z.ZodObject<{
1258
+ type: z.ZodLiteral<"price_v1">;
1259
+ data: z.ZodObject<{
1260
+ priceSource: z.ZodEnum<{
1261
+ mid: "mid";
1262
+ mark: "mark";
1263
+ }>;
1264
+ symbol: z.ZodString;
1265
+ direction: z.ZodEnum<{
1266
+ ABOVE: "ABOVE";
1267
+ BELOW: "BELOW";
1268
+ }>;
1269
+ threshold: z.ZodNumber;
1270
+ }, z.core.$strip>;
1271
+ }, z.core.$strip>, z.ZodObject<{
1272
+ type: z.ZodLiteral<"index_v1">;
1273
+ data: z.ZodObject<{
1274
+ priceSource: z.ZodEnum<{
1275
+ mid: "mid";
1276
+ mark: "mark";
1277
+ }>;
1278
+ basket: z.ZodArray<z.ZodObject<{
1279
+ symbol: z.ZodString;
1280
+ weight: z.ZodNumber;
1281
+ }, z.core.$strip>>;
1282
+ direction: z.ZodEnum<{
1283
+ ABOVE: "ABOVE";
1284
+ BELOW: "BELOW";
1285
+ }>;
1286
+ threshold: z.ZodNumber;
1287
+ }, z.core.$strip>;
1288
+ }, z.core.$strip>, z.ZodObject<{
1289
+ type: z.ZodLiteral<"weighted_ratio_v1">;
1290
+ data: z.ZodObject<{
1291
+ priceSource: z.ZodEnum<{
1292
+ mid: "mid";
1293
+ mark: "mark";
1294
+ }>;
1295
+ basket: z.ZodArray<z.ZodObject<{
1296
+ symbol: z.ZodString;
1297
+ side: z.ZodEnum<{
1298
+ BUY: "BUY";
1299
+ SELL: "SELL";
1300
+ }>;
1301
+ weight: z.ZodNumber;
1302
+ }, z.core.$strip>>;
1303
+ direction: z.ZodEnum<{
1304
+ ABOVE: "ABOVE";
1305
+ BELOW: "BELOW";
1306
+ }>;
1307
+ threshold: z.ZodNumber;
1308
+ }, z.core.$strip>;
1309
+ }, z.core.$strip>, z.ZodObject<{
1310
+ type: z.ZodLiteral<"position_value_v1">;
1311
+ data: z.ZodObject<{
1312
+ priceSource: z.ZodEnum<{
1313
+ mid: "mid";
1314
+ mark: "mark";
1315
+ }>;
1316
+ direction: z.ZodEnum<{
1317
+ ABOVE: "ABOVE";
1318
+ BELOW: "BELOW";
1319
+ }>;
1320
+ threshold: z.ZodNumber;
1321
+ }, z.core.$strip>;
1322
+ }, z.core.$strip>, z.ZodObject<{
1323
+ type: z.ZodLiteral<"position_upnl_value_v1">;
1324
+ data: z.ZodObject<{
1325
+ priceSource: z.ZodEnum<{
1326
+ mid: "mid";
1327
+ mark: "mark";
1328
+ }>;
1329
+ direction: z.ZodEnum<{
1330
+ ABOVE: "ABOVE";
1331
+ BELOW: "BELOW";
1332
+ }>;
1333
+ threshold: z.ZodNumber;
1334
+ }, z.core.$strip>;
1335
+ }, z.core.$strip>, z.ZodObject<{
1336
+ type: z.ZodLiteral<"position_upnl_percentage_v1">;
1337
+ data: z.ZodObject<{
1338
+ priceSource: z.ZodEnum<{
1339
+ mid: "mid";
1340
+ mark: "mark";
1341
+ }>;
1342
+ direction: z.ZodEnum<{
1343
+ ABOVE: "ABOVE";
1344
+ BELOW: "BELOW";
1345
+ }>;
1346
+ threshold_bps: z.ZodNumber;
1347
+ }, z.core.$strip>;
1348
+ }, z.core.$strip>], "type">;
1349
+ context: z.ZodObject<{
1350
+ type: z.ZodLiteral<"MARKET">;
1351
+ position: z.ZodObject<{
1352
+ id: z.ZodUUID;
1353
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodString>;
1354
+ }, z.core.$strip>;
1355
+ legs: z.ZodTuple<[z.ZodObject<{
1356
+ symbol: z.ZodString;
1357
+ side: z.ZodEnum<{
1358
+ BUY: "BUY";
1359
+ SELL: "SELL";
1360
+ }>;
1361
+ mode: z.ZodEnum<{
1362
+ QUANTITY: "QUANTITY";
1363
+ USD: "USD";
1364
+ }>;
1365
+ amount: z.ZodString;
1366
+ reduceOnly: z.ZodBoolean;
1367
+ }, z.core.$strip>], z.ZodObject<{
1368
+ symbol: z.ZodString;
1369
+ side: z.ZodEnum<{
1370
+ BUY: "BUY";
1371
+ SELL: "SELL";
1372
+ }>;
1373
+ mode: z.ZodEnum<{
1374
+ QUANTITY: "QUANTITY";
1375
+ USD: "USD";
1376
+ }>;
1377
+ amount: z.ZodString;
1378
+ reduceOnly: z.ZodBoolean;
1379
+ }, z.core.$strip>>;
1380
+ }, z.core.$strip>;
1381
+ }, z.core.$strip>, z.ZodObject<{
1382
+ id: z.ZodUUID;
1383
+ tradeAccountId: z.ZodUUID;
1384
+ connector: z.ZodEnum<{
1385
+ hyperliquid: "hyperliquid";
1386
+ binanceusdm: "binanceusdm";
1387
+ bybit: "bybit";
1388
+ okx: "okx";
1389
+ }>;
1390
+ status: z.ZodEnum<{
1391
+ CANCELLED: "CANCELLED";
1392
+ ACTIVE: "ACTIVE";
1393
+ TRIGGERED: "TRIGGERED";
1394
+ }>;
1395
+ triggeredAt: z.ZodOptional<z.ZodString>;
1396
+ cancelledAt: z.ZodOptional<z.ZodString>;
1397
+ cancelledReason: z.ZodOptional<z.ZodEnum<{
1398
+ USER: "USER";
1399
+ POSITION_CLOSED: "POSITION_CLOSED";
1400
+ SYSTEM: "SYSTEM";
1401
+ }>>;
1402
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
1403
+ id: z.ZodUUID;
1404
+ cloid: z.ZodOptional<z.ZodUUID>;
1405
+ tradeAccountId: z.ZodUUID;
1406
+ symbol: z.ZodString;
1407
+ positionId: z.ZodUUID;
1408
+ connector: z.ZodEnum<{
1409
+ hyperliquid: "hyperliquid";
1410
+ binanceusdm: "binanceusdm";
1411
+ bybit: "bybit";
1412
+ okx: "okx";
1413
+ }>;
1414
+ side: z.ZodEnum<{
1415
+ BUY: "BUY";
1416
+ SELL: "SELL";
1417
+ }>;
1418
+ reduceOnly: z.ZodBoolean;
1419
+ quantity: z.ZodString;
1420
+ price: z.ZodString;
1421
+ usd: z.ZodString;
1422
+ fee: z.ZodOptional<z.ZodString>;
1423
+ timestamp: z.ZodString;
1424
+ }, z.core.$strip>>>;
1425
+ createdAt: z.ZodString;
1426
+ updatedAt: z.ZodString;
1427
+ intent: z.ZodLiteral<"CLOSE">;
1428
+ type: z.ZodLiteral<"MARKET">;
1429
+ condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
1430
+ type: z.ZodLiteral<"ratio_v1">;
1431
+ data: z.ZodObject<{
1432
+ priceSource: z.ZodEnum<{
1433
+ mid: "mid";
1434
+ mark: "mark";
1435
+ }>;
1436
+ symbol_a: z.ZodString;
1437
+ symbol_b: z.ZodString;
1438
+ direction: z.ZodEnum<{
1439
+ ABOVE: "ABOVE";
1440
+ BELOW: "BELOW";
1441
+ }>;
1442
+ threshold: z.ZodNumber;
1443
+ }, z.core.$strip>;
1444
+ }, z.core.$strip>, z.ZodObject<{
1445
+ type: z.ZodLiteral<"price_v1">;
1446
+ data: z.ZodObject<{
1447
+ priceSource: z.ZodEnum<{
1448
+ mid: "mid";
1449
+ mark: "mark";
1450
+ }>;
1451
+ symbol: z.ZodString;
1452
+ direction: z.ZodEnum<{
1453
+ ABOVE: "ABOVE";
1454
+ BELOW: "BELOW";
1455
+ }>;
1456
+ threshold: z.ZodNumber;
1457
+ }, z.core.$strip>;
1458
+ }, z.core.$strip>, z.ZodObject<{
1459
+ type: z.ZodLiteral<"index_v1">;
1460
+ data: z.ZodObject<{
1461
+ priceSource: z.ZodEnum<{
1462
+ mid: "mid";
1463
+ mark: "mark";
1464
+ }>;
1465
+ basket: z.ZodArray<z.ZodObject<{
1466
+ symbol: z.ZodString;
1467
+ weight: z.ZodNumber;
1468
+ }, z.core.$strip>>;
1469
+ direction: z.ZodEnum<{
1470
+ ABOVE: "ABOVE";
1471
+ BELOW: "BELOW";
1472
+ }>;
1473
+ threshold: z.ZodNumber;
1474
+ }, z.core.$strip>;
1475
+ }, z.core.$strip>, z.ZodObject<{
1476
+ type: z.ZodLiteral<"weighted_ratio_v1">;
1477
+ data: z.ZodObject<{
1478
+ priceSource: z.ZodEnum<{
1479
+ mid: "mid";
1480
+ mark: "mark";
1481
+ }>;
1482
+ basket: z.ZodArray<z.ZodObject<{
1483
+ symbol: z.ZodString;
1484
+ side: z.ZodEnum<{
1485
+ BUY: "BUY";
1486
+ SELL: "SELL";
1487
+ }>;
1488
+ weight: z.ZodNumber;
1489
+ }, z.core.$strip>>;
1490
+ direction: z.ZodEnum<{
1491
+ ABOVE: "ABOVE";
1492
+ BELOW: "BELOW";
1493
+ }>;
1494
+ threshold: z.ZodNumber;
1495
+ }, z.core.$strip>;
1496
+ }, z.core.$strip>, z.ZodObject<{
1497
+ type: z.ZodLiteral<"position_value_v1">;
1498
+ data: z.ZodObject<{
1499
+ priceSource: z.ZodEnum<{
1500
+ mid: "mid";
1501
+ mark: "mark";
1502
+ }>;
1503
+ direction: z.ZodEnum<{
1504
+ ABOVE: "ABOVE";
1505
+ BELOW: "BELOW";
1506
+ }>;
1507
+ threshold: z.ZodNumber;
1508
+ }, z.core.$strip>;
1509
+ }, z.core.$strip>, z.ZodObject<{
1510
+ type: z.ZodLiteral<"position_upnl_value_v1">;
1511
+ data: z.ZodObject<{
1512
+ priceSource: z.ZodEnum<{
1513
+ mid: "mid";
1514
+ mark: "mark";
1515
+ }>;
1516
+ direction: z.ZodEnum<{
1517
+ ABOVE: "ABOVE";
1518
+ BELOW: "BELOW";
1519
+ }>;
1520
+ threshold: z.ZodNumber;
1521
+ }, z.core.$strip>;
1522
+ }, z.core.$strip>, z.ZodObject<{
1523
+ type: z.ZodLiteral<"position_upnl_percentage_v1">;
1524
+ data: z.ZodObject<{
1525
+ priceSource: z.ZodEnum<{
1526
+ mid: "mid";
1527
+ mark: "mark";
1528
+ }>;
1529
+ direction: z.ZodEnum<{
1530
+ ABOVE: "ABOVE";
1531
+ BELOW: "BELOW";
1532
+ }>;
1533
+ threshold_bps: z.ZodNumber;
1534
+ }, z.core.$strip>;
1535
+ }, z.core.$strip>], "type">;
1536
+ context: z.ZodObject<{
1537
+ type: z.ZodLiteral<"MARKET">;
1538
+ position: z.ZodObject<{
1539
+ id: z.ZodUUID;
1540
+ initialExposure: z.ZodRecord<z.ZodString, z.ZodString>;
1541
+ }, z.core.$strip>;
1542
+ }, z.core.$strip>;
1543
+ }, z.core.$strip>], "intent">], "type">;
1544
+ export type BaseTrigger = z.output<typeof BaseTrigger>;
1545
+ export type TriggerMarketOpen = z.output<typeof TriggerMarketOpen>;
1546
+ export type TriggerMarketAdjust = z.output<typeof TriggerMarketAdjust>;
1547
+ export type TriggerMarketClose = z.output<typeof TriggerMarketClose>;
1548
+ export type Trigger = z.output<typeof TriggerMarket>;
1549
+ export {};