@pear-protocol/types 2.18.0 → 2.19.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/bundle.d.ts +1 -0
- package/dist/bundle.js +1 -0
- package/dist/common/refinement.d.ts +0 -1
- package/dist/common/refinement.js +1 -9
- package/dist/instrument/entities.d.ts +1 -0
- package/dist/instrument/responses.d.ts +1 -0
- package/dist/instrument-precision/index.d.ts +1 -0
- package/dist/instrument-precision/index.js +6 -1
- package/dist/realtime/channels.d.ts +19 -0
- package/dist/realtime/channels.js +16 -0
- package/dist/realtime/frames.d.ts +923 -0
- package/dist/realtime/frames.js +140 -0
- package/dist/realtime/index.d.ts +6 -0
- package/dist/realtime/index.js +6 -0
- package/dist/realtime/messages.d.ts +243 -0
- package/dist/realtime/messages.js +118 -0
- package/dist/realtime/public-events.d.ts +342 -0
- package/dist/realtime/public-events.js +92 -0
- package/dist/realtime/user-events.d.ts +32 -0
- package/dist/realtime/user-events.js +32 -0
- package/dist/realtime/vault-events.d.ts +71 -0
- package/dist/realtime/vault-events.js +42 -0
- package/dist/schedule/entities.d.ts +53 -163
- package/dist/schedule/entities.js +62 -3
- package/dist/schedule/queries.d.ts +7 -0
- package/dist/schedule/queries.js +15 -1
- package/dist/schedule/responses.d.ts +150 -115
- package/dist/schedule/responses.js +6 -2
- package/dist/sync/payloads.d.ts +0 -162
- package/dist/sync/payloads.js +1 -35
- package/dist/vaults/responses.d.ts +1 -0
- package/dist/vaults/responses.js +2 -1
- package/package.json +1 -1
|
@@ -80,44 +80,11 @@ declare const BaseSchedule: z.ZodObject<{
|
|
|
80
80
|
}>>;
|
|
81
81
|
createdAt: z.ZodString;
|
|
82
82
|
updatedAt: z.ZodString;
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
PROVISIONAL: "PROVISIONAL";
|
|
89
|
-
CONFIRMED: "CONFIRMED";
|
|
90
|
-
RECONCILED: "RECONCILED";
|
|
91
|
-
}>;
|
|
92
|
-
tradeAccountId: z.ZodUUID;
|
|
93
|
-
symbol: z.ZodString;
|
|
94
|
-
positionId: z.ZodUUID;
|
|
95
|
-
connector: z.ZodEnum<{
|
|
96
|
-
hyperliquid: "hyperliquid";
|
|
97
|
-
binance: "binance";
|
|
98
|
-
bybit: "bybit";
|
|
99
|
-
okx: "okx";
|
|
100
|
-
lighter: "lighter";
|
|
101
|
-
lighter_rhc: "lighter_rhc";
|
|
102
|
-
}>;
|
|
103
|
-
side: z.ZodEnum<{
|
|
104
|
-
BUY: "BUY";
|
|
105
|
-
SELL: "SELL";
|
|
106
|
-
}>;
|
|
107
|
-
reduceOnly: z.ZodBoolean;
|
|
108
|
-
isExternal: z.ZodBoolean;
|
|
109
|
-
synthetic: z.ZodBoolean;
|
|
110
|
-
quantity: z.ZodString;
|
|
111
|
-
price: z.ZodString;
|
|
112
|
-
usd: z.ZodString;
|
|
113
|
-
tradeFee: z.ZodOptional<z.ZodString>;
|
|
114
|
-
pearFee: z.ZodOptional<z.ZodString>;
|
|
115
|
-
timestamp: z.ZodString;
|
|
116
|
-
original: z.ZodOptional<z.ZodObject<{
|
|
117
|
-
exchangeFillId: z.ZodString;
|
|
118
|
-
quantity: z.ZodString;
|
|
119
|
-
}, z.core.$strip>>;
|
|
120
|
-
}, z.core.$strip>>>;
|
|
83
|
+
executedSliceCount: z.ZodNumber;
|
|
84
|
+
filledUsd: z.ZodString;
|
|
85
|
+
filledQuantities: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
86
|
+
progress: z.ZodNumber;
|
|
87
|
+
legProgress: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
121
88
|
}, z.core.$strip>;
|
|
122
89
|
export declare const TWAPOpen: z.ZodObject<{
|
|
123
90
|
id: z.ZodUUID;
|
|
@@ -153,44 +120,11 @@ export declare const TWAPOpen: z.ZodObject<{
|
|
|
153
120
|
}>>;
|
|
154
121
|
createdAt: z.ZodString;
|
|
155
122
|
updatedAt: z.ZodString;
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
PROVISIONAL: "PROVISIONAL";
|
|
162
|
-
CONFIRMED: "CONFIRMED";
|
|
163
|
-
RECONCILED: "RECONCILED";
|
|
164
|
-
}>;
|
|
165
|
-
tradeAccountId: z.ZodUUID;
|
|
166
|
-
symbol: z.ZodString;
|
|
167
|
-
positionId: z.ZodUUID;
|
|
168
|
-
connector: z.ZodEnum<{
|
|
169
|
-
hyperliquid: "hyperliquid";
|
|
170
|
-
binance: "binance";
|
|
171
|
-
bybit: "bybit";
|
|
172
|
-
okx: "okx";
|
|
173
|
-
lighter: "lighter";
|
|
174
|
-
lighter_rhc: "lighter_rhc";
|
|
175
|
-
}>;
|
|
176
|
-
side: z.ZodEnum<{
|
|
177
|
-
BUY: "BUY";
|
|
178
|
-
SELL: "SELL";
|
|
179
|
-
}>;
|
|
180
|
-
reduceOnly: z.ZodBoolean;
|
|
181
|
-
isExternal: z.ZodBoolean;
|
|
182
|
-
synthetic: z.ZodBoolean;
|
|
183
|
-
quantity: z.ZodString;
|
|
184
|
-
price: z.ZodString;
|
|
185
|
-
usd: z.ZodString;
|
|
186
|
-
tradeFee: z.ZodOptional<z.ZodString>;
|
|
187
|
-
pearFee: z.ZodOptional<z.ZodString>;
|
|
188
|
-
timestamp: z.ZodString;
|
|
189
|
-
original: z.ZodOptional<z.ZodObject<{
|
|
190
|
-
exchangeFillId: z.ZodString;
|
|
191
|
-
quantity: z.ZodString;
|
|
192
|
-
}, z.core.$strip>>;
|
|
193
|
-
}, z.core.$strip>>>;
|
|
123
|
+
executedSliceCount: z.ZodNumber;
|
|
124
|
+
filledUsd: z.ZodString;
|
|
125
|
+
filledQuantities: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
126
|
+
progress: z.ZodNumber;
|
|
127
|
+
legProgress: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
194
128
|
strategy: z.ZodLiteral<"TWAP">;
|
|
195
129
|
intent: z.ZodLiteral<"OPEN">;
|
|
196
130
|
sliceIntervalSec: z.ZodNumber;
|
|
@@ -245,44 +179,11 @@ export declare const TWAPClose: z.ZodObject<{
|
|
|
245
179
|
}>>;
|
|
246
180
|
createdAt: z.ZodString;
|
|
247
181
|
updatedAt: z.ZodString;
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
PROVISIONAL: "PROVISIONAL";
|
|
254
|
-
CONFIRMED: "CONFIRMED";
|
|
255
|
-
RECONCILED: "RECONCILED";
|
|
256
|
-
}>;
|
|
257
|
-
tradeAccountId: z.ZodUUID;
|
|
258
|
-
symbol: z.ZodString;
|
|
259
|
-
positionId: z.ZodUUID;
|
|
260
|
-
connector: z.ZodEnum<{
|
|
261
|
-
hyperliquid: "hyperliquid";
|
|
262
|
-
binance: "binance";
|
|
263
|
-
bybit: "bybit";
|
|
264
|
-
okx: "okx";
|
|
265
|
-
lighter: "lighter";
|
|
266
|
-
lighter_rhc: "lighter_rhc";
|
|
267
|
-
}>;
|
|
268
|
-
side: z.ZodEnum<{
|
|
269
|
-
BUY: "BUY";
|
|
270
|
-
SELL: "SELL";
|
|
271
|
-
}>;
|
|
272
|
-
reduceOnly: z.ZodBoolean;
|
|
273
|
-
isExternal: z.ZodBoolean;
|
|
274
|
-
synthetic: z.ZodBoolean;
|
|
275
|
-
quantity: z.ZodString;
|
|
276
|
-
price: z.ZodString;
|
|
277
|
-
usd: z.ZodString;
|
|
278
|
-
tradeFee: z.ZodOptional<z.ZodString>;
|
|
279
|
-
pearFee: z.ZodOptional<z.ZodString>;
|
|
280
|
-
timestamp: z.ZodString;
|
|
281
|
-
original: z.ZodOptional<z.ZodObject<{
|
|
282
|
-
exchangeFillId: z.ZodString;
|
|
283
|
-
quantity: z.ZodString;
|
|
284
|
-
}, z.core.$strip>>;
|
|
285
|
-
}, z.core.$strip>>>;
|
|
182
|
+
executedSliceCount: z.ZodNumber;
|
|
183
|
+
filledUsd: z.ZodString;
|
|
184
|
+
filledQuantities: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
185
|
+
progress: z.ZodNumber;
|
|
186
|
+
legProgress: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
286
187
|
strategy: z.ZodLiteral<"TWAP">;
|
|
287
188
|
intent: z.ZodLiteral<"CLOSE">;
|
|
288
189
|
sliceIntervalSec: z.ZodNumber;
|
|
@@ -328,44 +229,11 @@ export declare const Schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
328
229
|
}>>;
|
|
329
230
|
createdAt: z.ZodString;
|
|
330
231
|
updatedAt: z.ZodString;
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
PROVISIONAL: "PROVISIONAL";
|
|
337
|
-
CONFIRMED: "CONFIRMED";
|
|
338
|
-
RECONCILED: "RECONCILED";
|
|
339
|
-
}>;
|
|
340
|
-
tradeAccountId: z.ZodUUID;
|
|
341
|
-
symbol: z.ZodString;
|
|
342
|
-
positionId: z.ZodUUID;
|
|
343
|
-
connector: z.ZodEnum<{
|
|
344
|
-
hyperliquid: "hyperliquid";
|
|
345
|
-
binance: "binance";
|
|
346
|
-
bybit: "bybit";
|
|
347
|
-
okx: "okx";
|
|
348
|
-
lighter: "lighter";
|
|
349
|
-
lighter_rhc: "lighter_rhc";
|
|
350
|
-
}>;
|
|
351
|
-
side: z.ZodEnum<{
|
|
352
|
-
BUY: "BUY";
|
|
353
|
-
SELL: "SELL";
|
|
354
|
-
}>;
|
|
355
|
-
reduceOnly: z.ZodBoolean;
|
|
356
|
-
isExternal: z.ZodBoolean;
|
|
357
|
-
synthetic: z.ZodBoolean;
|
|
358
|
-
quantity: z.ZodString;
|
|
359
|
-
price: z.ZodString;
|
|
360
|
-
usd: z.ZodString;
|
|
361
|
-
tradeFee: z.ZodOptional<z.ZodString>;
|
|
362
|
-
pearFee: z.ZodOptional<z.ZodString>;
|
|
363
|
-
timestamp: z.ZodString;
|
|
364
|
-
original: z.ZodOptional<z.ZodObject<{
|
|
365
|
-
exchangeFillId: z.ZodString;
|
|
366
|
-
quantity: z.ZodString;
|
|
367
|
-
}, z.core.$strip>>;
|
|
368
|
-
}, z.core.$strip>>>;
|
|
232
|
+
executedSliceCount: z.ZodNumber;
|
|
233
|
+
filledUsd: z.ZodString;
|
|
234
|
+
filledQuantities: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
235
|
+
progress: z.ZodNumber;
|
|
236
|
+
legProgress: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
369
237
|
strategy: z.ZodLiteral<"TWAP">;
|
|
370
238
|
intent: z.ZodLiteral<"OPEN">;
|
|
371
239
|
sliceIntervalSec: z.ZodNumber;
|
|
@@ -419,6 +287,29 @@ export declare const Schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
419
287
|
}>>;
|
|
420
288
|
createdAt: z.ZodString;
|
|
421
289
|
updatedAt: z.ZodString;
|
|
290
|
+
executedSliceCount: z.ZodNumber;
|
|
291
|
+
filledUsd: z.ZodString;
|
|
292
|
+
filledQuantities: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
293
|
+
progress: z.ZodNumber;
|
|
294
|
+
legProgress: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
295
|
+
strategy: z.ZodLiteral<"TWAP">;
|
|
296
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
297
|
+
sliceIntervalSec: z.ZodNumber;
|
|
298
|
+
sliceCount: z.ZodNumber;
|
|
299
|
+
randomization: z.ZodObject<{
|
|
300
|
+
timingJitterBps: z.ZodInt;
|
|
301
|
+
sizeJitterBps: z.ZodInt;
|
|
302
|
+
}, z.core.$strip>;
|
|
303
|
+
positionId: z.ZodUUID;
|
|
304
|
+
initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
305
|
+
}, z.core.$strip>], "intent">;
|
|
306
|
+
export declare const ScheduleSlice: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
307
|
+
index: z.ZodNumber;
|
|
308
|
+
scheduledAt: z.ZodString;
|
|
309
|
+
status: z.ZodLiteral<"EXECUTED">;
|
|
310
|
+
usd: z.ZodString;
|
|
311
|
+
quantities: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
312
|
+
lastFilledAt: z.ZodString;
|
|
422
313
|
fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
423
314
|
id: z.ZodUUID;
|
|
424
315
|
cloid: z.ZodOptional<z.ZodString>;
|
|
@@ -457,20 +348,19 @@ export declare const Schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
457
348
|
quantity: z.ZodString;
|
|
458
349
|
}, z.core.$strip>>;
|
|
459
350
|
}, z.core.$strip>>>;
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
470
|
-
}, z.core.$strip>], "intent">;
|
|
351
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
352
|
+
index: z.ZodNumber;
|
|
353
|
+
scheduledAt: z.ZodString;
|
|
354
|
+
status: z.ZodLiteral<"PENDING">;
|
|
355
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
356
|
+
index: z.ZodNumber;
|
|
357
|
+
scheduledAt: z.ZodString;
|
|
358
|
+
status: z.ZodLiteral<"MISSED">;
|
|
359
|
+
}, z.core.$strip>], "status">;
|
|
471
360
|
export type TWAPOpenLeg = z.output<typeof TWAPOpenLeg>;
|
|
472
361
|
export type BaseSchedule = z.output<typeof BaseSchedule>;
|
|
473
362
|
export type TWAPOpen = z.output<typeof TWAPOpen>;
|
|
474
363
|
export type TWAPClose = z.output<typeof TWAPClose>;
|
|
475
364
|
export type Schedule = z.output<typeof Schedule>;
|
|
365
|
+
export type ScheduleSlice = z.output<typeof ScheduleSlice>;
|
|
476
366
|
export {};
|
|
@@ -104,9 +104,25 @@ const BaseSchedule = z.object({
|
|
|
104
104
|
*/
|
|
105
105
|
updatedAt: z.string(),
|
|
106
106
|
/**
|
|
107
|
-
*
|
|
107
|
+
* Slices that produced live fills
|
|
108
108
|
*/
|
|
109
|
-
|
|
109
|
+
executedSliceCount: z.number().int().nonnegative(),
|
|
110
|
+
/**
|
|
111
|
+
* Absolute USD filled across every slice
|
|
112
|
+
*/
|
|
113
|
+
filledUsd: UnsignedDecimalString,
|
|
114
|
+
/**
|
|
115
|
+
* Absolute base quantity filled, per instrument
|
|
116
|
+
*/
|
|
117
|
+
filledQuantities: z.record(InstrumentId, UnsignedDecimalString),
|
|
118
|
+
/**
|
|
119
|
+
* Overall progress from 0 to 1: notional filled for OPEN, the slowest leg for CLOSE
|
|
120
|
+
*/
|
|
121
|
+
progress: z.number().min(0).max(1),
|
|
122
|
+
/**
|
|
123
|
+
* Progress of each leg from 0 to 1, capped at 1 when a leg overfills
|
|
124
|
+
*/
|
|
125
|
+
legProgress: z.record(InstrumentId, z.number().min(0).max(1))
|
|
110
126
|
});
|
|
111
127
|
const TWAPOpen = BaseSchedule.extend({
|
|
112
128
|
/**
|
|
@@ -176,5 +192,48 @@ const Schedule = z.discriminatedUnion("intent", [
|
|
|
176
192
|
TWAPOpen,
|
|
177
193
|
TWAPClose
|
|
178
194
|
]);
|
|
195
|
+
const ScheduleSlicePosition = z.object({
|
|
196
|
+
/**
|
|
197
|
+
* Grid index of the slice inside the execution window
|
|
198
|
+
*/
|
|
199
|
+
index: z.number().int().nonnegative(),
|
|
200
|
+
/**
|
|
201
|
+
* Grid time the slice is planned around, before timing jitter
|
|
202
|
+
*/
|
|
203
|
+
scheduledAt: z.string()
|
|
204
|
+
});
|
|
205
|
+
const ScheduleSlice = z.discriminatedUnion("status", [
|
|
206
|
+
ScheduleSlicePosition.extend({
|
|
207
|
+
status: z.literal("EXECUTED"),
|
|
208
|
+
/**
|
|
209
|
+
* Absolute USD filled by the slice
|
|
210
|
+
*/
|
|
211
|
+
usd: UnsignedDecimalString,
|
|
212
|
+
/**
|
|
213
|
+
* Absolute base quantity filled by the slice, per instrument
|
|
214
|
+
*/
|
|
215
|
+
quantities: z.record(InstrumentId, UnsignedDecimalString),
|
|
216
|
+
/**
|
|
217
|
+
* Timestamp of the slice's latest fill
|
|
218
|
+
*/
|
|
219
|
+
lastFilledAt: z.string(),
|
|
220
|
+
/**
|
|
221
|
+
* The slice's live fills in time order, present when requested with include=fills
|
|
222
|
+
*/
|
|
223
|
+
fills: z.array(Fill).optional()
|
|
224
|
+
}),
|
|
225
|
+
ScheduleSlicePosition.extend({
|
|
226
|
+
/**
|
|
227
|
+
* Not yet reached on an active schedule
|
|
228
|
+
*/
|
|
229
|
+
status: z.literal("PENDING")
|
|
230
|
+
}),
|
|
231
|
+
ScheduleSlicePosition.extend({
|
|
232
|
+
/**
|
|
233
|
+
* Passed without fills: skipped by catch-up, or before a finished schedule's last executed slice
|
|
234
|
+
*/
|
|
235
|
+
status: z.literal("MISSED")
|
|
236
|
+
})
|
|
237
|
+
]);
|
|
179
238
|
|
|
180
|
-
export { Schedule, ScheduleCancelledReason, ScheduleExecutionType, ScheduleIntent, ScheduleStatus, ScheduleStrategy, TWAPClose, TWAPOpen };
|
|
239
|
+
export { Schedule, ScheduleCancelledReason, ScheduleExecutionType, ScheduleIntent, ScheduleSlice, ScheduleStatus, ScheduleStrategy, TWAPClose, TWAPOpen };
|
|
@@ -18,3 +18,10 @@ export declare const ScheduleListParams: z.ZodObject<{
|
|
|
18
18
|
}, z.core.$strip>;
|
|
19
19
|
export type ScheduleListParamsInput = z.input<typeof ScheduleListParams>;
|
|
20
20
|
export type ScheduleListParams = z.output<typeof ScheduleListParams>;
|
|
21
|
+
export declare const ScheduleDetailParams: z.ZodObject<{
|
|
22
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodCoercedNumber<string | number>>>;
|
|
23
|
+
cursor: z.ZodOptional<z.ZodCoercedNumber<string | number>>;
|
|
24
|
+
include: z.ZodOptional<z.ZodLiteral<"fills">>;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
export type ScheduleDetailParamsInput = z.input<typeof ScheduleDetailParams>;
|
|
27
|
+
export type ScheduleDetailParams = z.output<typeof ScheduleDetailParams>;
|
package/dist/schedule/queries.js
CHANGED
|
@@ -12,5 +12,19 @@ const ScheduleListParams = CursorFindParams.extend({
|
|
|
12
12
|
connector: Connector.optional(),
|
|
13
13
|
status: StatusArray.optional()
|
|
14
14
|
});
|
|
15
|
+
const ScheduleDetailParams = z.object({
|
|
16
|
+
/**
|
|
17
|
+
* Slices per page; kept small so a page with fills stays bounded
|
|
18
|
+
*/
|
|
19
|
+
limit: z.coerce.number().int().positive().max(100).optional().default(20),
|
|
20
|
+
/**
|
|
21
|
+
* Slice index the page starts at; pass the previous page's nextCursor as-is
|
|
22
|
+
*/
|
|
23
|
+
cursor: z.coerce.number().int().nonnegative().optional(),
|
|
24
|
+
/**
|
|
25
|
+
* Nest each executed slice's live fills
|
|
26
|
+
*/
|
|
27
|
+
include: z.literal("fills").optional()
|
|
28
|
+
});
|
|
15
29
|
|
|
16
|
-
export { ScheduleListParams };
|
|
30
|
+
export { ScheduleDetailParams, ScheduleListParams };
|
|
@@ -36,44 +36,11 @@ export declare const ScheduleListResponse: z.ZodObject<{
|
|
|
36
36
|
}>>;
|
|
37
37
|
createdAt: z.ZodString;
|
|
38
38
|
updatedAt: z.ZodString;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
PROVISIONAL: "PROVISIONAL";
|
|
45
|
-
CONFIRMED: "CONFIRMED";
|
|
46
|
-
RECONCILED: "RECONCILED";
|
|
47
|
-
}>;
|
|
48
|
-
tradeAccountId: z.ZodUUID;
|
|
49
|
-
symbol: z.ZodString;
|
|
50
|
-
positionId: z.ZodUUID;
|
|
51
|
-
connector: z.ZodEnum<{
|
|
52
|
-
hyperliquid: "hyperliquid";
|
|
53
|
-
binance: "binance";
|
|
54
|
-
bybit: "bybit";
|
|
55
|
-
okx: "okx";
|
|
56
|
-
lighter: "lighter";
|
|
57
|
-
lighter_rhc: "lighter_rhc";
|
|
58
|
-
}>;
|
|
59
|
-
side: z.ZodEnum<{
|
|
60
|
-
BUY: "BUY";
|
|
61
|
-
SELL: "SELL";
|
|
62
|
-
}>;
|
|
63
|
-
reduceOnly: z.ZodBoolean;
|
|
64
|
-
isExternal: z.ZodBoolean;
|
|
65
|
-
synthetic: z.ZodBoolean;
|
|
66
|
-
quantity: z.ZodString;
|
|
67
|
-
price: z.ZodString;
|
|
68
|
-
usd: z.ZodString;
|
|
69
|
-
tradeFee: z.ZodOptional<z.ZodString>;
|
|
70
|
-
pearFee: z.ZodOptional<z.ZodString>;
|
|
71
|
-
timestamp: z.ZodString;
|
|
72
|
-
original: z.ZodOptional<z.ZodObject<{
|
|
73
|
-
exchangeFillId: z.ZodString;
|
|
74
|
-
quantity: z.ZodString;
|
|
75
|
-
}, z.core.$strip>>;
|
|
76
|
-
}, z.core.$strip>>>;
|
|
39
|
+
executedSliceCount: z.ZodNumber;
|
|
40
|
+
filledUsd: z.ZodString;
|
|
41
|
+
filledQuantities: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
42
|
+
progress: z.ZodNumber;
|
|
43
|
+
legProgress: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
77
44
|
strategy: z.ZodLiteral<"TWAP">;
|
|
78
45
|
intent: z.ZodLiteral<"OPEN">;
|
|
79
46
|
sliceIntervalSec: z.ZodNumber;
|
|
@@ -127,44 +94,11 @@ export declare const ScheduleListResponse: z.ZodObject<{
|
|
|
127
94
|
}>>;
|
|
128
95
|
createdAt: z.ZodString;
|
|
129
96
|
updatedAt: z.ZodString;
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
PROVISIONAL: "PROVISIONAL";
|
|
136
|
-
CONFIRMED: "CONFIRMED";
|
|
137
|
-
RECONCILED: "RECONCILED";
|
|
138
|
-
}>;
|
|
139
|
-
tradeAccountId: z.ZodUUID;
|
|
140
|
-
symbol: z.ZodString;
|
|
141
|
-
positionId: z.ZodUUID;
|
|
142
|
-
connector: z.ZodEnum<{
|
|
143
|
-
hyperliquid: "hyperliquid";
|
|
144
|
-
binance: "binance";
|
|
145
|
-
bybit: "bybit";
|
|
146
|
-
okx: "okx";
|
|
147
|
-
lighter: "lighter";
|
|
148
|
-
lighter_rhc: "lighter_rhc";
|
|
149
|
-
}>;
|
|
150
|
-
side: z.ZodEnum<{
|
|
151
|
-
BUY: "BUY";
|
|
152
|
-
SELL: "SELL";
|
|
153
|
-
}>;
|
|
154
|
-
reduceOnly: z.ZodBoolean;
|
|
155
|
-
isExternal: z.ZodBoolean;
|
|
156
|
-
synthetic: z.ZodBoolean;
|
|
157
|
-
quantity: z.ZodString;
|
|
158
|
-
price: z.ZodString;
|
|
159
|
-
usd: z.ZodString;
|
|
160
|
-
tradeFee: z.ZodOptional<z.ZodString>;
|
|
161
|
-
pearFee: z.ZodOptional<z.ZodString>;
|
|
162
|
-
timestamp: z.ZodString;
|
|
163
|
-
original: z.ZodOptional<z.ZodObject<{
|
|
164
|
-
exchangeFillId: z.ZodString;
|
|
165
|
-
quantity: z.ZodString;
|
|
166
|
-
}, z.core.$strip>>;
|
|
167
|
-
}, z.core.$strip>>>;
|
|
97
|
+
executedSliceCount: z.ZodNumber;
|
|
98
|
+
filledUsd: z.ZodString;
|
|
99
|
+
filledQuantities: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
100
|
+
progress: z.ZodNumber;
|
|
101
|
+
legProgress: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
168
102
|
strategy: z.ZodLiteral<"TWAP">;
|
|
169
103
|
intent: z.ZodLiteral<"CLOSE">;
|
|
170
104
|
sliceIntervalSec: z.ZodNumber;
|
|
@@ -178,7 +112,9 @@ export declare const ScheduleListResponse: z.ZodObject<{
|
|
|
178
112
|
}, z.core.$strip>], "intent">>;
|
|
179
113
|
}, z.core.$strip>;
|
|
180
114
|
export type ScheduleListResponse = z.output<typeof ScheduleListResponse>;
|
|
181
|
-
export declare const
|
|
115
|
+
export declare const ScheduleDetailResponse: z.ZodObject<{
|
|
116
|
+
limit: z.ZodNumber;
|
|
117
|
+
nextCursor: z.ZodOptional<z.ZodString>;
|
|
182
118
|
schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
183
119
|
id: z.ZodUUID;
|
|
184
120
|
connector: z.ZodEnum<{
|
|
@@ -213,44 +149,11 @@ export declare const CreateScheduleResponse: z.ZodObject<{
|
|
|
213
149
|
}>>;
|
|
214
150
|
createdAt: z.ZodString;
|
|
215
151
|
updatedAt: z.ZodString;
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
PROVISIONAL: "PROVISIONAL";
|
|
222
|
-
CONFIRMED: "CONFIRMED";
|
|
223
|
-
RECONCILED: "RECONCILED";
|
|
224
|
-
}>;
|
|
225
|
-
tradeAccountId: z.ZodUUID;
|
|
226
|
-
symbol: z.ZodString;
|
|
227
|
-
positionId: z.ZodUUID;
|
|
228
|
-
connector: z.ZodEnum<{
|
|
229
|
-
hyperliquid: "hyperliquid";
|
|
230
|
-
binance: "binance";
|
|
231
|
-
bybit: "bybit";
|
|
232
|
-
okx: "okx";
|
|
233
|
-
lighter: "lighter";
|
|
234
|
-
lighter_rhc: "lighter_rhc";
|
|
235
|
-
}>;
|
|
236
|
-
side: z.ZodEnum<{
|
|
237
|
-
BUY: "BUY";
|
|
238
|
-
SELL: "SELL";
|
|
239
|
-
}>;
|
|
240
|
-
reduceOnly: z.ZodBoolean;
|
|
241
|
-
isExternal: z.ZodBoolean;
|
|
242
|
-
synthetic: z.ZodBoolean;
|
|
243
|
-
quantity: z.ZodString;
|
|
244
|
-
price: z.ZodString;
|
|
245
|
-
usd: z.ZodString;
|
|
246
|
-
tradeFee: z.ZodOptional<z.ZodString>;
|
|
247
|
-
pearFee: z.ZodOptional<z.ZodString>;
|
|
248
|
-
timestamp: z.ZodString;
|
|
249
|
-
original: z.ZodOptional<z.ZodObject<{
|
|
250
|
-
exchangeFillId: z.ZodString;
|
|
251
|
-
quantity: z.ZodString;
|
|
252
|
-
}, z.core.$strip>>;
|
|
253
|
-
}, z.core.$strip>>>;
|
|
152
|
+
executedSliceCount: z.ZodNumber;
|
|
153
|
+
filledUsd: z.ZodString;
|
|
154
|
+
filledQuantities: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
155
|
+
progress: z.ZodNumber;
|
|
156
|
+
legProgress: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
254
157
|
strategy: z.ZodLiteral<"TWAP">;
|
|
255
158
|
intent: z.ZodLiteral<"OPEN">;
|
|
256
159
|
sliceIntervalSec: z.ZodNumber;
|
|
@@ -304,6 +207,29 @@ export declare const CreateScheduleResponse: z.ZodObject<{
|
|
|
304
207
|
}>>;
|
|
305
208
|
createdAt: z.ZodString;
|
|
306
209
|
updatedAt: z.ZodString;
|
|
210
|
+
executedSliceCount: z.ZodNumber;
|
|
211
|
+
filledUsd: z.ZodString;
|
|
212
|
+
filledQuantities: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
213
|
+
progress: z.ZodNumber;
|
|
214
|
+
legProgress: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
215
|
+
strategy: z.ZodLiteral<"TWAP">;
|
|
216
|
+
intent: z.ZodLiteral<"CLOSE">;
|
|
217
|
+
sliceIntervalSec: z.ZodNumber;
|
|
218
|
+
sliceCount: z.ZodNumber;
|
|
219
|
+
randomization: z.ZodObject<{
|
|
220
|
+
timingJitterBps: z.ZodInt;
|
|
221
|
+
sizeJitterBps: z.ZodInt;
|
|
222
|
+
}, z.core.$strip>;
|
|
223
|
+
positionId: z.ZodUUID;
|
|
224
|
+
initialExposure: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<`-${string}` | `+${string}`, string>>>;
|
|
225
|
+
}, z.core.$strip>], "intent">;
|
|
226
|
+
slices: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
227
|
+
index: z.ZodNumber;
|
|
228
|
+
scheduledAt: z.ZodString;
|
|
229
|
+
status: z.ZodLiteral<"EXECUTED">;
|
|
230
|
+
usd: z.ZodString;
|
|
231
|
+
quantities: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
232
|
+
lastFilledAt: z.ZodString;
|
|
307
233
|
fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
308
234
|
id: z.ZodUUID;
|
|
309
235
|
cloid: z.ZodOptional<z.ZodString>;
|
|
@@ -342,6 +268,115 @@ export declare const CreateScheduleResponse: z.ZodObject<{
|
|
|
342
268
|
quantity: z.ZodString;
|
|
343
269
|
}, z.core.$strip>>;
|
|
344
270
|
}, z.core.$strip>>>;
|
|
271
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
272
|
+
index: z.ZodNumber;
|
|
273
|
+
scheduledAt: z.ZodString;
|
|
274
|
+
status: z.ZodLiteral<"PENDING">;
|
|
275
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
276
|
+
index: z.ZodNumber;
|
|
277
|
+
scheduledAt: z.ZodString;
|
|
278
|
+
status: z.ZodLiteral<"MISSED">;
|
|
279
|
+
}, z.core.$strip>], "status">>;
|
|
280
|
+
}, z.core.$strip>;
|
|
281
|
+
export type ScheduleDetailResponse = z.output<typeof ScheduleDetailResponse>;
|
|
282
|
+
export declare const CreateScheduleResponse: z.ZodObject<{
|
|
283
|
+
schedule: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
284
|
+
id: z.ZodUUID;
|
|
285
|
+
connector: z.ZodEnum<{
|
|
286
|
+
hyperliquid: "hyperliquid";
|
|
287
|
+
binance: "binance";
|
|
288
|
+
bybit: "bybit";
|
|
289
|
+
okx: "okx";
|
|
290
|
+
lighter: "lighter";
|
|
291
|
+
lighter_rhc: "lighter_rhc";
|
|
292
|
+
}>;
|
|
293
|
+
status: z.ZodEnum<{
|
|
294
|
+
FAILED: "FAILED";
|
|
295
|
+
ACTIVE: "ACTIVE";
|
|
296
|
+
CANCELLED: "CANCELLED";
|
|
297
|
+
COMPLETED: "COMPLETED";
|
|
298
|
+
}>;
|
|
299
|
+
positionKey: z.ZodString;
|
|
300
|
+
executionType: z.ZodEnum<{
|
|
301
|
+
MARKET: "MARKET";
|
|
302
|
+
}>;
|
|
303
|
+
lastSliceAt: z.ZodOptional<z.ZodString>;
|
|
304
|
+
startAt: z.ZodString;
|
|
305
|
+
endAt: z.ZodString;
|
|
306
|
+
cancelledAt: z.ZodOptional<z.ZodString>;
|
|
307
|
+
cancelledReason: z.ZodOptional<z.ZodEnum<{
|
|
308
|
+
USER: "USER";
|
|
309
|
+
POSITION_CLOSED: "POSITION_CLOSED";
|
|
310
|
+
SYSTEM: "SYSTEM";
|
|
311
|
+
POSITION_NETTED: "POSITION_NETTED";
|
|
312
|
+
POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
|
|
313
|
+
POSITION_REVERSED: "POSITION_REVERSED";
|
|
314
|
+
}>>;
|
|
315
|
+
createdAt: z.ZodString;
|
|
316
|
+
updatedAt: z.ZodString;
|
|
317
|
+
executedSliceCount: z.ZodNumber;
|
|
318
|
+
filledUsd: z.ZodString;
|
|
319
|
+
filledQuantities: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
320
|
+
progress: z.ZodNumber;
|
|
321
|
+
legProgress: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
322
|
+
strategy: z.ZodLiteral<"TWAP">;
|
|
323
|
+
intent: z.ZodLiteral<"OPEN">;
|
|
324
|
+
sliceIntervalSec: z.ZodNumber;
|
|
325
|
+
sliceCount: z.ZodNumber;
|
|
326
|
+
randomization: z.ZodObject<{
|
|
327
|
+
timingJitterBps: z.ZodInt;
|
|
328
|
+
sizeJitterBps: z.ZodInt;
|
|
329
|
+
}, z.core.$strip>;
|
|
330
|
+
legs: z.ZodArray<z.ZodObject<{
|
|
331
|
+
id: z.ZodOptional<z.ZodString>;
|
|
332
|
+
symbol: z.ZodString;
|
|
333
|
+
side: z.ZodEnum<{
|
|
334
|
+
BUY: "BUY";
|
|
335
|
+
SELL: "SELL";
|
|
336
|
+
}>;
|
|
337
|
+
weight: z.ZodNumber;
|
|
338
|
+
}, z.core.$strip>>;
|
|
339
|
+
targetNotional: z.ZodString;
|
|
340
|
+
remainingNotional: z.ZodString;
|
|
341
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
342
|
+
id: z.ZodUUID;
|
|
343
|
+
connector: z.ZodEnum<{
|
|
344
|
+
hyperliquid: "hyperliquid";
|
|
345
|
+
binance: "binance";
|
|
346
|
+
bybit: "bybit";
|
|
347
|
+
okx: "okx";
|
|
348
|
+
lighter: "lighter";
|
|
349
|
+
lighter_rhc: "lighter_rhc";
|
|
350
|
+
}>;
|
|
351
|
+
status: z.ZodEnum<{
|
|
352
|
+
FAILED: "FAILED";
|
|
353
|
+
ACTIVE: "ACTIVE";
|
|
354
|
+
CANCELLED: "CANCELLED";
|
|
355
|
+
COMPLETED: "COMPLETED";
|
|
356
|
+
}>;
|
|
357
|
+
positionKey: z.ZodString;
|
|
358
|
+
executionType: z.ZodEnum<{
|
|
359
|
+
MARKET: "MARKET";
|
|
360
|
+
}>;
|
|
361
|
+
lastSliceAt: z.ZodOptional<z.ZodString>;
|
|
362
|
+
startAt: z.ZodString;
|
|
363
|
+
endAt: z.ZodString;
|
|
364
|
+
cancelledAt: z.ZodOptional<z.ZodString>;
|
|
365
|
+
cancelledReason: z.ZodOptional<z.ZodEnum<{
|
|
366
|
+
USER: "USER";
|
|
367
|
+
POSITION_CLOSED: "POSITION_CLOSED";
|
|
368
|
+
SYSTEM: "SYSTEM";
|
|
369
|
+
POSITION_NETTED: "POSITION_NETTED";
|
|
370
|
+
POSITION_LIQUIDATED: "POSITION_LIQUIDATED";
|
|
371
|
+
POSITION_REVERSED: "POSITION_REVERSED";
|
|
372
|
+
}>>;
|
|
373
|
+
createdAt: z.ZodString;
|
|
374
|
+
updatedAt: z.ZodString;
|
|
375
|
+
executedSliceCount: z.ZodNumber;
|
|
376
|
+
filledUsd: z.ZodString;
|
|
377
|
+
filledQuantities: z.ZodRecord<z.ZodString, z.ZodString>;
|
|
378
|
+
progress: z.ZodNumber;
|
|
379
|
+
legProgress: z.ZodRecord<z.ZodString, z.ZodNumber>;
|
|
345
380
|
strategy: z.ZodLiteral<"TWAP">;
|
|
346
381
|
intent: z.ZodLiteral<"CLOSE">;
|
|
347
382
|
sliceIntervalSec: z.ZodNumber;
|