@pear-protocol/types 1.20.0 → 1.22.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.
- package/dist/ladder/entities.d.ts +87 -0
- package/dist/ladder/entities.js +2 -0
- package/dist/ladder/payloads.d.ts +146 -2
- package/dist/ladder/payloads.js +14 -1
- package/dist/ladder/responses.d.ts +261 -0
- package/dist/notification/entities.d.ts +33 -2
- package/dist/notification/entities.js +18 -4
- package/dist/notification/responses.d.ts +15 -0
- package/dist/trade/responses.d.ts +273 -1
- package/dist/trade/responses.js +1 -1
- package/dist/trigger/entities/index.d.ts +50 -0
- package/dist/trigger/entities/index.js +7 -0
- package/dist/trigger/payloads/index.d.ts +85 -0
- package/dist/trigger/payloads/index.js +14 -10
- package/dist/trigger/refinement/static.refinement.d.ts +11 -3
- package/dist/trigger/refinement/static.refinement.js +9 -2
- package/dist/trigger/responses.d.ts +30 -0
- package/package.json +1 -1
|
@@ -26,6 +26,78 @@ export declare const Ladder: z.ZodObject<{
|
|
|
26
26
|
ACTIVE: "ACTIVE";
|
|
27
27
|
COMPLETED: "COMPLETED";
|
|
28
28
|
}>;
|
|
29
|
+
attachTriggers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
30
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
31
|
+
type: z.ZodLiteral<"MARKET">;
|
|
32
|
+
bracketType: z.ZodEnum<{
|
|
33
|
+
STOP_LOSS: "STOP_LOSS";
|
|
34
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
35
|
+
}>;
|
|
36
|
+
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
37
|
+
type: z.ZodLiteral<"notional">;
|
|
38
|
+
data: z.ZodObject<{
|
|
39
|
+
priceSource: z.ZodEnum<{
|
|
40
|
+
mid: "mid";
|
|
41
|
+
mark: "mark";
|
|
42
|
+
}>;
|
|
43
|
+
threshold: z.ZodNumber;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
46
|
+
type: z.ZodLiteral<"upnl">;
|
|
47
|
+
data: z.ZodObject<{
|
|
48
|
+
priceSource: z.ZodEnum<{
|
|
49
|
+
mid: "mid";
|
|
50
|
+
mark: "mark";
|
|
51
|
+
}>;
|
|
52
|
+
threshold: z.ZodNumber;
|
|
53
|
+
}, z.core.$strip>;
|
|
54
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
55
|
+
type: z.ZodLiteral<"upnl_bps">;
|
|
56
|
+
data: z.ZodObject<{
|
|
57
|
+
priceSource: z.ZodEnum<{
|
|
58
|
+
mid: "mid";
|
|
59
|
+
mark: "mark";
|
|
60
|
+
}>;
|
|
61
|
+
threshold: z.ZodNumber;
|
|
62
|
+
}, z.core.$strip>;
|
|
63
|
+
}, z.core.$strip>], "type">;
|
|
64
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
65
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
66
|
+
type: z.ZodLiteral<"MARKET">;
|
|
67
|
+
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
68
|
+
type: z.ZodLiteral<"notional_trailing">;
|
|
69
|
+
data: z.ZodObject<{
|
|
70
|
+
priceSource: z.ZodEnum<{
|
|
71
|
+
mid: "mid";
|
|
72
|
+
mark: "mark";
|
|
73
|
+
}>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
76
|
+
type: z.ZodLiteral<"upnl_trailing">;
|
|
77
|
+
data: z.ZodObject<{
|
|
78
|
+
priceSource: z.ZodEnum<{
|
|
79
|
+
mid: "mid";
|
|
80
|
+
mark: "mark";
|
|
81
|
+
}>;
|
|
82
|
+
}, z.core.$strip>;
|
|
83
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
84
|
+
type: z.ZodLiteral<"upnl_bps_trailing">;
|
|
85
|
+
data: z.ZodObject<{
|
|
86
|
+
priceSource: z.ZodEnum<{
|
|
87
|
+
mid: "mid";
|
|
88
|
+
mark: "mark";
|
|
89
|
+
}>;
|
|
90
|
+
}, z.core.$strip>;
|
|
91
|
+
}, z.core.$strip>], "type">;
|
|
92
|
+
trailing: z.ZodObject<{
|
|
93
|
+
mode: z.ZodEnum<{
|
|
94
|
+
RELATIVE_BPS: "RELATIVE_BPS";
|
|
95
|
+
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
|
|
96
|
+
}>;
|
|
97
|
+
deltaValue: z.ZodNumber;
|
|
98
|
+
activationValue: z.ZodOptional<z.ZodNumber>;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
}, z.core.$strip>]>>>;
|
|
29
101
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
30
102
|
id: z.ZodUUID;
|
|
31
103
|
tradeAccountId: z.ZodUUID;
|
|
@@ -95,6 +167,11 @@ export declare const Ladder: z.ZodObject<{
|
|
|
95
167
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
96
168
|
NONE: "NONE";
|
|
97
169
|
}>;
|
|
170
|
+
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
171
|
+
STOP_LOSS: "STOP_LOSS";
|
|
172
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
173
|
+
NONE: "NONE";
|
|
174
|
+
}>>;
|
|
98
175
|
createdAt: z.ZodString;
|
|
99
176
|
updatedAt: z.ZodString;
|
|
100
177
|
intent: z.ZodLiteral<"OPEN">;
|
|
@@ -296,6 +373,11 @@ export declare const Ladder: z.ZodObject<{
|
|
|
296
373
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
297
374
|
NONE: "NONE";
|
|
298
375
|
}>;
|
|
376
|
+
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
377
|
+
STOP_LOSS: "STOP_LOSS";
|
|
378
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
379
|
+
NONE: "NONE";
|
|
380
|
+
}>>;
|
|
299
381
|
createdAt: z.ZodString;
|
|
300
382
|
updatedAt: z.ZodString;
|
|
301
383
|
intent: z.ZodLiteral<"ADJUST">;
|
|
@@ -543,6 +625,11 @@ export declare const Ladder: z.ZodObject<{
|
|
|
543
625
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
544
626
|
NONE: "NONE";
|
|
545
627
|
}>;
|
|
628
|
+
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
629
|
+
STOP_LOSS: "STOP_LOSS";
|
|
630
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
631
|
+
NONE: "NONE";
|
|
632
|
+
}>>;
|
|
546
633
|
createdAt: z.ZodString;
|
|
547
634
|
updatedAt: z.ZodString;
|
|
548
635
|
intent: z.ZodLiteral<"CLOSE">;
|
package/dist/ladder/entities.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
import { Connector } from '../connector';
|
|
3
3
|
import { Trigger } from '../trigger';
|
|
4
|
+
import { AttachTriggerMarketCloseList } from '../trigger/payloads';
|
|
4
5
|
import { LadderConfig } from './payloads';
|
|
5
6
|
|
|
6
7
|
const LadderStatus = z.enum(["ACTIVE", "COMPLETED", "CANCELLED"]);
|
|
@@ -10,6 +11,7 @@ const Ladder = z.object({
|
|
|
10
11
|
positionKey: z.string(),
|
|
11
12
|
config: LadderConfig,
|
|
12
13
|
status: LadderStatus,
|
|
14
|
+
attachTriggers: AttachTriggerMarketCloseList.optional(),
|
|
13
15
|
triggers: z.array(Trigger),
|
|
14
16
|
createdAt: z.string(),
|
|
15
17
|
updatedAt: z.string()
|
|
@@ -111,6 +111,78 @@ export declare const CreateLadderMarketOpen: z.ZodObject<{
|
|
|
111
111
|
levels: z.ZodInt;
|
|
112
112
|
weighting: z.ZodDefault<z.ZodLiteral<"EQUAL">>;
|
|
113
113
|
}, z.core.$strip>;
|
|
114
|
+
attachTriggers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
115
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
116
|
+
type: z.ZodLiteral<"MARKET">;
|
|
117
|
+
bracketType: z.ZodEnum<{
|
|
118
|
+
STOP_LOSS: "STOP_LOSS";
|
|
119
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
120
|
+
}>;
|
|
121
|
+
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
122
|
+
type: z.ZodLiteral<"notional">;
|
|
123
|
+
data: z.ZodObject<{
|
|
124
|
+
priceSource: z.ZodEnum<{
|
|
125
|
+
mid: "mid";
|
|
126
|
+
mark: "mark";
|
|
127
|
+
}>;
|
|
128
|
+
threshold: z.ZodNumber;
|
|
129
|
+
}, z.core.$strip>;
|
|
130
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
131
|
+
type: z.ZodLiteral<"upnl">;
|
|
132
|
+
data: z.ZodObject<{
|
|
133
|
+
priceSource: z.ZodEnum<{
|
|
134
|
+
mid: "mid";
|
|
135
|
+
mark: "mark";
|
|
136
|
+
}>;
|
|
137
|
+
threshold: z.ZodNumber;
|
|
138
|
+
}, z.core.$strip>;
|
|
139
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
140
|
+
type: z.ZodLiteral<"upnl_bps">;
|
|
141
|
+
data: z.ZodObject<{
|
|
142
|
+
priceSource: z.ZodEnum<{
|
|
143
|
+
mid: "mid";
|
|
144
|
+
mark: "mark";
|
|
145
|
+
}>;
|
|
146
|
+
threshold: z.ZodNumber;
|
|
147
|
+
}, z.core.$strip>;
|
|
148
|
+
}, z.core.$strip>], "type">;
|
|
149
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
150
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
151
|
+
type: z.ZodLiteral<"MARKET">;
|
|
152
|
+
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
153
|
+
type: z.ZodLiteral<"notional_trailing">;
|
|
154
|
+
data: z.ZodObject<{
|
|
155
|
+
priceSource: z.ZodEnum<{
|
|
156
|
+
mid: "mid";
|
|
157
|
+
mark: "mark";
|
|
158
|
+
}>;
|
|
159
|
+
}, z.core.$strip>;
|
|
160
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
161
|
+
type: z.ZodLiteral<"upnl_trailing">;
|
|
162
|
+
data: z.ZodObject<{
|
|
163
|
+
priceSource: z.ZodEnum<{
|
|
164
|
+
mid: "mid";
|
|
165
|
+
mark: "mark";
|
|
166
|
+
}>;
|
|
167
|
+
}, z.core.$strip>;
|
|
168
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
169
|
+
type: z.ZodLiteral<"upnl_bps_trailing">;
|
|
170
|
+
data: z.ZodObject<{
|
|
171
|
+
priceSource: z.ZodEnum<{
|
|
172
|
+
mid: "mid";
|
|
173
|
+
mark: "mark";
|
|
174
|
+
}>;
|
|
175
|
+
}, z.core.$strip>;
|
|
176
|
+
}, z.core.$strip>], "type">;
|
|
177
|
+
trailing: z.ZodObject<{
|
|
178
|
+
mode: z.ZodEnum<{
|
|
179
|
+
RELATIVE_BPS: "RELATIVE_BPS";
|
|
180
|
+
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
|
|
181
|
+
}>;
|
|
182
|
+
deltaValue: z.ZodNumber;
|
|
183
|
+
activationValue: z.ZodOptional<z.ZodNumber>;
|
|
184
|
+
}, z.core.$strip>;
|
|
185
|
+
}, z.core.$strip>]>>>;
|
|
114
186
|
payload: z.ZodObject<{
|
|
115
187
|
type: z.ZodLiteral<"MARKET">;
|
|
116
188
|
legs: z.ZodTuple<[z.ZodObject<{
|
|
@@ -137,7 +209,7 @@ export declare const CreateLadderMarketOpen: z.ZodObject<{
|
|
|
137
209
|
amount: z.ZodString;
|
|
138
210
|
}, z.core.$strip>>;
|
|
139
211
|
}, z.core.$strip>;
|
|
140
|
-
}, z.core.$
|
|
212
|
+
}, z.core.$strict>;
|
|
141
213
|
export declare const CreateLadder: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
142
214
|
type: z.ZodLiteral<"MARKET">;
|
|
143
215
|
intent: z.ZodLiteral<"OPEN">;
|
|
@@ -196,6 +268,78 @@ export declare const CreateLadder: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
196
268
|
levels: z.ZodInt;
|
|
197
269
|
weighting: z.ZodDefault<z.ZodLiteral<"EQUAL">>;
|
|
198
270
|
}, z.core.$strip>;
|
|
271
|
+
attachTriggers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
272
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
273
|
+
type: z.ZodLiteral<"MARKET">;
|
|
274
|
+
bracketType: z.ZodEnum<{
|
|
275
|
+
STOP_LOSS: "STOP_LOSS";
|
|
276
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
277
|
+
}>;
|
|
278
|
+
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
279
|
+
type: z.ZodLiteral<"notional">;
|
|
280
|
+
data: z.ZodObject<{
|
|
281
|
+
priceSource: z.ZodEnum<{
|
|
282
|
+
mid: "mid";
|
|
283
|
+
mark: "mark";
|
|
284
|
+
}>;
|
|
285
|
+
threshold: z.ZodNumber;
|
|
286
|
+
}, z.core.$strip>;
|
|
287
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
288
|
+
type: z.ZodLiteral<"upnl">;
|
|
289
|
+
data: z.ZodObject<{
|
|
290
|
+
priceSource: z.ZodEnum<{
|
|
291
|
+
mid: "mid";
|
|
292
|
+
mark: "mark";
|
|
293
|
+
}>;
|
|
294
|
+
threshold: z.ZodNumber;
|
|
295
|
+
}, z.core.$strip>;
|
|
296
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
297
|
+
type: z.ZodLiteral<"upnl_bps">;
|
|
298
|
+
data: z.ZodObject<{
|
|
299
|
+
priceSource: z.ZodEnum<{
|
|
300
|
+
mid: "mid";
|
|
301
|
+
mark: "mark";
|
|
302
|
+
}>;
|
|
303
|
+
threshold: z.ZodNumber;
|
|
304
|
+
}, z.core.$strip>;
|
|
305
|
+
}, z.core.$strip>], "type">;
|
|
306
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
307
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
308
|
+
type: z.ZodLiteral<"MARKET">;
|
|
309
|
+
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
310
|
+
type: z.ZodLiteral<"notional_trailing">;
|
|
311
|
+
data: z.ZodObject<{
|
|
312
|
+
priceSource: z.ZodEnum<{
|
|
313
|
+
mid: "mid";
|
|
314
|
+
mark: "mark";
|
|
315
|
+
}>;
|
|
316
|
+
}, z.core.$strip>;
|
|
317
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
318
|
+
type: z.ZodLiteral<"upnl_trailing">;
|
|
319
|
+
data: z.ZodObject<{
|
|
320
|
+
priceSource: z.ZodEnum<{
|
|
321
|
+
mid: "mid";
|
|
322
|
+
mark: "mark";
|
|
323
|
+
}>;
|
|
324
|
+
}, z.core.$strip>;
|
|
325
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
326
|
+
type: z.ZodLiteral<"upnl_bps_trailing">;
|
|
327
|
+
data: z.ZodObject<{
|
|
328
|
+
priceSource: z.ZodEnum<{
|
|
329
|
+
mid: "mid";
|
|
330
|
+
mark: "mark";
|
|
331
|
+
}>;
|
|
332
|
+
}, z.core.$strip>;
|
|
333
|
+
}, z.core.$strip>], "type">;
|
|
334
|
+
trailing: z.ZodObject<{
|
|
335
|
+
mode: z.ZodEnum<{
|
|
336
|
+
RELATIVE_BPS: "RELATIVE_BPS";
|
|
337
|
+
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
|
|
338
|
+
}>;
|
|
339
|
+
deltaValue: z.ZodNumber;
|
|
340
|
+
activationValue: z.ZodOptional<z.ZodNumber>;
|
|
341
|
+
}, z.core.$strip>;
|
|
342
|
+
}, z.core.$strip>]>>>;
|
|
199
343
|
payload: z.ZodObject<{
|
|
200
344
|
type: z.ZodLiteral<"MARKET">;
|
|
201
345
|
legs: z.ZodTuple<[z.ZodObject<{
|
|
@@ -222,7 +366,7 @@ export declare const CreateLadder: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
222
366
|
amount: z.ZodString;
|
|
223
367
|
}, z.core.$strip>>;
|
|
224
368
|
}, z.core.$strip>;
|
|
225
|
-
}, z.core.$
|
|
369
|
+
}, z.core.$strict>], "type">;
|
|
226
370
|
export type LadderConfig = z.output<typeof LadderConfig>;
|
|
227
371
|
export type LadderConditionOpen = z.output<typeof LadderConditionOpen>;
|
|
228
372
|
export type CreateLadderMarketOpen = z.output<typeof CreateLadderMarketOpen>;
|
package/dist/ladder/payloads.js
CHANGED
|
@@ -5,6 +5,7 @@ import { AssetWeight, Side } from '../common/schema';
|
|
|
5
5
|
import { TradeLegPostOnly } from '../common/trade-legs';
|
|
6
6
|
import { InstrumentId } from '../instrument';
|
|
7
7
|
import { MetricTrack } from '../trigger/common';
|
|
8
|
+
import { AttachTriggerMarketCloseList } from '../trigger/payloads';
|
|
8
9
|
|
|
9
10
|
const LadderThreshold = z.number().positive({
|
|
10
11
|
message: "Threshold must be greater than 0"
|
|
@@ -56,17 +57,29 @@ const LadderConditionOpen = z.discriminatedUnion("type", [
|
|
|
56
57
|
LadderPriceOpen,
|
|
57
58
|
LadderWeightedRatioOpen
|
|
58
59
|
]);
|
|
60
|
+
const LadderAttachTriggers = AttachTriggerMarketCloseList.superRefine((attachTriggers, ctx) => {
|
|
61
|
+
attachTriggers.forEach((attachTrigger, index) => {
|
|
62
|
+
if (attachTrigger.condition.type === "notional" || attachTrigger.condition.type === "notional_trailing") {
|
|
63
|
+
ctx.addIssue({
|
|
64
|
+
code: "custom",
|
|
65
|
+
path: [index, "condition", "type"],
|
|
66
|
+
message: "Ladder brackets cannot use notional conditions; use upnl or upnl_bps."
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
});
|
|
59
71
|
const CreateLadderMarketOpen = z.object({
|
|
60
72
|
type: z.literal("MARKET"),
|
|
61
73
|
intent: z.literal("OPEN"),
|
|
62
74
|
clientId: ClientIdCode,
|
|
63
75
|
condition: LadderConditionOpen,
|
|
64
76
|
config: LadderConfig,
|
|
77
|
+
attachTriggers: LadderAttachTriggers.optional(),
|
|
65
78
|
payload: z.object({
|
|
66
79
|
type: z.literal("MARKET"),
|
|
67
80
|
legs: z.tuple([TradeLegPostOnly]).rest(TradeLegPostOnly).superRefine(RefineMinimumOneSymbol).superRefine(RefineUniqueSymbols)
|
|
68
81
|
})
|
|
69
|
-
});
|
|
82
|
+
}).strict();
|
|
70
83
|
const CreateLadder = z.discriminatedUnion("type", [CreateLadderMarketOpen]);
|
|
71
84
|
|
|
72
85
|
export { CreateLadder, CreateLadderMarketOpen, LadderConditionOpen, LadderConfig };
|
|
@@ -21,6 +21,78 @@ export declare const CreateLadderResponse: z.ZodObject<{
|
|
|
21
21
|
ACTIVE: "ACTIVE";
|
|
22
22
|
COMPLETED: "COMPLETED";
|
|
23
23
|
}>;
|
|
24
|
+
attachTriggers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
25
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
26
|
+
type: z.ZodLiteral<"MARKET">;
|
|
27
|
+
bracketType: z.ZodEnum<{
|
|
28
|
+
STOP_LOSS: "STOP_LOSS";
|
|
29
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
30
|
+
}>;
|
|
31
|
+
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
32
|
+
type: z.ZodLiteral<"notional">;
|
|
33
|
+
data: z.ZodObject<{
|
|
34
|
+
priceSource: z.ZodEnum<{
|
|
35
|
+
mid: "mid";
|
|
36
|
+
mark: "mark";
|
|
37
|
+
}>;
|
|
38
|
+
threshold: z.ZodNumber;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
41
|
+
type: z.ZodLiteral<"upnl">;
|
|
42
|
+
data: z.ZodObject<{
|
|
43
|
+
priceSource: z.ZodEnum<{
|
|
44
|
+
mid: "mid";
|
|
45
|
+
mark: "mark";
|
|
46
|
+
}>;
|
|
47
|
+
threshold: z.ZodNumber;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
50
|
+
type: z.ZodLiteral<"upnl_bps">;
|
|
51
|
+
data: z.ZodObject<{
|
|
52
|
+
priceSource: z.ZodEnum<{
|
|
53
|
+
mid: "mid";
|
|
54
|
+
mark: "mark";
|
|
55
|
+
}>;
|
|
56
|
+
threshold: z.ZodNumber;
|
|
57
|
+
}, z.core.$strip>;
|
|
58
|
+
}, z.core.$strip>], "type">;
|
|
59
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
60
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
61
|
+
type: z.ZodLiteral<"MARKET">;
|
|
62
|
+
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
63
|
+
type: z.ZodLiteral<"notional_trailing">;
|
|
64
|
+
data: z.ZodObject<{
|
|
65
|
+
priceSource: z.ZodEnum<{
|
|
66
|
+
mid: "mid";
|
|
67
|
+
mark: "mark";
|
|
68
|
+
}>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
71
|
+
type: z.ZodLiteral<"upnl_trailing">;
|
|
72
|
+
data: z.ZodObject<{
|
|
73
|
+
priceSource: z.ZodEnum<{
|
|
74
|
+
mid: "mid";
|
|
75
|
+
mark: "mark";
|
|
76
|
+
}>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
79
|
+
type: z.ZodLiteral<"upnl_bps_trailing">;
|
|
80
|
+
data: z.ZodObject<{
|
|
81
|
+
priceSource: z.ZodEnum<{
|
|
82
|
+
mid: "mid";
|
|
83
|
+
mark: "mark";
|
|
84
|
+
}>;
|
|
85
|
+
}, z.core.$strip>;
|
|
86
|
+
}, z.core.$strip>], "type">;
|
|
87
|
+
trailing: z.ZodObject<{
|
|
88
|
+
mode: z.ZodEnum<{
|
|
89
|
+
RELATIVE_BPS: "RELATIVE_BPS";
|
|
90
|
+
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
|
|
91
|
+
}>;
|
|
92
|
+
deltaValue: z.ZodNumber;
|
|
93
|
+
activationValue: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
}, z.core.$strip>;
|
|
95
|
+
}, z.core.$strip>]>>>;
|
|
24
96
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
25
97
|
id: z.ZodUUID;
|
|
26
98
|
tradeAccountId: z.ZodUUID;
|
|
@@ -90,6 +162,11 @@ export declare const CreateLadderResponse: z.ZodObject<{
|
|
|
90
162
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
91
163
|
NONE: "NONE";
|
|
92
164
|
}>;
|
|
165
|
+
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
166
|
+
STOP_LOSS: "STOP_LOSS";
|
|
167
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
168
|
+
NONE: "NONE";
|
|
169
|
+
}>>;
|
|
93
170
|
createdAt: z.ZodString;
|
|
94
171
|
updatedAt: z.ZodString;
|
|
95
172
|
intent: z.ZodLiteral<"OPEN">;
|
|
@@ -291,6 +368,11 @@ export declare const CreateLadderResponse: z.ZodObject<{
|
|
|
291
368
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
292
369
|
NONE: "NONE";
|
|
293
370
|
}>;
|
|
371
|
+
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
372
|
+
STOP_LOSS: "STOP_LOSS";
|
|
373
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
374
|
+
NONE: "NONE";
|
|
375
|
+
}>>;
|
|
294
376
|
createdAt: z.ZodString;
|
|
295
377
|
updatedAt: z.ZodString;
|
|
296
378
|
intent: z.ZodLiteral<"ADJUST">;
|
|
@@ -538,6 +620,11 @@ export declare const CreateLadderResponse: z.ZodObject<{
|
|
|
538
620
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
539
621
|
NONE: "NONE";
|
|
540
622
|
}>;
|
|
623
|
+
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
624
|
+
STOP_LOSS: "STOP_LOSS";
|
|
625
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
626
|
+
NONE: "NONE";
|
|
627
|
+
}>>;
|
|
541
628
|
createdAt: z.ZodString;
|
|
542
629
|
updatedAt: z.ZodString;
|
|
543
630
|
intent: z.ZodLiteral<"CLOSE">;
|
|
@@ -778,6 +865,78 @@ export declare const LadderResponse: z.ZodObject<{
|
|
|
778
865
|
ACTIVE: "ACTIVE";
|
|
779
866
|
COMPLETED: "COMPLETED";
|
|
780
867
|
}>;
|
|
868
|
+
attachTriggers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
869
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
870
|
+
type: z.ZodLiteral<"MARKET">;
|
|
871
|
+
bracketType: z.ZodEnum<{
|
|
872
|
+
STOP_LOSS: "STOP_LOSS";
|
|
873
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
874
|
+
}>;
|
|
875
|
+
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
876
|
+
type: z.ZodLiteral<"notional">;
|
|
877
|
+
data: z.ZodObject<{
|
|
878
|
+
priceSource: z.ZodEnum<{
|
|
879
|
+
mid: "mid";
|
|
880
|
+
mark: "mark";
|
|
881
|
+
}>;
|
|
882
|
+
threshold: z.ZodNumber;
|
|
883
|
+
}, z.core.$strip>;
|
|
884
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
885
|
+
type: z.ZodLiteral<"upnl">;
|
|
886
|
+
data: z.ZodObject<{
|
|
887
|
+
priceSource: z.ZodEnum<{
|
|
888
|
+
mid: "mid";
|
|
889
|
+
mark: "mark";
|
|
890
|
+
}>;
|
|
891
|
+
threshold: z.ZodNumber;
|
|
892
|
+
}, z.core.$strip>;
|
|
893
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
894
|
+
type: z.ZodLiteral<"upnl_bps">;
|
|
895
|
+
data: z.ZodObject<{
|
|
896
|
+
priceSource: z.ZodEnum<{
|
|
897
|
+
mid: "mid";
|
|
898
|
+
mark: "mark";
|
|
899
|
+
}>;
|
|
900
|
+
threshold: z.ZodNumber;
|
|
901
|
+
}, z.core.$strip>;
|
|
902
|
+
}, z.core.$strip>], "type">;
|
|
903
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
904
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
905
|
+
type: z.ZodLiteral<"MARKET">;
|
|
906
|
+
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
907
|
+
type: z.ZodLiteral<"notional_trailing">;
|
|
908
|
+
data: z.ZodObject<{
|
|
909
|
+
priceSource: z.ZodEnum<{
|
|
910
|
+
mid: "mid";
|
|
911
|
+
mark: "mark";
|
|
912
|
+
}>;
|
|
913
|
+
}, z.core.$strip>;
|
|
914
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
915
|
+
type: z.ZodLiteral<"upnl_trailing">;
|
|
916
|
+
data: z.ZodObject<{
|
|
917
|
+
priceSource: z.ZodEnum<{
|
|
918
|
+
mid: "mid";
|
|
919
|
+
mark: "mark";
|
|
920
|
+
}>;
|
|
921
|
+
}, z.core.$strip>;
|
|
922
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
923
|
+
type: z.ZodLiteral<"upnl_bps_trailing">;
|
|
924
|
+
data: z.ZodObject<{
|
|
925
|
+
priceSource: z.ZodEnum<{
|
|
926
|
+
mid: "mid";
|
|
927
|
+
mark: "mark";
|
|
928
|
+
}>;
|
|
929
|
+
}, z.core.$strip>;
|
|
930
|
+
}, z.core.$strip>], "type">;
|
|
931
|
+
trailing: z.ZodObject<{
|
|
932
|
+
mode: z.ZodEnum<{
|
|
933
|
+
RELATIVE_BPS: "RELATIVE_BPS";
|
|
934
|
+
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
|
|
935
|
+
}>;
|
|
936
|
+
deltaValue: z.ZodNumber;
|
|
937
|
+
activationValue: z.ZodOptional<z.ZodNumber>;
|
|
938
|
+
}, z.core.$strip>;
|
|
939
|
+
}, z.core.$strip>]>>>;
|
|
781
940
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
782
941
|
id: z.ZodUUID;
|
|
783
942
|
tradeAccountId: z.ZodUUID;
|
|
@@ -847,6 +1006,11 @@ export declare const LadderResponse: z.ZodObject<{
|
|
|
847
1006
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
848
1007
|
NONE: "NONE";
|
|
849
1008
|
}>;
|
|
1009
|
+
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
1010
|
+
STOP_LOSS: "STOP_LOSS";
|
|
1011
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1012
|
+
NONE: "NONE";
|
|
1013
|
+
}>>;
|
|
850
1014
|
createdAt: z.ZodString;
|
|
851
1015
|
updatedAt: z.ZodString;
|
|
852
1016
|
intent: z.ZodLiteral<"OPEN">;
|
|
@@ -1048,6 +1212,11 @@ export declare const LadderResponse: z.ZodObject<{
|
|
|
1048
1212
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1049
1213
|
NONE: "NONE";
|
|
1050
1214
|
}>;
|
|
1215
|
+
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
1216
|
+
STOP_LOSS: "STOP_LOSS";
|
|
1217
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1218
|
+
NONE: "NONE";
|
|
1219
|
+
}>>;
|
|
1051
1220
|
createdAt: z.ZodString;
|
|
1052
1221
|
updatedAt: z.ZodString;
|
|
1053
1222
|
intent: z.ZodLiteral<"ADJUST">;
|
|
@@ -1295,6 +1464,11 @@ export declare const LadderResponse: z.ZodObject<{
|
|
|
1295
1464
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1296
1465
|
NONE: "NONE";
|
|
1297
1466
|
}>;
|
|
1467
|
+
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
1468
|
+
STOP_LOSS: "STOP_LOSS";
|
|
1469
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1470
|
+
NONE: "NONE";
|
|
1471
|
+
}>>;
|
|
1298
1472
|
createdAt: z.ZodString;
|
|
1299
1473
|
updatedAt: z.ZodString;
|
|
1300
1474
|
intent: z.ZodLiteral<"CLOSE">;
|
|
@@ -1537,6 +1711,78 @@ export declare const LadderListResponse: z.ZodObject<{
|
|
|
1537
1711
|
ACTIVE: "ACTIVE";
|
|
1538
1712
|
COMPLETED: "COMPLETED";
|
|
1539
1713
|
}>;
|
|
1714
|
+
attachTriggers: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
1715
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
1716
|
+
type: z.ZodLiteral<"MARKET">;
|
|
1717
|
+
bracketType: z.ZodEnum<{
|
|
1718
|
+
STOP_LOSS: "STOP_LOSS";
|
|
1719
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1720
|
+
}>;
|
|
1721
|
+
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1722
|
+
type: z.ZodLiteral<"notional">;
|
|
1723
|
+
data: z.ZodObject<{
|
|
1724
|
+
priceSource: z.ZodEnum<{
|
|
1725
|
+
mid: "mid";
|
|
1726
|
+
mark: "mark";
|
|
1727
|
+
}>;
|
|
1728
|
+
threshold: z.ZodNumber;
|
|
1729
|
+
}, z.core.$strip>;
|
|
1730
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1731
|
+
type: z.ZodLiteral<"upnl">;
|
|
1732
|
+
data: z.ZodObject<{
|
|
1733
|
+
priceSource: z.ZodEnum<{
|
|
1734
|
+
mid: "mid";
|
|
1735
|
+
mark: "mark";
|
|
1736
|
+
}>;
|
|
1737
|
+
threshold: z.ZodNumber;
|
|
1738
|
+
}, z.core.$strip>;
|
|
1739
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1740
|
+
type: z.ZodLiteral<"upnl_bps">;
|
|
1741
|
+
data: z.ZodObject<{
|
|
1742
|
+
priceSource: z.ZodEnum<{
|
|
1743
|
+
mid: "mid";
|
|
1744
|
+
mark: "mark";
|
|
1745
|
+
}>;
|
|
1746
|
+
threshold: z.ZodNumber;
|
|
1747
|
+
}, z.core.$strip>;
|
|
1748
|
+
}, z.core.$strip>], "type">;
|
|
1749
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1750
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
1751
|
+
type: z.ZodLiteral<"MARKET">;
|
|
1752
|
+
condition: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1753
|
+
type: z.ZodLiteral<"notional_trailing">;
|
|
1754
|
+
data: z.ZodObject<{
|
|
1755
|
+
priceSource: z.ZodEnum<{
|
|
1756
|
+
mid: "mid";
|
|
1757
|
+
mark: "mark";
|
|
1758
|
+
}>;
|
|
1759
|
+
}, z.core.$strip>;
|
|
1760
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1761
|
+
type: z.ZodLiteral<"upnl_trailing">;
|
|
1762
|
+
data: z.ZodObject<{
|
|
1763
|
+
priceSource: z.ZodEnum<{
|
|
1764
|
+
mid: "mid";
|
|
1765
|
+
mark: "mark";
|
|
1766
|
+
}>;
|
|
1767
|
+
}, z.core.$strip>;
|
|
1768
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1769
|
+
type: z.ZodLiteral<"upnl_bps_trailing">;
|
|
1770
|
+
data: z.ZodObject<{
|
|
1771
|
+
priceSource: z.ZodEnum<{
|
|
1772
|
+
mid: "mid";
|
|
1773
|
+
mark: "mark";
|
|
1774
|
+
}>;
|
|
1775
|
+
}, z.core.$strip>;
|
|
1776
|
+
}, z.core.$strip>], "type">;
|
|
1777
|
+
trailing: z.ZodObject<{
|
|
1778
|
+
mode: z.ZodEnum<{
|
|
1779
|
+
RELATIVE_BPS: "RELATIVE_BPS";
|
|
1780
|
+
ABSOLUTE_POINTS: "ABSOLUTE_POINTS";
|
|
1781
|
+
}>;
|
|
1782
|
+
deltaValue: z.ZodNumber;
|
|
1783
|
+
activationValue: z.ZodOptional<z.ZodNumber>;
|
|
1784
|
+
}, z.core.$strip>;
|
|
1785
|
+
}, z.core.$strip>]>>>;
|
|
1540
1786
|
triggers: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1541
1787
|
id: z.ZodUUID;
|
|
1542
1788
|
tradeAccountId: z.ZodUUID;
|
|
@@ -1606,6 +1852,11 @@ export declare const LadderListResponse: z.ZodObject<{
|
|
|
1606
1852
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1607
1853
|
NONE: "NONE";
|
|
1608
1854
|
}>;
|
|
1855
|
+
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
1856
|
+
STOP_LOSS: "STOP_LOSS";
|
|
1857
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1858
|
+
NONE: "NONE";
|
|
1859
|
+
}>>;
|
|
1609
1860
|
createdAt: z.ZodString;
|
|
1610
1861
|
updatedAt: z.ZodString;
|
|
1611
1862
|
intent: z.ZodLiteral<"OPEN">;
|
|
@@ -1807,6 +2058,11 @@ export declare const LadderListResponse: z.ZodObject<{
|
|
|
1807
2058
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
1808
2059
|
NONE: "NONE";
|
|
1809
2060
|
}>;
|
|
2061
|
+
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
2062
|
+
STOP_LOSS: "STOP_LOSS";
|
|
2063
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
2064
|
+
NONE: "NONE";
|
|
2065
|
+
}>>;
|
|
1810
2066
|
createdAt: z.ZodString;
|
|
1811
2067
|
updatedAt: z.ZodString;
|
|
1812
2068
|
intent: z.ZodLiteral<"ADJUST">;
|
|
@@ -2054,6 +2310,11 @@ export declare const LadderListResponse: z.ZodObject<{
|
|
|
2054
2310
|
TAKE_PROFIT: "TAKE_PROFIT";
|
|
2055
2311
|
NONE: "NONE";
|
|
2056
2312
|
}>;
|
|
2313
|
+
semanticBracketType: z.ZodOptional<z.ZodEnum<{
|
|
2314
|
+
STOP_LOSS: "STOP_LOSS";
|
|
2315
|
+
TAKE_PROFIT: "TAKE_PROFIT";
|
|
2316
|
+
NONE: "NONE";
|
|
2317
|
+
}>>;
|
|
2057
2318
|
createdAt: z.ZodString;
|
|
2058
2319
|
updatedAt: z.ZodString;
|
|
2059
2320
|
intent: z.ZodLiteral<"CLOSE">;
|