@kuest/bindings 0.0.0-stage → 0.13.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.
- package/LICENSE +21 -0
- package/README.md +4 -2
- package/dist/chunk-2KNK5TP7.js +2 -0
- package/dist/chunk-2KNK5TP7.js.map +1 -0
- package/dist/chunk-53SZ2ZWR.js +2 -0
- package/dist/chunk-53SZ2ZWR.js.map +1 -0
- package/dist/chunk-HOD4LKZU.js +2 -0
- package/dist/chunk-HOD4LKZU.js.map +1 -0
- package/dist/chunk-XSRN2HAT.js +2 -0
- package/dist/chunk-XSRN2HAT.js.map +1 -0
- package/dist/clob/index.d.ts +5390 -0
- package/dist/clob/index.js +2 -0
- package/dist/clob/index.js.map +1 -0
- package/dist/combos/index.d.ts +1126 -0
- package/dist/combos/index.js +2 -0
- package/dist/combos/index.js.map +1 -0
- package/dist/comment-CSYM3bRy.d.ts +945 -0
- package/dist/data/index.d.ts +4863 -0
- package/dist/data/index.js +2 -0
- package/dist/data/index.js.map +1 -0
- package/dist/gamma/index.d.ts +10129 -0
- package/dist/gamma/index.js +2 -0
- package/dist/gamma/index.js.map +1 -0
- package/dist/index.d.ts +112 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/orders-MU1eB8o-.d.ts +2929 -0
- package/dist/perps/index.d.ts +2884 -0
- package/dist/perps/index.js +2 -0
- package/dist/perps/index.js.map +1 -0
- package/dist/relayer/index.d.ts +227 -0
- package/dist/relayer/index.js +2 -0
- package/dist/relayer/index.js.map +1 -0
- package/dist/shared-Dm807IWG.d.ts +223 -0
- package/dist/signature-type-CrLAA9AN.d.ts +23 -0
- package/dist/subscriptions/index.d.ts +7963 -0
- package/dist/subscriptions/index.js +2 -0
- package/dist/subscriptions/index.js.map +1 -0
- package/package.json +92 -3
|
@@ -0,0 +1,2929 @@
|
|
|
1
|
+
import { y as DecimalString, B as BaseUnits, H as EpochMilliseconds, af as OrderSide } from './shared-Dm807IWG.js';
|
|
2
|
+
import * as _kuest_types from '@kuest/types';
|
|
3
|
+
import { EvmAddress, PrivateKey, TxHash } from '@kuest/types';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
|
|
6
|
+
type Tagged<T, Tag extends string> = T & {
|
|
7
|
+
readonly __tag: Tag;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
11
|
+
*/
|
|
12
|
+
type PerpsInstrumentId = Tagged<number, 'PerpsInstrumentId'>;
|
|
13
|
+
/**
|
|
14
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
15
|
+
*/
|
|
16
|
+
type PerpsOrderId = Tagged<number, 'PerpsOrderId'>;
|
|
17
|
+
/**
|
|
18
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
19
|
+
*/
|
|
20
|
+
type PerpsClientOrderId = Tagged<string, 'PerpsClientOrderId'>;
|
|
21
|
+
/**
|
|
22
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
23
|
+
*/
|
|
24
|
+
type PerpsNotificationId = Tagged<string, 'PerpsNotificationId'>;
|
|
25
|
+
/**
|
|
26
|
+
* Opaque receipt identity, unique within the authenticated builder account.
|
|
27
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
28
|
+
*/
|
|
29
|
+
type PerpsBuilderEarningId = Tagged<string, 'PerpsBuilderEarningId'>;
|
|
30
|
+
/**
|
|
31
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
32
|
+
*/
|
|
33
|
+
type PerpsTradeId = Tagged<number, 'PerpsTradeId'>;
|
|
34
|
+
/**
|
|
35
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
36
|
+
*/
|
|
37
|
+
type PerpsFundingPaymentId = Tagged<number, 'PerpsFundingPaymentId'>;
|
|
38
|
+
/**
|
|
39
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
40
|
+
*/
|
|
41
|
+
type PerpsWithdrawalId = Tagged<number, 'PerpsWithdrawalId'>;
|
|
42
|
+
/**
|
|
43
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
44
|
+
*/
|
|
45
|
+
type PerpsInternalTransferId = Tagged<number, 'PerpsInternalTransferId'>;
|
|
46
|
+
/**
|
|
47
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
48
|
+
*/
|
|
49
|
+
type PerpsEntityId = Tagged<number, 'PerpsEntityId'>;
|
|
50
|
+
/**
|
|
51
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
52
|
+
*/
|
|
53
|
+
type PerpsFundingInterval = `${number}h`;
|
|
54
|
+
/**
|
|
55
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
56
|
+
*/
|
|
57
|
+
declare const PerpsInstrumentIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
58
|
+
/**
|
|
59
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
60
|
+
*/
|
|
61
|
+
declare const PerpsOrderIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
62
|
+
/**
|
|
63
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
64
|
+
*/
|
|
65
|
+
declare const PerpsClientOrderIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>;
|
|
66
|
+
/**
|
|
67
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
68
|
+
*/
|
|
69
|
+
declare const PerpsNotificationIdSchema: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
70
|
+
/**
|
|
71
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
72
|
+
*/
|
|
73
|
+
declare const PerpsBuilderEarningIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<PerpsBuilderEarningId, string>>;
|
|
74
|
+
/**
|
|
75
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
76
|
+
*/
|
|
77
|
+
declare const PerpsTradeIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
78
|
+
/**
|
|
79
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
80
|
+
*/
|
|
81
|
+
declare const PerpsFundingPaymentIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsFundingPaymentId, number>>;
|
|
82
|
+
/**
|
|
83
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
84
|
+
*/
|
|
85
|
+
declare const PerpsWithdrawalIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsWithdrawalId, number>>;
|
|
86
|
+
/**
|
|
87
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
88
|
+
*/
|
|
89
|
+
declare const PerpsInternalTransferIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInternalTransferId, number>>;
|
|
90
|
+
/**
|
|
91
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
92
|
+
*/
|
|
93
|
+
declare const PerpsEntityIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsEntityId, number>>;
|
|
94
|
+
/**
|
|
95
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
96
|
+
*/
|
|
97
|
+
declare const PerpsFundingIntervalSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`${number}h`, string>>;
|
|
98
|
+
/**
|
|
99
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
100
|
+
*/
|
|
101
|
+
declare const PerpsDecimalInputSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
102
|
+
/**
|
|
103
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
104
|
+
*/
|
|
105
|
+
type PerpsDecimalInput = z.input<typeof PerpsDecimalInputSchema>;
|
|
106
|
+
/**
|
|
107
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
108
|
+
*/
|
|
109
|
+
declare enum PerpsInstrumentType {
|
|
110
|
+
Perpetual = "perpetual"
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
114
|
+
*/
|
|
115
|
+
declare enum PerpsInstrumentCategory {
|
|
116
|
+
Equity = "equity",
|
|
117
|
+
Commodity = "commodity",
|
|
118
|
+
Index = "index",
|
|
119
|
+
Crypto = "crypto"
|
|
120
|
+
}
|
|
121
|
+
/**
|
|
122
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
123
|
+
*/
|
|
124
|
+
declare enum PerpsSide {
|
|
125
|
+
Long = "long",
|
|
126
|
+
Short = "short"
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
130
|
+
*/
|
|
131
|
+
declare enum PerpsTimeInForce {
|
|
132
|
+
GTC = "gtc",
|
|
133
|
+
GTD = "gtd",
|
|
134
|
+
IOC = "ioc",
|
|
135
|
+
FOK = "fok"
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
139
|
+
*/
|
|
140
|
+
declare enum PerpsTpSlKind {
|
|
141
|
+
TakeProfit = "tp",
|
|
142
|
+
StopLoss = "sl"
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
146
|
+
*/
|
|
147
|
+
declare enum PerpsTpSlScope {
|
|
148
|
+
Order = "order",
|
|
149
|
+
Position = "position"
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
153
|
+
*/
|
|
154
|
+
declare enum PerpsDepositStatus {
|
|
155
|
+
Pending = "pending",
|
|
156
|
+
Confirmed = "confirmed",
|
|
157
|
+
Removed = "removed"
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Known withdrawal statuses.
|
|
161
|
+
*
|
|
162
|
+
* The service evolves this set independently of released clients, so
|
|
163
|
+
* withdrawal parsing accepts unknown statuses as plain strings; see
|
|
164
|
+
* {@link PerpsWithdrawalStatus}.
|
|
165
|
+
*
|
|
166
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
167
|
+
*/
|
|
168
|
+
declare enum PerpsKnownWithdrawalStatus {
|
|
169
|
+
Pending = "pending",
|
|
170
|
+
Confirmed = "confirmed",
|
|
171
|
+
Removed = "removed",
|
|
172
|
+
Failed = "failed"
|
|
173
|
+
}
|
|
174
|
+
/**
|
|
175
|
+
* A withdrawal status. Known statuses are enumerated in
|
|
176
|
+
* {@link PerpsKnownWithdrawalStatus}; newly introduced statuses flow through
|
|
177
|
+
* as plain strings so they can be handled before a client release that
|
|
178
|
+
* enumerates them.
|
|
179
|
+
*
|
|
180
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
181
|
+
*/
|
|
182
|
+
type PerpsWithdrawalStatus = PerpsKnownWithdrawalStatus | (string & {});
|
|
183
|
+
/**
|
|
184
|
+
* Known internal-transfer classifications.
|
|
185
|
+
*
|
|
186
|
+
* The service evolves this set independently of released clients, so
|
|
187
|
+
* transfer parsing accepts unknown classifications as plain strings; see
|
|
188
|
+
* {@link PerpsInternalTransferType}.
|
|
189
|
+
*
|
|
190
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
191
|
+
*/
|
|
192
|
+
declare enum PerpsKnownInternalTransferType {
|
|
193
|
+
Transfer = "transfer",
|
|
194
|
+
ReferralPayout = "referral_payout"
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* An internal-transfer classification. Known values are enumerated in
|
|
198
|
+
* {@link PerpsKnownInternalTransferType}; newly introduced values flow through
|
|
199
|
+
* as plain strings so they can be handled before a client release that
|
|
200
|
+
* enumerates them.
|
|
201
|
+
*
|
|
202
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
203
|
+
*/
|
|
204
|
+
type PerpsInternalTransferType = PerpsKnownInternalTransferType | (string & {});
|
|
205
|
+
/**
|
|
206
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
207
|
+
*/
|
|
208
|
+
declare enum PerpsInternalTransferDirection {
|
|
209
|
+
In = "in",
|
|
210
|
+
Out = "out"
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
214
|
+
*/
|
|
215
|
+
declare enum PerpsKlineInterval {
|
|
216
|
+
OneSecond = "1s",
|
|
217
|
+
OneMinute = "1m",
|
|
218
|
+
FiveMinutes = "5m",
|
|
219
|
+
FifteenMinutes = "15m",
|
|
220
|
+
OneHour = "1h",
|
|
221
|
+
FourHours = "4h",
|
|
222
|
+
OneDay = "1d",
|
|
223
|
+
OneWeek = "1w"
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
227
|
+
*/
|
|
228
|
+
declare enum PerpsPnlInterval {
|
|
229
|
+
OneHour = "1h",
|
|
230
|
+
FourHours = "4h",
|
|
231
|
+
OneDay = "1d",
|
|
232
|
+
OneWeek = "1w"
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
236
|
+
*/
|
|
237
|
+
declare enum PerpsSortDirection {
|
|
238
|
+
Descending = "desc",
|
|
239
|
+
Ascending = "asc"
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
243
|
+
*/
|
|
244
|
+
declare const PerpsInstrumentTypeSchema: z.ZodEnum<typeof PerpsInstrumentType>;
|
|
245
|
+
/**
|
|
246
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
247
|
+
*/
|
|
248
|
+
declare const PerpsInstrumentCategorySchema: z.ZodEnum<typeof PerpsInstrumentCategory>;
|
|
249
|
+
/**
|
|
250
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
251
|
+
*/
|
|
252
|
+
declare const PerpsSideSchema: z.ZodEnum<typeof PerpsSide>;
|
|
253
|
+
/**
|
|
254
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
255
|
+
*/
|
|
256
|
+
declare const PerpsTimeInForceSchema: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
257
|
+
/**
|
|
258
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
259
|
+
*/
|
|
260
|
+
declare const PerpsTpSlKindSchema: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
261
|
+
/**
|
|
262
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
263
|
+
*/
|
|
264
|
+
declare const PerpsTpSlScopeSchema: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
265
|
+
/**
|
|
266
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
267
|
+
*/
|
|
268
|
+
declare const PerpsDepositStatusSchema: z.ZodEnum<typeof PerpsDepositStatus>;
|
|
269
|
+
/**
|
|
270
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
271
|
+
*/
|
|
272
|
+
declare const PerpsWithdrawalStatusSchema: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | PerpsKnownWithdrawalStatus, string>>;
|
|
273
|
+
/**
|
|
274
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
275
|
+
*/
|
|
276
|
+
declare const PerpsInternalTransferTypeSchema: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | PerpsKnownInternalTransferType, string>>;
|
|
277
|
+
/**
|
|
278
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
279
|
+
*/
|
|
280
|
+
declare const PerpsInternalTransferDirectionSchema: z.ZodEnum<typeof PerpsInternalTransferDirection>;
|
|
281
|
+
/**
|
|
282
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
283
|
+
*/
|
|
284
|
+
declare const PerpsKlineIntervalSchema: z.ZodEnum<typeof PerpsKlineInterval>;
|
|
285
|
+
/**
|
|
286
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
287
|
+
*/
|
|
288
|
+
declare const PerpsPnlIntervalSchema: z.ZodEnum<typeof PerpsPnlInterval>;
|
|
289
|
+
/**
|
|
290
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
291
|
+
*/
|
|
292
|
+
declare const PerpsSortDirectionSchema: z.ZodEnum<typeof PerpsSortDirection>;
|
|
293
|
+
/**
|
|
294
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
295
|
+
*/
|
|
296
|
+
declare const PerpsAssetSchema: z.ZodString;
|
|
297
|
+
/**
|
|
298
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
299
|
+
*/
|
|
300
|
+
declare const PerpsTxHashSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<TxHash, string>>>>;
|
|
301
|
+
/**
|
|
302
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
303
|
+
*/
|
|
304
|
+
declare const PerpsDataResponseSchema: <T extends z.ZodType>(itemSchema: T) => z.ZodObject<{
|
|
305
|
+
data: z.ZodArray<T>;
|
|
306
|
+
more: z.ZodBoolean;
|
|
307
|
+
}, z.core.$strip>;
|
|
308
|
+
/**
|
|
309
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
310
|
+
*/
|
|
311
|
+
type PerpsCredentials = {
|
|
312
|
+
proxy: EvmAddress;
|
|
313
|
+
privateKey: PrivateKey;
|
|
314
|
+
secret: string;
|
|
315
|
+
expiresAt: number;
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
319
|
+
*/
|
|
320
|
+
type PerpsDepositAmount = BaseUnits;
|
|
321
|
+
/**
|
|
322
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
323
|
+
*/
|
|
324
|
+
type PerpsWithdrawalAmount = BaseUnits;
|
|
325
|
+
/**
|
|
326
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
327
|
+
*/
|
|
328
|
+
type PerpsTxHash = TxHash;
|
|
329
|
+
/**
|
|
330
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
331
|
+
*/
|
|
332
|
+
type PerpsDecimal = DecimalString;
|
|
333
|
+
/**
|
|
334
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
335
|
+
*/
|
|
336
|
+
declare function perpsDecimal(value: string | number): DecimalString;
|
|
337
|
+
/**
|
|
338
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
339
|
+
*/
|
|
340
|
+
declare function perpsBaseUnits(value: string): BaseUnits;
|
|
341
|
+
/**
|
|
342
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
343
|
+
*/
|
|
344
|
+
declare function decimalString(value: string): DecimalString;
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* Saved attribution and the decimal fraction charged on executed notional.
|
|
348
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
349
|
+
*/
|
|
350
|
+
declare const PerpsBuilderTermsSchema: z.ZodPipe<z.ZodObject<{
|
|
351
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
352
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
353
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
354
|
+
address: _kuest_types.EvmAddress;
|
|
355
|
+
feeRate: DecimalString;
|
|
356
|
+
}, {
|
|
357
|
+
address: _kuest_types.EvmAddress;
|
|
358
|
+
fee_rate: DecimalString;
|
|
359
|
+
}>>;
|
|
360
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
361
|
+
type PerpsBuilderTerms = z.infer<typeof PerpsBuilderTermsSchema>;
|
|
362
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
363
|
+
declare const PerpsBuilderStatusSchema: z.ZodPipe<z.ZodObject<{
|
|
364
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
365
|
+
registered: z.ZodBoolean;
|
|
366
|
+
enabled: z.ZodBoolean;
|
|
367
|
+
admission_enabled: z.ZodBoolean;
|
|
368
|
+
max_fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
369
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
370
|
+
address: _kuest_types.EvmAddress;
|
|
371
|
+
registered: boolean;
|
|
372
|
+
enabled: boolean;
|
|
373
|
+
admissionEnabled: boolean;
|
|
374
|
+
maxFeeRate: DecimalString;
|
|
375
|
+
}, {
|
|
376
|
+
address: _kuest_types.EvmAddress;
|
|
377
|
+
registered: boolean;
|
|
378
|
+
enabled: boolean;
|
|
379
|
+
admission_enabled: boolean;
|
|
380
|
+
max_fee_rate: DecimalString;
|
|
381
|
+
}>>;
|
|
382
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
383
|
+
type PerpsBuilderStatus = z.infer<typeof PerpsBuilderStatusSchema>;
|
|
384
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
385
|
+
declare const PerpsBuilderApprovalSchema: z.ZodPipe<z.ZodObject<{
|
|
386
|
+
trader: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
387
|
+
builder: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
388
|
+
max_fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
389
|
+
approval_version: z.ZodNumber;
|
|
390
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
391
|
+
sequence: z.ZodNumber;
|
|
392
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
393
|
+
trader: _kuest_types.EvmAddress;
|
|
394
|
+
builder: _kuest_types.EvmAddress;
|
|
395
|
+
maxFeeRate: DecimalString;
|
|
396
|
+
approvalVersion: number;
|
|
397
|
+
timestamp: EpochMilliseconds;
|
|
398
|
+
sequence: number;
|
|
399
|
+
}, {
|
|
400
|
+
trader: _kuest_types.EvmAddress;
|
|
401
|
+
builder: _kuest_types.EvmAddress;
|
|
402
|
+
max_fee_rate: DecimalString;
|
|
403
|
+
approval_version: number;
|
|
404
|
+
timestamp: EpochMilliseconds;
|
|
405
|
+
sequence: number;
|
|
406
|
+
}>>;
|
|
407
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
408
|
+
type PerpsBuilderApproval = z.infer<typeof PerpsBuilderApprovalSchema>;
|
|
409
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
410
|
+
declare const FetchPerpsBuilderApprovalsResponseSchema: z.ZodObject<{
|
|
411
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
412
|
+
trader: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
413
|
+
builder: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
414
|
+
max_fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
415
|
+
approval_version: z.ZodNumber;
|
|
416
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
417
|
+
sequence: z.ZodNumber;
|
|
418
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
419
|
+
trader: _kuest_types.EvmAddress;
|
|
420
|
+
builder: _kuest_types.EvmAddress;
|
|
421
|
+
maxFeeRate: DecimalString;
|
|
422
|
+
approvalVersion: number;
|
|
423
|
+
timestamp: EpochMilliseconds;
|
|
424
|
+
sequence: number;
|
|
425
|
+
}, {
|
|
426
|
+
trader: _kuest_types.EvmAddress;
|
|
427
|
+
builder: _kuest_types.EvmAddress;
|
|
428
|
+
max_fee_rate: DecimalString;
|
|
429
|
+
approval_version: number;
|
|
430
|
+
timestamp: EpochMilliseconds;
|
|
431
|
+
sequence: number;
|
|
432
|
+
}>>>;
|
|
433
|
+
}, z.core.$strip>;
|
|
434
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
435
|
+
declare enum PerpsLiquidityRole {
|
|
436
|
+
Maker = "maker",
|
|
437
|
+
Taker = "taker"
|
|
438
|
+
}
|
|
439
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
440
|
+
declare const PerpsBuilderEarningSchema: z.ZodPipe<z.ZodObject<{
|
|
441
|
+
earning_id: z.ZodPipe<z.ZodString, z.ZodTransform<PerpsBuilderEarningId, string>>;
|
|
442
|
+
trade_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
443
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
444
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
445
|
+
trader: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
446
|
+
buy: z.ZodBoolean;
|
|
447
|
+
price: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
448
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
449
|
+
client_order_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
450
|
+
side: z.ZodEnum<typeof PerpsLiquidityRole>;
|
|
451
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
452
|
+
sequence: z.ZodNumber;
|
|
453
|
+
notional: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
454
|
+
fee_asset: z.ZodString;
|
|
455
|
+
fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
456
|
+
builder_fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
457
|
+
total_fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
458
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
459
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
460
|
+
liquidityRole: PerpsLiquidityRole;
|
|
461
|
+
timestamp: EpochMilliseconds;
|
|
462
|
+
sequence: number;
|
|
463
|
+
notional: DecimalString;
|
|
464
|
+
feeAsset: string;
|
|
465
|
+
/** Exchange fee for the fill, excluding the builder fee. */
|
|
466
|
+
fee: DecimalString;
|
|
467
|
+
/** Builder fee charged in addition to `fee` and credited to this builder. */
|
|
468
|
+
builderFee: DecimalString;
|
|
469
|
+
/** Sum of `fee` and `builderFee`. */
|
|
470
|
+
totalFee: DecimalString;
|
|
471
|
+
/** Builder fee rate for the fill, as a decimal fraction of `notional`. */
|
|
472
|
+
feeRate: DecimalString;
|
|
473
|
+
clientOrderId?: PerpsClientOrderId | undefined;
|
|
474
|
+
earningId: PerpsBuilderEarningId;
|
|
475
|
+
tradeId: PerpsTradeId;
|
|
476
|
+
orderId: PerpsOrderId;
|
|
477
|
+
instrumentId: PerpsInstrumentId;
|
|
478
|
+
trader: _kuest_types.EvmAddress;
|
|
479
|
+
side: OrderSide;
|
|
480
|
+
price: DecimalString;
|
|
481
|
+
quantity: DecimalString;
|
|
482
|
+
}, {
|
|
483
|
+
earning_id: PerpsBuilderEarningId;
|
|
484
|
+
trade_id: PerpsTradeId;
|
|
485
|
+
order_id: PerpsOrderId;
|
|
486
|
+
instrument_id: PerpsInstrumentId;
|
|
487
|
+
trader: _kuest_types.EvmAddress;
|
|
488
|
+
buy: boolean;
|
|
489
|
+
price: DecimalString;
|
|
490
|
+
quantity: DecimalString;
|
|
491
|
+
side: PerpsLiquidityRole;
|
|
492
|
+
timestamp: EpochMilliseconds;
|
|
493
|
+
sequence: number;
|
|
494
|
+
notional: DecimalString;
|
|
495
|
+
fee_asset: string;
|
|
496
|
+
fee: DecimalString;
|
|
497
|
+
builder_fee: DecimalString;
|
|
498
|
+
total_fee: DecimalString;
|
|
499
|
+
fee_rate: DecimalString;
|
|
500
|
+
client_order_id?: PerpsClientOrderId | undefined;
|
|
501
|
+
}>>;
|
|
502
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
503
|
+
type PerpsBuilderEarning = z.infer<typeof PerpsBuilderEarningSchema>;
|
|
504
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
505
|
+
declare const PerpsBuilderEarningsSnapshotSchema: z.ZodPipe<z.ZodObject<{
|
|
506
|
+
start_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
507
|
+
end_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
508
|
+
as_of_sequence: z.ZodNumber;
|
|
509
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
510
|
+
start: EpochMilliseconds;
|
|
511
|
+
end: EpochMilliseconds;
|
|
512
|
+
asOfSequence: number;
|
|
513
|
+
}, {
|
|
514
|
+
start_timestamp: EpochMilliseconds;
|
|
515
|
+
end_timestamp: EpochMilliseconds;
|
|
516
|
+
as_of_sequence: number;
|
|
517
|
+
}>>;
|
|
518
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
519
|
+
type PerpsBuilderEarningsSnapshot = z.infer<typeof PerpsBuilderEarningsSnapshotSchema>;
|
|
520
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
521
|
+
declare const ListPerpsBuilderEarningsResponseSchema: z.ZodPipe<z.ZodObject<{
|
|
522
|
+
start_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
523
|
+
end_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
524
|
+
as_of_sequence: z.ZodNumber;
|
|
525
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
526
|
+
earning_id: z.ZodPipe<z.ZodString, z.ZodTransform<PerpsBuilderEarningId, string>>;
|
|
527
|
+
trade_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
528
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
529
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
530
|
+
trader: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
531
|
+
buy: z.ZodBoolean;
|
|
532
|
+
price: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
533
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
534
|
+
client_order_id: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
535
|
+
side: z.ZodEnum<typeof PerpsLiquidityRole>;
|
|
536
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
537
|
+
sequence: z.ZodNumber;
|
|
538
|
+
notional: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
539
|
+
fee_asset: z.ZodString;
|
|
540
|
+
fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
541
|
+
builder_fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
542
|
+
total_fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
543
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
544
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
545
|
+
liquidityRole: PerpsLiquidityRole;
|
|
546
|
+
timestamp: EpochMilliseconds;
|
|
547
|
+
sequence: number;
|
|
548
|
+
notional: DecimalString;
|
|
549
|
+
feeAsset: string;
|
|
550
|
+
/** Exchange fee for the fill, excluding the builder fee. */
|
|
551
|
+
fee: DecimalString;
|
|
552
|
+
/** Builder fee charged in addition to `fee` and credited to this builder. */
|
|
553
|
+
builderFee: DecimalString;
|
|
554
|
+
/** Sum of `fee` and `builderFee`. */
|
|
555
|
+
totalFee: DecimalString;
|
|
556
|
+
/** Builder fee rate for the fill, as a decimal fraction of `notional`. */
|
|
557
|
+
feeRate: DecimalString;
|
|
558
|
+
clientOrderId?: PerpsClientOrderId | undefined;
|
|
559
|
+
earningId: PerpsBuilderEarningId;
|
|
560
|
+
tradeId: PerpsTradeId;
|
|
561
|
+
orderId: PerpsOrderId;
|
|
562
|
+
instrumentId: PerpsInstrumentId;
|
|
563
|
+
trader: _kuest_types.EvmAddress;
|
|
564
|
+
side: OrderSide;
|
|
565
|
+
price: DecimalString;
|
|
566
|
+
quantity: DecimalString;
|
|
567
|
+
}, {
|
|
568
|
+
earning_id: PerpsBuilderEarningId;
|
|
569
|
+
trade_id: PerpsTradeId;
|
|
570
|
+
order_id: PerpsOrderId;
|
|
571
|
+
instrument_id: PerpsInstrumentId;
|
|
572
|
+
trader: _kuest_types.EvmAddress;
|
|
573
|
+
buy: boolean;
|
|
574
|
+
price: DecimalString;
|
|
575
|
+
quantity: DecimalString;
|
|
576
|
+
side: PerpsLiquidityRole;
|
|
577
|
+
timestamp: EpochMilliseconds;
|
|
578
|
+
sequence: number;
|
|
579
|
+
notional: DecimalString;
|
|
580
|
+
fee_asset: string;
|
|
581
|
+
fee: DecimalString;
|
|
582
|
+
builder_fee: DecimalString;
|
|
583
|
+
total_fee: DecimalString;
|
|
584
|
+
fee_rate: DecimalString;
|
|
585
|
+
client_order_id?: PerpsClientOrderId | undefined;
|
|
586
|
+
}>>>;
|
|
587
|
+
more: z.ZodBoolean;
|
|
588
|
+
cursor: z.ZodOptional<z.ZodString>;
|
|
589
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
590
|
+
snapshot: {
|
|
591
|
+
start: EpochMilliseconds;
|
|
592
|
+
end: EpochMilliseconds;
|
|
593
|
+
asOfSequence: number;
|
|
594
|
+
};
|
|
595
|
+
cursor?: string | undefined;
|
|
596
|
+
data: {
|
|
597
|
+
liquidityRole: PerpsLiquidityRole;
|
|
598
|
+
timestamp: EpochMilliseconds;
|
|
599
|
+
sequence: number;
|
|
600
|
+
notional: DecimalString;
|
|
601
|
+
feeAsset: string;
|
|
602
|
+
/** Exchange fee for the fill, excluding the builder fee. */
|
|
603
|
+
fee: DecimalString;
|
|
604
|
+
/** Builder fee charged in addition to `fee` and credited to this builder. */
|
|
605
|
+
builderFee: DecimalString;
|
|
606
|
+
/** Sum of `fee` and `builderFee`. */
|
|
607
|
+
totalFee: DecimalString;
|
|
608
|
+
/** Builder fee rate for the fill, as a decimal fraction of `notional`. */
|
|
609
|
+
feeRate: DecimalString;
|
|
610
|
+
clientOrderId?: PerpsClientOrderId | undefined;
|
|
611
|
+
earningId: PerpsBuilderEarningId;
|
|
612
|
+
tradeId: PerpsTradeId;
|
|
613
|
+
orderId: PerpsOrderId;
|
|
614
|
+
instrumentId: PerpsInstrumentId;
|
|
615
|
+
trader: _kuest_types.EvmAddress;
|
|
616
|
+
side: OrderSide;
|
|
617
|
+
price: DecimalString;
|
|
618
|
+
quantity: DecimalString;
|
|
619
|
+
}[];
|
|
620
|
+
more: boolean;
|
|
621
|
+
}, {
|
|
622
|
+
start_timestamp: EpochMilliseconds;
|
|
623
|
+
end_timestamp: EpochMilliseconds;
|
|
624
|
+
as_of_sequence: number;
|
|
625
|
+
data: {
|
|
626
|
+
liquidityRole: PerpsLiquidityRole;
|
|
627
|
+
timestamp: EpochMilliseconds;
|
|
628
|
+
sequence: number;
|
|
629
|
+
notional: DecimalString;
|
|
630
|
+
feeAsset: string;
|
|
631
|
+
/** Exchange fee for the fill, excluding the builder fee. */
|
|
632
|
+
fee: DecimalString;
|
|
633
|
+
/** Builder fee charged in addition to `fee` and credited to this builder. */
|
|
634
|
+
builderFee: DecimalString;
|
|
635
|
+
/** Sum of `fee` and `builderFee`. */
|
|
636
|
+
totalFee: DecimalString;
|
|
637
|
+
/** Builder fee rate for the fill, as a decimal fraction of `notional`. */
|
|
638
|
+
feeRate: DecimalString;
|
|
639
|
+
clientOrderId?: PerpsClientOrderId | undefined;
|
|
640
|
+
earningId: PerpsBuilderEarningId;
|
|
641
|
+
tradeId: PerpsTradeId;
|
|
642
|
+
orderId: PerpsOrderId;
|
|
643
|
+
instrumentId: PerpsInstrumentId;
|
|
644
|
+
trader: _kuest_types.EvmAddress;
|
|
645
|
+
side: OrderSide;
|
|
646
|
+
price: DecimalString;
|
|
647
|
+
quantity: DecimalString;
|
|
648
|
+
}[];
|
|
649
|
+
more: boolean;
|
|
650
|
+
cursor?: string | undefined;
|
|
651
|
+
}>>;
|
|
652
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
653
|
+
declare const PerpsBuilderEarningsAssetSchema: z.ZodPipe<z.ZodObject<{
|
|
654
|
+
fee_asset: z.ZodString;
|
|
655
|
+
fill_count: z.ZodNumber;
|
|
656
|
+
notional: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
657
|
+
builder_fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
658
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
659
|
+
feeAsset: string;
|
|
660
|
+
fillCount: number;
|
|
661
|
+
notional: DecimalString;
|
|
662
|
+
builderFee: DecimalString;
|
|
663
|
+
}, {
|
|
664
|
+
fee_asset: string;
|
|
665
|
+
fill_count: number;
|
|
666
|
+
notional: DecimalString;
|
|
667
|
+
builder_fee: DecimalString;
|
|
668
|
+
}>>;
|
|
669
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
670
|
+
type PerpsBuilderEarningsAsset = z.infer<typeof PerpsBuilderEarningsAssetSchema>;
|
|
671
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
672
|
+
declare const PerpsBuilderEarningsSummarySchema: z.ZodPipe<z.ZodObject<{
|
|
673
|
+
start_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
674
|
+
end_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
675
|
+
as_of_sequence: z.ZodNumber;
|
|
676
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
677
|
+
fee_asset: z.ZodString;
|
|
678
|
+
fill_count: z.ZodNumber;
|
|
679
|
+
notional: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
680
|
+
builder_fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
681
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
682
|
+
feeAsset: string;
|
|
683
|
+
fillCount: number;
|
|
684
|
+
notional: DecimalString;
|
|
685
|
+
builderFee: DecimalString;
|
|
686
|
+
}, {
|
|
687
|
+
fee_asset: string;
|
|
688
|
+
fill_count: number;
|
|
689
|
+
notional: DecimalString;
|
|
690
|
+
builder_fee: DecimalString;
|
|
691
|
+
}>>>;
|
|
692
|
+
trader_count: z.ZodNumber;
|
|
693
|
+
active_approval_count: z.ZodNumber;
|
|
694
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
695
|
+
assets: {
|
|
696
|
+
feeAsset: string;
|
|
697
|
+
fillCount: number;
|
|
698
|
+
notional: DecimalString;
|
|
699
|
+
builderFee: DecimalString;
|
|
700
|
+
}[];
|
|
701
|
+
traderCount: number;
|
|
702
|
+
activeApprovalCount: number;
|
|
703
|
+
snapshot: {
|
|
704
|
+
start: EpochMilliseconds;
|
|
705
|
+
end: EpochMilliseconds;
|
|
706
|
+
asOfSequence: number;
|
|
707
|
+
};
|
|
708
|
+
}, {
|
|
709
|
+
start_timestamp: EpochMilliseconds;
|
|
710
|
+
end_timestamp: EpochMilliseconds;
|
|
711
|
+
as_of_sequence: number;
|
|
712
|
+
data: {
|
|
713
|
+
feeAsset: string;
|
|
714
|
+
fillCount: number;
|
|
715
|
+
notional: DecimalString;
|
|
716
|
+
builderFee: DecimalString;
|
|
717
|
+
}[];
|
|
718
|
+
trader_count: number;
|
|
719
|
+
active_approval_count: number;
|
|
720
|
+
}>>;
|
|
721
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
722
|
+
type PerpsBuilderEarningsSummary = z.infer<typeof PerpsBuilderEarningsSummarySchema>;
|
|
723
|
+
|
|
724
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
725
|
+
type PerpsChaseId = number & {
|
|
726
|
+
readonly __tag: 'PerpsChaseId';
|
|
727
|
+
};
|
|
728
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
729
|
+
declare const PerpsChaseIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>;
|
|
730
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
731
|
+
declare const PerpsChaseSchema: z.ZodPipe<z.ZodObject<{
|
|
732
|
+
chid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>;
|
|
733
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
734
|
+
buy: z.ZodBoolean;
|
|
735
|
+
qty: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
736
|
+
fill: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
737
|
+
lim: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
738
|
+
max_dist: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
739
|
+
max_dist_bps: z.ZodNumber;
|
|
740
|
+
po: z.ZodBoolean;
|
|
741
|
+
ro: z.ZodBoolean;
|
|
742
|
+
reference_price: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
743
|
+
reprices: z.ZodNumber;
|
|
744
|
+
post_only_rejections: z.ZodNumber;
|
|
745
|
+
cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
746
|
+
coid: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
747
|
+
oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
748
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
749
|
+
orderId?: PerpsOrderId | undefined;
|
|
750
|
+
clientOrderId?: PerpsClientOrderId | undefined;
|
|
751
|
+
chaseId: PerpsChaseId;
|
|
752
|
+
instrumentId: PerpsInstrumentId;
|
|
753
|
+
side: OrderSide;
|
|
754
|
+
quantity: DecimalString;
|
|
755
|
+
filledQuantity: DecimalString;
|
|
756
|
+
limitPrice: DecimalString;
|
|
757
|
+
maxDistance: DecimalString;
|
|
758
|
+
maxDistanceBps: number;
|
|
759
|
+
postOnly: boolean;
|
|
760
|
+
reduceOnly: boolean;
|
|
761
|
+
referencePrice: DecimalString;
|
|
762
|
+
reprices: number;
|
|
763
|
+
postOnlyRejections: number;
|
|
764
|
+
createdAt: EpochMilliseconds;
|
|
765
|
+
}, {
|
|
766
|
+
chid: PerpsChaseId;
|
|
767
|
+
iid: PerpsInstrumentId;
|
|
768
|
+
buy: boolean;
|
|
769
|
+
qty: DecimalString;
|
|
770
|
+
fill: DecimalString;
|
|
771
|
+
lim: DecimalString;
|
|
772
|
+
max_dist: DecimalString;
|
|
773
|
+
max_dist_bps: number;
|
|
774
|
+
po: boolean;
|
|
775
|
+
ro: boolean;
|
|
776
|
+
reference_price: DecimalString;
|
|
777
|
+
reprices: number;
|
|
778
|
+
post_only_rejections: number;
|
|
779
|
+
cts: EpochMilliseconds;
|
|
780
|
+
coid?: PerpsClientOrderId | undefined;
|
|
781
|
+
oid?: PerpsOrderId | undefined;
|
|
782
|
+
}>>;
|
|
783
|
+
/** A running chase. Zero bounds are unset; reference price is zero until a child first rests or fills.
|
|
784
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
785
|
+
*/
|
|
786
|
+
type PerpsChase = z.infer<typeof PerpsChaseSchema>;
|
|
787
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
788
|
+
declare const PerpsChaseAcceptedSchema: z.ZodPipe<z.ZodObject<{
|
|
789
|
+
status: z.ZodLiteral<"ok">;
|
|
790
|
+
chid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>;
|
|
791
|
+
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
792
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
793
|
+
chaseId: PerpsChaseId;
|
|
794
|
+
timestamp: EpochMilliseconds;
|
|
795
|
+
}, {
|
|
796
|
+
status: "ok";
|
|
797
|
+
chid: PerpsChaseId;
|
|
798
|
+
ts: EpochMilliseconds;
|
|
799
|
+
}>>;
|
|
800
|
+
/** Acceptance does not guarantee a child has rested or any quantity will fill.
|
|
801
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
802
|
+
*/
|
|
803
|
+
type PerpsChaseAccepted = z.infer<typeof PerpsChaseAcceptedSchema>;
|
|
804
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
805
|
+
declare const FetchPerpsChasesResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
806
|
+
chid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>;
|
|
807
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
808
|
+
buy: z.ZodBoolean;
|
|
809
|
+
qty: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
810
|
+
fill: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
811
|
+
lim: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
812
|
+
max_dist: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
813
|
+
max_dist_bps: z.ZodNumber;
|
|
814
|
+
po: z.ZodBoolean;
|
|
815
|
+
ro: z.ZodBoolean;
|
|
816
|
+
reference_price: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
817
|
+
reprices: z.ZodNumber;
|
|
818
|
+
post_only_rejections: z.ZodNumber;
|
|
819
|
+
cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
820
|
+
coid: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
821
|
+
oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
822
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
823
|
+
orderId?: PerpsOrderId | undefined;
|
|
824
|
+
clientOrderId?: PerpsClientOrderId | undefined;
|
|
825
|
+
chaseId: PerpsChaseId;
|
|
826
|
+
instrumentId: PerpsInstrumentId;
|
|
827
|
+
side: OrderSide;
|
|
828
|
+
quantity: DecimalString;
|
|
829
|
+
filledQuantity: DecimalString;
|
|
830
|
+
limitPrice: DecimalString;
|
|
831
|
+
maxDistance: DecimalString;
|
|
832
|
+
maxDistanceBps: number;
|
|
833
|
+
postOnly: boolean;
|
|
834
|
+
reduceOnly: boolean;
|
|
835
|
+
referencePrice: DecimalString;
|
|
836
|
+
reprices: number;
|
|
837
|
+
postOnlyRejections: number;
|
|
838
|
+
createdAt: EpochMilliseconds;
|
|
839
|
+
}, {
|
|
840
|
+
chid: PerpsChaseId;
|
|
841
|
+
iid: PerpsInstrumentId;
|
|
842
|
+
buy: boolean;
|
|
843
|
+
qty: DecimalString;
|
|
844
|
+
fill: DecimalString;
|
|
845
|
+
lim: DecimalString;
|
|
846
|
+
max_dist: DecimalString;
|
|
847
|
+
max_dist_bps: number;
|
|
848
|
+
po: boolean;
|
|
849
|
+
ro: boolean;
|
|
850
|
+
reference_price: DecimalString;
|
|
851
|
+
reprices: number;
|
|
852
|
+
post_only_rejections: number;
|
|
853
|
+
cts: EpochMilliseconds;
|
|
854
|
+
coid?: PerpsClientOrderId | undefined;
|
|
855
|
+
oid?: PerpsOrderId | undefined;
|
|
856
|
+
}>>>;
|
|
857
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
858
|
+
declare const CreatePerpsChaseResponseSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
859
|
+
status: z.ZodLiteral<"ok">;
|
|
860
|
+
chid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>;
|
|
861
|
+
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
862
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
863
|
+
chaseId: PerpsChaseId;
|
|
864
|
+
timestamp: EpochMilliseconds;
|
|
865
|
+
}, {
|
|
866
|
+
status: "ok";
|
|
867
|
+
chid: PerpsChaseId;
|
|
868
|
+
ts: EpochMilliseconds;
|
|
869
|
+
}>>, z.ZodObject<{
|
|
870
|
+
status: z.ZodLiteral<"err">;
|
|
871
|
+
error: z.ZodString;
|
|
872
|
+
}, z.core.$strip>]>;
|
|
873
|
+
|
|
874
|
+
/**
|
|
875
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
876
|
+
*/
|
|
877
|
+
declare enum PerpsNotificationType {
|
|
878
|
+
PositionOpened = "position_opened",
|
|
879
|
+
PositionIncreased = "position_increased",
|
|
880
|
+
PositionReduced = "position_reduced",
|
|
881
|
+
PositionClosed = "position_closed",
|
|
882
|
+
LimitOrderCanceled = "limit_order_canceled",
|
|
883
|
+
LiquidationWarning = "liquidation_warning",
|
|
884
|
+
PositionLiquidated = "position_liquidated",
|
|
885
|
+
/** @experimental This API may change in a breaking way in any release, including patch releases. */
|
|
886
|
+
PositionDeleveraged = "position_deleveraged"
|
|
887
|
+
}
|
|
888
|
+
/**
|
|
889
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
890
|
+
*/
|
|
891
|
+
declare const PerpsNotificationTypeSchema: z.ZodEnum<typeof PerpsNotificationType>;
|
|
892
|
+
/**
|
|
893
|
+
* Kind of order whose execution produced a fill-driven position notification.
|
|
894
|
+
* A TP/SL-triggered order reports the trigger that fired it whether it
|
|
895
|
+
* aggressed or rested; otherwise an aggressor submitted without a limit price
|
|
896
|
+
* is `market` and everything else, including a maker's resting order, is
|
|
897
|
+
* `limit`.
|
|
898
|
+
*
|
|
899
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
900
|
+
*/
|
|
901
|
+
declare enum PerpsNotificationOrderType {
|
|
902
|
+
Market = "market",
|
|
903
|
+
Limit = "limit",
|
|
904
|
+
TakeProfit = "take_profit",
|
|
905
|
+
StopLoss = "stop_loss"
|
|
906
|
+
}
|
|
907
|
+
/**
|
|
908
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
909
|
+
*/
|
|
910
|
+
declare const PerpsNotificationOrderTypeSchema: z.ZodEnum<typeof PerpsNotificationOrderType>;
|
|
911
|
+
/**
|
|
912
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
913
|
+
*/
|
|
914
|
+
declare enum PerpsMarginType {
|
|
915
|
+
Cross = "cross",
|
|
916
|
+
Isolated = "isolated"
|
|
917
|
+
}
|
|
918
|
+
/**
|
|
919
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
920
|
+
*/
|
|
921
|
+
declare const PerpsMarginTypeSchema: z.ZodEnum<typeof PerpsMarginType>;
|
|
922
|
+
/**
|
|
923
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
924
|
+
*/
|
|
925
|
+
declare const PerpsPositionChangeNotificationSchema: z.ZodPipe<z.ZodObject<{
|
|
926
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
927
|
+
type: z.ZodEnum<{
|
|
928
|
+
position_opened: PerpsNotificationType.PositionOpened;
|
|
929
|
+
position_increased: PerpsNotificationType.PositionIncreased;
|
|
930
|
+
position_reduced: PerpsNotificationType.PositionReduced;
|
|
931
|
+
}>;
|
|
932
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
933
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
934
|
+
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
935
|
+
avg_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
936
|
+
leverage: z.ZodNumber;
|
|
937
|
+
order_type: z.ZodOptional<z.ZodEnum<typeof PerpsNotificationOrderType>>;
|
|
938
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
939
|
+
id: PerpsNotificationId;
|
|
940
|
+
type: PerpsNotificationType.PositionOpened | PerpsNotificationType.PositionIncreased | PerpsNotificationType.PositionReduced;
|
|
941
|
+
instrumentId: PerpsInstrumentId;
|
|
942
|
+
side: PerpsSide;
|
|
943
|
+
size: DecimalString;
|
|
944
|
+
avgPrice: DecimalString;
|
|
945
|
+
leverage: number;
|
|
946
|
+
orderType: PerpsNotificationOrderType | undefined;
|
|
947
|
+
}, {
|
|
948
|
+
id: PerpsNotificationId;
|
|
949
|
+
type: PerpsNotificationType.PositionOpened | PerpsNotificationType.PositionIncreased | PerpsNotificationType.PositionReduced;
|
|
950
|
+
instrument_id: PerpsInstrumentId;
|
|
951
|
+
side: PerpsSide;
|
|
952
|
+
size: DecimalString;
|
|
953
|
+
avg_price: DecimalString;
|
|
954
|
+
leverage: number;
|
|
955
|
+
order_type?: PerpsNotificationOrderType | undefined;
|
|
956
|
+
}>>;
|
|
957
|
+
/**
|
|
958
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
959
|
+
*/
|
|
960
|
+
type PerpsPositionChangeNotification = z.infer<typeof PerpsPositionChangeNotificationSchema>;
|
|
961
|
+
/**
|
|
962
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
963
|
+
*/
|
|
964
|
+
declare const PerpsPositionClosedNotificationSchema: z.ZodPipe<z.ZodObject<{
|
|
965
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
966
|
+
type: z.ZodLiteral<PerpsNotificationType.PositionClosed>;
|
|
967
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
968
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
969
|
+
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
970
|
+
avg_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
971
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
972
|
+
order_type: z.ZodOptional<z.ZodEnum<typeof PerpsNotificationOrderType>>;
|
|
973
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
974
|
+
id: PerpsNotificationId;
|
|
975
|
+
type: PerpsNotificationType.PositionClosed;
|
|
976
|
+
instrumentId: PerpsInstrumentId;
|
|
977
|
+
side: PerpsSide;
|
|
978
|
+
size: DecimalString;
|
|
979
|
+
avgPrice: DecimalString;
|
|
980
|
+
pnl: DecimalString;
|
|
981
|
+
orderType: PerpsNotificationOrderType | undefined;
|
|
982
|
+
}, {
|
|
983
|
+
id: PerpsNotificationId;
|
|
984
|
+
type: PerpsNotificationType.PositionClosed;
|
|
985
|
+
instrument_id: PerpsInstrumentId;
|
|
986
|
+
side: PerpsSide;
|
|
987
|
+
size: DecimalString;
|
|
988
|
+
avg_price: DecimalString;
|
|
989
|
+
pnl: DecimalString;
|
|
990
|
+
order_type?: PerpsNotificationOrderType | undefined;
|
|
991
|
+
}>>;
|
|
992
|
+
/**
|
|
993
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
994
|
+
*/
|
|
995
|
+
type PerpsPositionClosedNotification = z.infer<typeof PerpsPositionClosedNotificationSchema>;
|
|
996
|
+
/**
|
|
997
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
998
|
+
*/
|
|
999
|
+
declare const PerpsLimitOrderCanceledNotificationSchema: z.ZodPipe<z.ZodObject<{
|
|
1000
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1001
|
+
type: z.ZodLiteral<PerpsNotificationType.LimitOrderCanceled>;
|
|
1002
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1003
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1004
|
+
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1005
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1006
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1007
|
+
id: PerpsNotificationId;
|
|
1008
|
+
type: PerpsNotificationType.LimitOrderCanceled;
|
|
1009
|
+
instrumentId: PerpsInstrumentId;
|
|
1010
|
+
side: PerpsSide;
|
|
1011
|
+
size: DecimalString;
|
|
1012
|
+
price: DecimalString;
|
|
1013
|
+
}, {
|
|
1014
|
+
id: PerpsNotificationId;
|
|
1015
|
+
type: PerpsNotificationType.LimitOrderCanceled;
|
|
1016
|
+
instrument_id: PerpsInstrumentId;
|
|
1017
|
+
side: PerpsSide;
|
|
1018
|
+
size: DecimalString;
|
|
1019
|
+
price: DecimalString;
|
|
1020
|
+
}>>;
|
|
1021
|
+
/**
|
|
1022
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1023
|
+
*/
|
|
1024
|
+
type PerpsLimitOrderCanceledNotification = z.infer<typeof PerpsLimitOrderCanceledNotificationSchema>;
|
|
1025
|
+
/**
|
|
1026
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1027
|
+
*/
|
|
1028
|
+
declare const PerpsLiquidationWarningNotificationSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
|
|
1029
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1030
|
+
type: z.ZodLiteral<PerpsNotificationType.LiquidationWarning>;
|
|
1031
|
+
margin_type: z.ZodLiteral<PerpsMarginType.Isolated>;
|
|
1032
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1033
|
+
mark_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1034
|
+
liq_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1035
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1036
|
+
id: PerpsNotificationId;
|
|
1037
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1038
|
+
marginType: PerpsMarginType.Isolated;
|
|
1039
|
+
instrumentId: PerpsInstrumentId;
|
|
1040
|
+
markPrice: DecimalString;
|
|
1041
|
+
liquidationPrice: DecimalString;
|
|
1042
|
+
}, {
|
|
1043
|
+
id: PerpsNotificationId;
|
|
1044
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1045
|
+
margin_type: PerpsMarginType.Isolated;
|
|
1046
|
+
instrument_id: PerpsInstrumentId;
|
|
1047
|
+
mark_price: DecimalString;
|
|
1048
|
+
liq_price: DecimalString;
|
|
1049
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
1050
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1051
|
+
type: z.ZodLiteral<PerpsNotificationType.LiquidationWarning>;
|
|
1052
|
+
margin_type: z.ZodLiteral<PerpsMarginType.Cross>;
|
|
1053
|
+
instrument_id: z.ZodNull;
|
|
1054
|
+
mark_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1055
|
+
affected_instruments: z.ZodArray<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>>;
|
|
1056
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1057
|
+
id: PerpsNotificationId;
|
|
1058
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1059
|
+
marginType: PerpsMarginType.Cross;
|
|
1060
|
+
markPrice: DecimalString;
|
|
1061
|
+
affectedInstruments: PerpsInstrumentId[];
|
|
1062
|
+
}, {
|
|
1063
|
+
id: PerpsNotificationId;
|
|
1064
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1065
|
+
margin_type: PerpsMarginType.Cross;
|
|
1066
|
+
instrument_id: null;
|
|
1067
|
+
mark_price: DecimalString;
|
|
1068
|
+
affected_instruments: PerpsInstrumentId[];
|
|
1069
|
+
}>>], "margin_type">;
|
|
1070
|
+
/**
|
|
1071
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1072
|
+
*/
|
|
1073
|
+
type PerpsLiquidationWarningNotification = z.infer<typeof PerpsLiquidationWarningNotificationSchema>;
|
|
1074
|
+
/**
|
|
1075
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1076
|
+
*/
|
|
1077
|
+
declare const PerpsPositionLiquidatedNotificationSchema: z.ZodPipe<z.ZodObject<{
|
|
1078
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1079
|
+
type: z.ZodLiteral<PerpsNotificationType.PositionLiquidated>;
|
|
1080
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1081
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1082
|
+
size_closed: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1083
|
+
pnl: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
1084
|
+
margin_type: z.ZodEnum<typeof PerpsMarginType>;
|
|
1085
|
+
via_backstop: z.ZodBoolean;
|
|
1086
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1087
|
+
id: PerpsNotificationId;
|
|
1088
|
+
type: PerpsNotificationType.PositionLiquidated;
|
|
1089
|
+
instrumentId: PerpsInstrumentId;
|
|
1090
|
+
side: PerpsSide;
|
|
1091
|
+
sizeClosed: DecimalString;
|
|
1092
|
+
pnl: DecimalString | null;
|
|
1093
|
+
marginType: PerpsMarginType;
|
|
1094
|
+
viaBackstop: boolean;
|
|
1095
|
+
}, {
|
|
1096
|
+
id: PerpsNotificationId;
|
|
1097
|
+
type: PerpsNotificationType.PositionLiquidated;
|
|
1098
|
+
instrument_id: PerpsInstrumentId;
|
|
1099
|
+
side: PerpsSide;
|
|
1100
|
+
size_closed: DecimalString;
|
|
1101
|
+
pnl: DecimalString | null;
|
|
1102
|
+
margin_type: PerpsMarginType;
|
|
1103
|
+
via_backstop: boolean;
|
|
1104
|
+
}>>;
|
|
1105
|
+
/**
|
|
1106
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1107
|
+
*/
|
|
1108
|
+
type PerpsPositionLiquidatedNotification = z.infer<typeof PerpsPositionLiquidatedNotificationSchema>;
|
|
1109
|
+
/**
|
|
1110
|
+
* A profitable position was reduced or closed by auto-deleveraging.
|
|
1111
|
+
*
|
|
1112
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1113
|
+
*/
|
|
1114
|
+
declare const PerpsPositionDeleveragedNotificationSchema: z.ZodPipe<z.ZodObject<{
|
|
1115
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1116
|
+
type: z.ZodLiteral<PerpsNotificationType.PositionDeleveraged>;
|
|
1117
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1118
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1119
|
+
size_closed: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1120
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1121
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1122
|
+
margin_type: z.ZodEnum<typeof PerpsMarginType>;
|
|
1123
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1124
|
+
id: PerpsNotificationId;
|
|
1125
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
1126
|
+
instrumentId: PerpsInstrumentId;
|
|
1127
|
+
side: PerpsSide;
|
|
1128
|
+
sizeClosed: DecimalString;
|
|
1129
|
+
price: DecimalString;
|
|
1130
|
+
pnl: DecimalString;
|
|
1131
|
+
marginType: PerpsMarginType;
|
|
1132
|
+
}, {
|
|
1133
|
+
id: PerpsNotificationId;
|
|
1134
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
1135
|
+
instrument_id: PerpsInstrumentId;
|
|
1136
|
+
side: PerpsSide;
|
|
1137
|
+
size_closed: DecimalString;
|
|
1138
|
+
price: DecimalString;
|
|
1139
|
+
pnl: DecimalString;
|
|
1140
|
+
margin_type: PerpsMarginType;
|
|
1141
|
+
}>>;
|
|
1142
|
+
/**
|
|
1143
|
+
* A profitable position was reduced or closed by auto-deleveraging.
|
|
1144
|
+
*
|
|
1145
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1146
|
+
*/
|
|
1147
|
+
type PerpsPositionDeleveragedNotification = z.infer<typeof PerpsPositionDeleveragedNotificationSchema>;
|
|
1148
|
+
/**
|
|
1149
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1150
|
+
*/
|
|
1151
|
+
declare const PerpsNotificationSchema: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
|
|
1152
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1153
|
+
type: z.ZodEnum<{
|
|
1154
|
+
position_opened: PerpsNotificationType.PositionOpened;
|
|
1155
|
+
position_increased: PerpsNotificationType.PositionIncreased;
|
|
1156
|
+
position_reduced: PerpsNotificationType.PositionReduced;
|
|
1157
|
+
}>;
|
|
1158
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1159
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1160
|
+
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1161
|
+
avg_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1162
|
+
leverage: z.ZodNumber;
|
|
1163
|
+
order_type: z.ZodOptional<z.ZodEnum<typeof PerpsNotificationOrderType>>;
|
|
1164
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1165
|
+
id: PerpsNotificationId;
|
|
1166
|
+
type: PerpsNotificationType.PositionOpened | PerpsNotificationType.PositionIncreased | PerpsNotificationType.PositionReduced;
|
|
1167
|
+
instrumentId: PerpsInstrumentId;
|
|
1168
|
+
side: PerpsSide;
|
|
1169
|
+
size: DecimalString;
|
|
1170
|
+
avgPrice: DecimalString;
|
|
1171
|
+
leverage: number;
|
|
1172
|
+
orderType: PerpsNotificationOrderType | undefined;
|
|
1173
|
+
}, {
|
|
1174
|
+
id: PerpsNotificationId;
|
|
1175
|
+
type: PerpsNotificationType.PositionOpened | PerpsNotificationType.PositionIncreased | PerpsNotificationType.PositionReduced;
|
|
1176
|
+
instrument_id: PerpsInstrumentId;
|
|
1177
|
+
side: PerpsSide;
|
|
1178
|
+
size: DecimalString;
|
|
1179
|
+
avg_price: DecimalString;
|
|
1180
|
+
leverage: number;
|
|
1181
|
+
order_type?: PerpsNotificationOrderType | undefined;
|
|
1182
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
1183
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1184
|
+
type: z.ZodLiteral<PerpsNotificationType.PositionClosed>;
|
|
1185
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1186
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1187
|
+
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1188
|
+
avg_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1189
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1190
|
+
order_type: z.ZodOptional<z.ZodEnum<typeof PerpsNotificationOrderType>>;
|
|
1191
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1192
|
+
id: PerpsNotificationId;
|
|
1193
|
+
type: PerpsNotificationType.PositionClosed;
|
|
1194
|
+
instrumentId: PerpsInstrumentId;
|
|
1195
|
+
side: PerpsSide;
|
|
1196
|
+
size: DecimalString;
|
|
1197
|
+
avgPrice: DecimalString;
|
|
1198
|
+
pnl: DecimalString;
|
|
1199
|
+
orderType: PerpsNotificationOrderType | undefined;
|
|
1200
|
+
}, {
|
|
1201
|
+
id: PerpsNotificationId;
|
|
1202
|
+
type: PerpsNotificationType.PositionClosed;
|
|
1203
|
+
instrument_id: PerpsInstrumentId;
|
|
1204
|
+
side: PerpsSide;
|
|
1205
|
+
size: DecimalString;
|
|
1206
|
+
avg_price: DecimalString;
|
|
1207
|
+
pnl: DecimalString;
|
|
1208
|
+
order_type?: PerpsNotificationOrderType | undefined;
|
|
1209
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
1210
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1211
|
+
type: z.ZodLiteral<PerpsNotificationType.LimitOrderCanceled>;
|
|
1212
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1213
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1214
|
+
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1215
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1216
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1217
|
+
id: PerpsNotificationId;
|
|
1218
|
+
type: PerpsNotificationType.LimitOrderCanceled;
|
|
1219
|
+
instrumentId: PerpsInstrumentId;
|
|
1220
|
+
side: PerpsSide;
|
|
1221
|
+
size: DecimalString;
|
|
1222
|
+
price: DecimalString;
|
|
1223
|
+
}, {
|
|
1224
|
+
id: PerpsNotificationId;
|
|
1225
|
+
type: PerpsNotificationType.LimitOrderCanceled;
|
|
1226
|
+
instrument_id: PerpsInstrumentId;
|
|
1227
|
+
side: PerpsSide;
|
|
1228
|
+
size: DecimalString;
|
|
1229
|
+
price: DecimalString;
|
|
1230
|
+
}>>, z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
|
|
1231
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1232
|
+
type: z.ZodLiteral<PerpsNotificationType.LiquidationWarning>;
|
|
1233
|
+
margin_type: z.ZodLiteral<PerpsMarginType.Isolated>;
|
|
1234
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1235
|
+
mark_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1236
|
+
liq_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1237
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1238
|
+
id: PerpsNotificationId;
|
|
1239
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1240
|
+
marginType: PerpsMarginType.Isolated;
|
|
1241
|
+
instrumentId: PerpsInstrumentId;
|
|
1242
|
+
markPrice: DecimalString;
|
|
1243
|
+
liquidationPrice: DecimalString;
|
|
1244
|
+
}, {
|
|
1245
|
+
id: PerpsNotificationId;
|
|
1246
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1247
|
+
margin_type: PerpsMarginType.Isolated;
|
|
1248
|
+
instrument_id: PerpsInstrumentId;
|
|
1249
|
+
mark_price: DecimalString;
|
|
1250
|
+
liq_price: DecimalString;
|
|
1251
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
1252
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1253
|
+
type: z.ZodLiteral<PerpsNotificationType.LiquidationWarning>;
|
|
1254
|
+
margin_type: z.ZodLiteral<PerpsMarginType.Cross>;
|
|
1255
|
+
instrument_id: z.ZodNull;
|
|
1256
|
+
mark_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1257
|
+
affected_instruments: z.ZodArray<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>>;
|
|
1258
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1259
|
+
id: PerpsNotificationId;
|
|
1260
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1261
|
+
marginType: PerpsMarginType.Cross;
|
|
1262
|
+
markPrice: DecimalString;
|
|
1263
|
+
affectedInstruments: PerpsInstrumentId[];
|
|
1264
|
+
}, {
|
|
1265
|
+
id: PerpsNotificationId;
|
|
1266
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1267
|
+
margin_type: PerpsMarginType.Cross;
|
|
1268
|
+
instrument_id: null;
|
|
1269
|
+
mark_price: DecimalString;
|
|
1270
|
+
affected_instruments: PerpsInstrumentId[];
|
|
1271
|
+
}>>], "margin_type">, z.ZodPipe<z.ZodObject<{
|
|
1272
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1273
|
+
type: z.ZodLiteral<PerpsNotificationType.PositionLiquidated>;
|
|
1274
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1275
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1276
|
+
size_closed: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1277
|
+
pnl: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
1278
|
+
margin_type: z.ZodEnum<typeof PerpsMarginType>;
|
|
1279
|
+
via_backstop: z.ZodBoolean;
|
|
1280
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1281
|
+
id: PerpsNotificationId;
|
|
1282
|
+
type: PerpsNotificationType.PositionLiquidated;
|
|
1283
|
+
instrumentId: PerpsInstrumentId;
|
|
1284
|
+
side: PerpsSide;
|
|
1285
|
+
sizeClosed: DecimalString;
|
|
1286
|
+
pnl: DecimalString | null;
|
|
1287
|
+
marginType: PerpsMarginType;
|
|
1288
|
+
viaBackstop: boolean;
|
|
1289
|
+
}, {
|
|
1290
|
+
id: PerpsNotificationId;
|
|
1291
|
+
type: PerpsNotificationType.PositionLiquidated;
|
|
1292
|
+
instrument_id: PerpsInstrumentId;
|
|
1293
|
+
side: PerpsSide;
|
|
1294
|
+
size_closed: DecimalString;
|
|
1295
|
+
pnl: DecimalString | null;
|
|
1296
|
+
margin_type: PerpsMarginType;
|
|
1297
|
+
via_backstop: boolean;
|
|
1298
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
1299
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1300
|
+
type: z.ZodLiteral<PerpsNotificationType.PositionDeleveraged>;
|
|
1301
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1302
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1303
|
+
size_closed: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1304
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1305
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1306
|
+
margin_type: z.ZodEnum<typeof PerpsMarginType>;
|
|
1307
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1308
|
+
id: PerpsNotificationId;
|
|
1309
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
1310
|
+
instrumentId: PerpsInstrumentId;
|
|
1311
|
+
side: PerpsSide;
|
|
1312
|
+
sizeClosed: DecimalString;
|
|
1313
|
+
price: DecimalString;
|
|
1314
|
+
pnl: DecimalString;
|
|
1315
|
+
marginType: PerpsMarginType;
|
|
1316
|
+
}, {
|
|
1317
|
+
id: PerpsNotificationId;
|
|
1318
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
1319
|
+
instrument_id: PerpsInstrumentId;
|
|
1320
|
+
side: PerpsSide;
|
|
1321
|
+
size_closed: DecimalString;
|
|
1322
|
+
price: DecimalString;
|
|
1323
|
+
pnl: DecimalString;
|
|
1324
|
+
margin_type: PerpsMarginType;
|
|
1325
|
+
}>>], "type">;
|
|
1326
|
+
/**
|
|
1327
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1328
|
+
*/
|
|
1329
|
+
type PerpsNotification = z.infer<typeof PerpsNotificationSchema>;
|
|
1330
|
+
/**
|
|
1331
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1332
|
+
*/
|
|
1333
|
+
declare const PerpsNotificationEntrySchema: z.ZodPipe<z.ZodObject<{
|
|
1334
|
+
notification: z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
|
|
1335
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1336
|
+
type: z.ZodEnum<{
|
|
1337
|
+
position_opened: PerpsNotificationType.PositionOpened;
|
|
1338
|
+
position_increased: PerpsNotificationType.PositionIncreased;
|
|
1339
|
+
position_reduced: PerpsNotificationType.PositionReduced;
|
|
1340
|
+
}>;
|
|
1341
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1342
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1343
|
+
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1344
|
+
avg_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1345
|
+
leverage: z.ZodNumber;
|
|
1346
|
+
order_type: z.ZodOptional<z.ZodEnum<typeof PerpsNotificationOrderType>>;
|
|
1347
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1348
|
+
id: PerpsNotificationId;
|
|
1349
|
+
type: PerpsNotificationType.PositionOpened | PerpsNotificationType.PositionIncreased | PerpsNotificationType.PositionReduced;
|
|
1350
|
+
instrumentId: PerpsInstrumentId;
|
|
1351
|
+
side: PerpsSide;
|
|
1352
|
+
size: DecimalString;
|
|
1353
|
+
avgPrice: DecimalString;
|
|
1354
|
+
leverage: number;
|
|
1355
|
+
orderType: PerpsNotificationOrderType | undefined;
|
|
1356
|
+
}, {
|
|
1357
|
+
id: PerpsNotificationId;
|
|
1358
|
+
type: PerpsNotificationType.PositionOpened | PerpsNotificationType.PositionIncreased | PerpsNotificationType.PositionReduced;
|
|
1359
|
+
instrument_id: PerpsInstrumentId;
|
|
1360
|
+
side: PerpsSide;
|
|
1361
|
+
size: DecimalString;
|
|
1362
|
+
avg_price: DecimalString;
|
|
1363
|
+
leverage: number;
|
|
1364
|
+
order_type?: PerpsNotificationOrderType | undefined;
|
|
1365
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
1366
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1367
|
+
type: z.ZodLiteral<PerpsNotificationType.PositionClosed>;
|
|
1368
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1369
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1370
|
+
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1371
|
+
avg_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1372
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1373
|
+
order_type: z.ZodOptional<z.ZodEnum<typeof PerpsNotificationOrderType>>;
|
|
1374
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1375
|
+
id: PerpsNotificationId;
|
|
1376
|
+
type: PerpsNotificationType.PositionClosed;
|
|
1377
|
+
instrumentId: PerpsInstrumentId;
|
|
1378
|
+
side: PerpsSide;
|
|
1379
|
+
size: DecimalString;
|
|
1380
|
+
avgPrice: DecimalString;
|
|
1381
|
+
pnl: DecimalString;
|
|
1382
|
+
orderType: PerpsNotificationOrderType | undefined;
|
|
1383
|
+
}, {
|
|
1384
|
+
id: PerpsNotificationId;
|
|
1385
|
+
type: PerpsNotificationType.PositionClosed;
|
|
1386
|
+
instrument_id: PerpsInstrumentId;
|
|
1387
|
+
side: PerpsSide;
|
|
1388
|
+
size: DecimalString;
|
|
1389
|
+
avg_price: DecimalString;
|
|
1390
|
+
pnl: DecimalString;
|
|
1391
|
+
order_type?: PerpsNotificationOrderType | undefined;
|
|
1392
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
1393
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1394
|
+
type: z.ZodLiteral<PerpsNotificationType.LimitOrderCanceled>;
|
|
1395
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1396
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1397
|
+
size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1398
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1399
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1400
|
+
id: PerpsNotificationId;
|
|
1401
|
+
type: PerpsNotificationType.LimitOrderCanceled;
|
|
1402
|
+
instrumentId: PerpsInstrumentId;
|
|
1403
|
+
side: PerpsSide;
|
|
1404
|
+
size: DecimalString;
|
|
1405
|
+
price: DecimalString;
|
|
1406
|
+
}, {
|
|
1407
|
+
id: PerpsNotificationId;
|
|
1408
|
+
type: PerpsNotificationType.LimitOrderCanceled;
|
|
1409
|
+
instrument_id: PerpsInstrumentId;
|
|
1410
|
+
side: PerpsSide;
|
|
1411
|
+
size: DecimalString;
|
|
1412
|
+
price: DecimalString;
|
|
1413
|
+
}>>, z.ZodDiscriminatedUnion<[z.ZodPipe<z.ZodObject<{
|
|
1414
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1415
|
+
type: z.ZodLiteral<PerpsNotificationType.LiquidationWarning>;
|
|
1416
|
+
margin_type: z.ZodLiteral<PerpsMarginType.Isolated>;
|
|
1417
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1418
|
+
mark_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1419
|
+
liq_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1420
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1421
|
+
id: PerpsNotificationId;
|
|
1422
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1423
|
+
marginType: PerpsMarginType.Isolated;
|
|
1424
|
+
instrumentId: PerpsInstrumentId;
|
|
1425
|
+
markPrice: DecimalString;
|
|
1426
|
+
liquidationPrice: DecimalString;
|
|
1427
|
+
}, {
|
|
1428
|
+
id: PerpsNotificationId;
|
|
1429
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1430
|
+
margin_type: PerpsMarginType.Isolated;
|
|
1431
|
+
instrument_id: PerpsInstrumentId;
|
|
1432
|
+
mark_price: DecimalString;
|
|
1433
|
+
liq_price: DecimalString;
|
|
1434
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
1435
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1436
|
+
type: z.ZodLiteral<PerpsNotificationType.LiquidationWarning>;
|
|
1437
|
+
margin_type: z.ZodLiteral<PerpsMarginType.Cross>;
|
|
1438
|
+
instrument_id: z.ZodNull;
|
|
1439
|
+
mark_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1440
|
+
affected_instruments: z.ZodArray<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>>;
|
|
1441
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1442
|
+
id: PerpsNotificationId;
|
|
1443
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1444
|
+
marginType: PerpsMarginType.Cross;
|
|
1445
|
+
markPrice: DecimalString;
|
|
1446
|
+
affectedInstruments: PerpsInstrumentId[];
|
|
1447
|
+
}, {
|
|
1448
|
+
id: PerpsNotificationId;
|
|
1449
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1450
|
+
margin_type: PerpsMarginType.Cross;
|
|
1451
|
+
instrument_id: null;
|
|
1452
|
+
mark_price: DecimalString;
|
|
1453
|
+
affected_instruments: PerpsInstrumentId[];
|
|
1454
|
+
}>>], "margin_type">, z.ZodPipe<z.ZodObject<{
|
|
1455
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1456
|
+
type: z.ZodLiteral<PerpsNotificationType.PositionLiquidated>;
|
|
1457
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1458
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1459
|
+
size_closed: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1460
|
+
pnl: z.ZodNullable<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
1461
|
+
margin_type: z.ZodEnum<typeof PerpsMarginType>;
|
|
1462
|
+
via_backstop: z.ZodBoolean;
|
|
1463
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1464
|
+
id: PerpsNotificationId;
|
|
1465
|
+
type: PerpsNotificationType.PositionLiquidated;
|
|
1466
|
+
instrumentId: PerpsInstrumentId;
|
|
1467
|
+
side: PerpsSide;
|
|
1468
|
+
sizeClosed: DecimalString;
|
|
1469
|
+
pnl: DecimalString | null;
|
|
1470
|
+
marginType: PerpsMarginType;
|
|
1471
|
+
viaBackstop: boolean;
|
|
1472
|
+
}, {
|
|
1473
|
+
id: PerpsNotificationId;
|
|
1474
|
+
type: PerpsNotificationType.PositionLiquidated;
|
|
1475
|
+
instrument_id: PerpsInstrumentId;
|
|
1476
|
+
side: PerpsSide;
|
|
1477
|
+
size_closed: DecimalString;
|
|
1478
|
+
pnl: DecimalString | null;
|
|
1479
|
+
margin_type: PerpsMarginType;
|
|
1480
|
+
via_backstop: boolean;
|
|
1481
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
1482
|
+
id: z.ZodPipe<z.ZodUUID, z.ZodTransform<PerpsNotificationId, string>>;
|
|
1483
|
+
type: z.ZodLiteral<PerpsNotificationType.PositionDeleveraged>;
|
|
1484
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1485
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
1486
|
+
size_closed: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1487
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1488
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1489
|
+
margin_type: z.ZodEnum<typeof PerpsMarginType>;
|
|
1490
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1491
|
+
id: PerpsNotificationId;
|
|
1492
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
1493
|
+
instrumentId: PerpsInstrumentId;
|
|
1494
|
+
side: PerpsSide;
|
|
1495
|
+
sizeClosed: DecimalString;
|
|
1496
|
+
price: DecimalString;
|
|
1497
|
+
pnl: DecimalString;
|
|
1498
|
+
marginType: PerpsMarginType;
|
|
1499
|
+
}, {
|
|
1500
|
+
id: PerpsNotificationId;
|
|
1501
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
1502
|
+
instrument_id: PerpsInstrumentId;
|
|
1503
|
+
side: PerpsSide;
|
|
1504
|
+
size_closed: DecimalString;
|
|
1505
|
+
price: DecimalString;
|
|
1506
|
+
pnl: DecimalString;
|
|
1507
|
+
margin_type: PerpsMarginType;
|
|
1508
|
+
}>>], "type">;
|
|
1509
|
+
read_at: z.ZodNullable<z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>>;
|
|
1510
|
+
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
1511
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1512
|
+
notification: {
|
|
1513
|
+
id: PerpsNotificationId;
|
|
1514
|
+
type: PerpsNotificationType.PositionOpened | PerpsNotificationType.PositionIncreased | PerpsNotificationType.PositionReduced;
|
|
1515
|
+
instrumentId: PerpsInstrumentId;
|
|
1516
|
+
side: PerpsSide;
|
|
1517
|
+
size: DecimalString;
|
|
1518
|
+
avgPrice: DecimalString;
|
|
1519
|
+
leverage: number;
|
|
1520
|
+
orderType: PerpsNotificationOrderType | undefined;
|
|
1521
|
+
} | {
|
|
1522
|
+
id: PerpsNotificationId;
|
|
1523
|
+
type: PerpsNotificationType.PositionClosed;
|
|
1524
|
+
instrumentId: PerpsInstrumentId;
|
|
1525
|
+
side: PerpsSide;
|
|
1526
|
+
size: DecimalString;
|
|
1527
|
+
avgPrice: DecimalString;
|
|
1528
|
+
pnl: DecimalString;
|
|
1529
|
+
orderType: PerpsNotificationOrderType | undefined;
|
|
1530
|
+
} | {
|
|
1531
|
+
id: PerpsNotificationId;
|
|
1532
|
+
type: PerpsNotificationType.LimitOrderCanceled;
|
|
1533
|
+
instrumentId: PerpsInstrumentId;
|
|
1534
|
+
side: PerpsSide;
|
|
1535
|
+
size: DecimalString;
|
|
1536
|
+
price: DecimalString;
|
|
1537
|
+
} | {
|
|
1538
|
+
id: PerpsNotificationId;
|
|
1539
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1540
|
+
marginType: PerpsMarginType.Isolated;
|
|
1541
|
+
instrumentId: PerpsInstrumentId;
|
|
1542
|
+
markPrice: DecimalString;
|
|
1543
|
+
liquidationPrice: DecimalString;
|
|
1544
|
+
} | {
|
|
1545
|
+
id: PerpsNotificationId;
|
|
1546
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1547
|
+
marginType: PerpsMarginType.Cross;
|
|
1548
|
+
markPrice: DecimalString;
|
|
1549
|
+
affectedInstruments: PerpsInstrumentId[];
|
|
1550
|
+
} | {
|
|
1551
|
+
id: PerpsNotificationId;
|
|
1552
|
+
type: PerpsNotificationType.PositionLiquidated;
|
|
1553
|
+
instrumentId: PerpsInstrumentId;
|
|
1554
|
+
side: PerpsSide;
|
|
1555
|
+
sizeClosed: DecimalString;
|
|
1556
|
+
pnl: DecimalString | null;
|
|
1557
|
+
marginType: PerpsMarginType;
|
|
1558
|
+
viaBackstop: boolean;
|
|
1559
|
+
} | {
|
|
1560
|
+
id: PerpsNotificationId;
|
|
1561
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
1562
|
+
instrumentId: PerpsInstrumentId;
|
|
1563
|
+
side: PerpsSide;
|
|
1564
|
+
sizeClosed: DecimalString;
|
|
1565
|
+
price: DecimalString;
|
|
1566
|
+
pnl: DecimalString;
|
|
1567
|
+
marginType: PerpsMarginType;
|
|
1568
|
+
};
|
|
1569
|
+
readAt: EpochMilliseconds | null;
|
|
1570
|
+
timestamp: EpochMilliseconds;
|
|
1571
|
+
}, {
|
|
1572
|
+
notification: {
|
|
1573
|
+
id: PerpsNotificationId;
|
|
1574
|
+
type: PerpsNotificationType.PositionOpened | PerpsNotificationType.PositionIncreased | PerpsNotificationType.PositionReduced;
|
|
1575
|
+
instrumentId: PerpsInstrumentId;
|
|
1576
|
+
side: PerpsSide;
|
|
1577
|
+
size: DecimalString;
|
|
1578
|
+
avgPrice: DecimalString;
|
|
1579
|
+
leverage: number;
|
|
1580
|
+
orderType: PerpsNotificationOrderType | undefined;
|
|
1581
|
+
} | {
|
|
1582
|
+
id: PerpsNotificationId;
|
|
1583
|
+
type: PerpsNotificationType.PositionClosed;
|
|
1584
|
+
instrumentId: PerpsInstrumentId;
|
|
1585
|
+
side: PerpsSide;
|
|
1586
|
+
size: DecimalString;
|
|
1587
|
+
avgPrice: DecimalString;
|
|
1588
|
+
pnl: DecimalString;
|
|
1589
|
+
orderType: PerpsNotificationOrderType | undefined;
|
|
1590
|
+
} | {
|
|
1591
|
+
id: PerpsNotificationId;
|
|
1592
|
+
type: PerpsNotificationType.LimitOrderCanceled;
|
|
1593
|
+
instrumentId: PerpsInstrumentId;
|
|
1594
|
+
side: PerpsSide;
|
|
1595
|
+
size: DecimalString;
|
|
1596
|
+
price: DecimalString;
|
|
1597
|
+
} | {
|
|
1598
|
+
id: PerpsNotificationId;
|
|
1599
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1600
|
+
marginType: PerpsMarginType.Isolated;
|
|
1601
|
+
instrumentId: PerpsInstrumentId;
|
|
1602
|
+
markPrice: DecimalString;
|
|
1603
|
+
liquidationPrice: DecimalString;
|
|
1604
|
+
} | {
|
|
1605
|
+
id: PerpsNotificationId;
|
|
1606
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1607
|
+
marginType: PerpsMarginType.Cross;
|
|
1608
|
+
markPrice: DecimalString;
|
|
1609
|
+
affectedInstruments: PerpsInstrumentId[];
|
|
1610
|
+
} | {
|
|
1611
|
+
id: PerpsNotificationId;
|
|
1612
|
+
type: PerpsNotificationType.PositionLiquidated;
|
|
1613
|
+
instrumentId: PerpsInstrumentId;
|
|
1614
|
+
side: PerpsSide;
|
|
1615
|
+
sizeClosed: DecimalString;
|
|
1616
|
+
pnl: DecimalString | null;
|
|
1617
|
+
marginType: PerpsMarginType;
|
|
1618
|
+
viaBackstop: boolean;
|
|
1619
|
+
} | {
|
|
1620
|
+
id: PerpsNotificationId;
|
|
1621
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
1622
|
+
instrumentId: PerpsInstrumentId;
|
|
1623
|
+
side: PerpsSide;
|
|
1624
|
+
sizeClosed: DecimalString;
|
|
1625
|
+
price: DecimalString;
|
|
1626
|
+
pnl: DecimalString;
|
|
1627
|
+
marginType: PerpsMarginType;
|
|
1628
|
+
};
|
|
1629
|
+
read_at: EpochMilliseconds | null;
|
|
1630
|
+
ts: EpochMilliseconds;
|
|
1631
|
+
}>>;
|
|
1632
|
+
/**
|
|
1633
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1634
|
+
*/
|
|
1635
|
+
type PerpsNotificationEntry = z.infer<typeof PerpsNotificationEntrySchema>;
|
|
1636
|
+
/**
|
|
1637
|
+
* Entries with notification types unknown to this SDK version are omitted
|
|
1638
|
+
* from `items` so newly introduced notification kinds cannot fail the read;
|
|
1639
|
+
* recognized types still validate strictly.
|
|
1640
|
+
*
|
|
1641
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1642
|
+
*/
|
|
1643
|
+
declare const ListPerpsNotificationsResponseSchema: z.ZodObject<{
|
|
1644
|
+
items: z.ZodPipe<z.ZodArray<z.ZodUnknown>, z.ZodTransform<{
|
|
1645
|
+
notification: {
|
|
1646
|
+
id: PerpsNotificationId;
|
|
1647
|
+
type: PerpsNotificationType.PositionOpened | PerpsNotificationType.PositionIncreased | PerpsNotificationType.PositionReduced;
|
|
1648
|
+
instrumentId: PerpsInstrumentId;
|
|
1649
|
+
side: PerpsSide;
|
|
1650
|
+
size: DecimalString;
|
|
1651
|
+
avgPrice: DecimalString;
|
|
1652
|
+
leverage: number;
|
|
1653
|
+
orderType: PerpsNotificationOrderType | undefined;
|
|
1654
|
+
} | {
|
|
1655
|
+
id: PerpsNotificationId;
|
|
1656
|
+
type: PerpsNotificationType.PositionClosed;
|
|
1657
|
+
instrumentId: PerpsInstrumentId;
|
|
1658
|
+
side: PerpsSide;
|
|
1659
|
+
size: DecimalString;
|
|
1660
|
+
avgPrice: DecimalString;
|
|
1661
|
+
pnl: DecimalString;
|
|
1662
|
+
orderType: PerpsNotificationOrderType | undefined;
|
|
1663
|
+
} | {
|
|
1664
|
+
id: PerpsNotificationId;
|
|
1665
|
+
type: PerpsNotificationType.LimitOrderCanceled;
|
|
1666
|
+
instrumentId: PerpsInstrumentId;
|
|
1667
|
+
side: PerpsSide;
|
|
1668
|
+
size: DecimalString;
|
|
1669
|
+
price: DecimalString;
|
|
1670
|
+
} | {
|
|
1671
|
+
id: PerpsNotificationId;
|
|
1672
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1673
|
+
marginType: PerpsMarginType.Isolated;
|
|
1674
|
+
instrumentId: PerpsInstrumentId;
|
|
1675
|
+
markPrice: DecimalString;
|
|
1676
|
+
liquidationPrice: DecimalString;
|
|
1677
|
+
} | {
|
|
1678
|
+
id: PerpsNotificationId;
|
|
1679
|
+
type: PerpsNotificationType.LiquidationWarning;
|
|
1680
|
+
marginType: PerpsMarginType.Cross;
|
|
1681
|
+
markPrice: DecimalString;
|
|
1682
|
+
affectedInstruments: PerpsInstrumentId[];
|
|
1683
|
+
} | {
|
|
1684
|
+
id: PerpsNotificationId;
|
|
1685
|
+
type: PerpsNotificationType.PositionLiquidated;
|
|
1686
|
+
instrumentId: PerpsInstrumentId;
|
|
1687
|
+
side: PerpsSide;
|
|
1688
|
+
sizeClosed: DecimalString;
|
|
1689
|
+
pnl: DecimalString | null;
|
|
1690
|
+
marginType: PerpsMarginType;
|
|
1691
|
+
viaBackstop: boolean;
|
|
1692
|
+
} | {
|
|
1693
|
+
id: PerpsNotificationId;
|
|
1694
|
+
type: PerpsNotificationType.PositionDeleveraged;
|
|
1695
|
+
instrumentId: PerpsInstrumentId;
|
|
1696
|
+
side: PerpsSide;
|
|
1697
|
+
sizeClosed: DecimalString;
|
|
1698
|
+
price: DecimalString;
|
|
1699
|
+
pnl: DecimalString;
|
|
1700
|
+
marginType: PerpsMarginType;
|
|
1701
|
+
};
|
|
1702
|
+
readAt: EpochMilliseconds | null;
|
|
1703
|
+
timestamp: EpochMilliseconds;
|
|
1704
|
+
}[], unknown[]>>;
|
|
1705
|
+
unread: z.ZodNumber;
|
|
1706
|
+
durable_source_seq: z.ZodNumber;
|
|
1707
|
+
has_more: z.ZodBoolean;
|
|
1708
|
+
next_cursor: z.ZodNullable<z.ZodString>;
|
|
1709
|
+
}, z.core.$strip>;
|
|
1710
|
+
/**
|
|
1711
|
+
* Projection of the notifications list response for unread-count reads.
|
|
1712
|
+
* Deliberately leaves `items` unvalidated so notification shapes unknown to
|
|
1713
|
+
* this SDK version cannot fail a read that only needs the counter.
|
|
1714
|
+
*
|
|
1715
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1716
|
+
*/
|
|
1717
|
+
declare const FetchPerpsUnreadNotificationsCountResponseSchema: z.ZodObject<{
|
|
1718
|
+
unread: z.ZodNumber;
|
|
1719
|
+
}, z.core.$strip>;
|
|
1720
|
+
/**
|
|
1721
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1722
|
+
*/
|
|
1723
|
+
declare const MarkPerpsNotificationsReadResponseSchema: z.ZodObject<{
|
|
1724
|
+
status: z.ZodEnum<{
|
|
1725
|
+
ok: "ok";
|
|
1726
|
+
err: "err";
|
|
1727
|
+
}>;
|
|
1728
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1729
|
+
}, z.core.$strip>;
|
|
1730
|
+
|
|
1731
|
+
/**
|
|
1732
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1733
|
+
*/
|
|
1734
|
+
declare enum PerpsOrderStatus {
|
|
1735
|
+
Accepted = "accepted",
|
|
1736
|
+
Open = "open",
|
|
1737
|
+
Partial = "partial",
|
|
1738
|
+
Filled = "filled",
|
|
1739
|
+
Cancelled = "cancelled",
|
|
1740
|
+
AutoCancelled = "auto_cancelled",
|
|
1741
|
+
PostOnlyRejected = "post_only_rejected",
|
|
1742
|
+
FokUnfilled = "fok_unfilled",
|
|
1743
|
+
IocNoFill = "ioc_no_fill",
|
|
1744
|
+
IocExpired = "ioc_expired",
|
|
1745
|
+
StpCancelled = "stp_cancelled",
|
|
1746
|
+
ZeroQuantity = "zero_quantity",
|
|
1747
|
+
DuplicateOrder = "duplicate_order",
|
|
1748
|
+
OrderNotFound = "order_not_found",
|
|
1749
|
+
OrderAlreadyTerminal = "order_already_terminal",
|
|
1750
|
+
ReduceOnlyInvalid = "reduce_only_invalid",
|
|
1751
|
+
ReduceOnlyExpired = "reduce_only_expired",
|
|
1752
|
+
OrderExpired = "order_expired",
|
|
1753
|
+
SweepCapExceeded = "sweep_cap_exceeded",
|
|
1754
|
+
RestingOrderLimitExceeded = "resting_order_limit_exceeded",
|
|
1755
|
+
BelowMinNotional = "below_min_notional",
|
|
1756
|
+
InstrumentDisabled = "instrument_disabled",
|
|
1757
|
+
InstrumentCloseOnly = "instrument_close_only",
|
|
1758
|
+
InstrumentSettled = "instrument_settled",
|
|
1759
|
+
InsufficientMarginAtFill = "insufficient_margin_at_fill",
|
|
1760
|
+
MarkPriceUnavailable = "mark_price_unavailable",
|
|
1761
|
+
Untriggered = "untriggered",
|
|
1762
|
+
Armed = "armed",
|
|
1763
|
+
Triggered = "triggered",
|
|
1764
|
+
ParentCancelled = "parent_cancelled",
|
|
1765
|
+
PositionClosed = "position_closed",
|
|
1766
|
+
PositionFlipped = "position_flipped",
|
|
1767
|
+
ReduceOnlyInvalidAtTrigger = "reduce_only_invalid_at_trigger",
|
|
1768
|
+
Expired = "expired"
|
|
1769
|
+
}
|
|
1770
|
+
/**
|
|
1771
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1772
|
+
*/
|
|
1773
|
+
declare const PerpsTpSlOrderFieldsSchema: z.ZodPipe<z.ZodObject<{
|
|
1774
|
+
kind: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
1775
|
+
scope: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
1776
|
+
trp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
1777
|
+
parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
1778
|
+
armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
1779
|
+
slip_bps: z.ZodOptional<z.ZodNumber>;
|
|
1780
|
+
trail_bps: z.ZodOptional<z.ZodNumber>;
|
|
1781
|
+
act: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
1782
|
+
trail_anchor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
1783
|
+
trail_active: z.ZodOptional<z.ZodBoolean>;
|
|
1784
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1785
|
+
kind: PerpsTpSlKind;
|
|
1786
|
+
scope: PerpsTpSlScope;
|
|
1787
|
+
triggerPrice: DecimalString;
|
|
1788
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
1789
|
+
armedQuantity: DecimalString | undefined;
|
|
1790
|
+
slippageBps: number | undefined;
|
|
1791
|
+
trailingBps: number | undefined;
|
|
1792
|
+
activationPrice: DecimalString | undefined;
|
|
1793
|
+
trailingAnchor: DecimalString | undefined;
|
|
1794
|
+
trailingActive: boolean | undefined;
|
|
1795
|
+
}, {
|
|
1796
|
+
kind: PerpsTpSlKind;
|
|
1797
|
+
scope: PerpsTpSlScope;
|
|
1798
|
+
trp: DecimalString;
|
|
1799
|
+
parent_oid?: PerpsOrderId | undefined;
|
|
1800
|
+
armed_qty?: DecimalString | undefined;
|
|
1801
|
+
slip_bps?: number | undefined;
|
|
1802
|
+
trail_bps?: number | undefined;
|
|
1803
|
+
act?: DecimalString | undefined;
|
|
1804
|
+
trail_anchor?: DecimalString | undefined;
|
|
1805
|
+
trail_active?: boolean | undefined;
|
|
1806
|
+
}>>;
|
|
1807
|
+
/**
|
|
1808
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1809
|
+
*/
|
|
1810
|
+
type PerpsTpSlOrderFields = z.infer<typeof PerpsTpSlOrderFieldsSchema>;
|
|
1811
|
+
/**
|
|
1812
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1813
|
+
*/
|
|
1814
|
+
declare const PerpsOrderStatusSchema: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
1815
|
+
/**
|
|
1816
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1817
|
+
*/
|
|
1818
|
+
declare const PerpsCommandStatusSchema: z.ZodEnum<{
|
|
1819
|
+
ok: "ok";
|
|
1820
|
+
err: "err";
|
|
1821
|
+
}>;
|
|
1822
|
+
/**
|
|
1823
|
+
* Known rejection identifiers returned when a Perps order cancellation fails.
|
|
1824
|
+
*
|
|
1825
|
+
* The service evolves this set independently of released clients, so
|
|
1826
|
+
* cancellation parsing accepts unknown identifiers as plain strings; see
|
|
1827
|
+
* {@link PerpsCancelOrderErrorCode}.
|
|
1828
|
+
*
|
|
1829
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1830
|
+
*/
|
|
1831
|
+
declare enum PerpsKnownCancelOrderErrorCode {
|
|
1832
|
+
OrderUnknown = "order_unknown",
|
|
1833
|
+
OrderNotInOrderbook = "order_not_in_orderbook",
|
|
1834
|
+
OrderInFlight = "order_in_flight",
|
|
1835
|
+
OrderNotPendingEngine = "order_not_pending_engine",
|
|
1836
|
+
OrderNotFound = "order_not_found"
|
|
1837
|
+
}
|
|
1838
|
+
/**
|
|
1839
|
+
* A Perps order cancellation rejection identifier. Known identifiers are
|
|
1840
|
+
* enumerated in {@link PerpsKnownCancelOrderErrorCode}; newly introduced
|
|
1841
|
+
* identifiers flow through as plain strings so they can be handled before a
|
|
1842
|
+
* client release that enumerates them.
|
|
1843
|
+
*
|
|
1844
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1845
|
+
*/
|
|
1846
|
+
type PerpsCancelOrderErrorCode = PerpsKnownCancelOrderErrorCode | (string & {});
|
|
1847
|
+
/**
|
|
1848
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1849
|
+
*/
|
|
1850
|
+
declare const PerpsCancelOrderErrorCodeSchema: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | PerpsKnownCancelOrderErrorCode, string>>;
|
|
1851
|
+
/**
|
|
1852
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1853
|
+
*/
|
|
1854
|
+
declare const PerpsCommandAckSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1855
|
+
status: z.ZodLiteral<"ok">;
|
|
1856
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1857
|
+
status: z.ZodLiteral<"err">;
|
|
1858
|
+
error: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string, string | undefined>>;
|
|
1859
|
+
}, z.core.$strip>], "status">;
|
|
1860
|
+
/**
|
|
1861
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1862
|
+
*/
|
|
1863
|
+
type PerpsCommandAck = z.infer<typeof PerpsCommandAckSchema>;
|
|
1864
|
+
/**
|
|
1865
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1866
|
+
*/
|
|
1867
|
+
declare const PerpsPostOrderAckSchema: z.ZodPipe<z.ZodObject<{
|
|
1868
|
+
status: z.ZodEnum<{
|
|
1869
|
+
ok: "ok";
|
|
1870
|
+
err: "err";
|
|
1871
|
+
}>;
|
|
1872
|
+
oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
1873
|
+
coid: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
1874
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1875
|
+
builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
1876
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
1877
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
1878
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1879
|
+
address: _kuest_types.EvmAddress;
|
|
1880
|
+
feeRate: DecimalString;
|
|
1881
|
+
}, {
|
|
1882
|
+
address: _kuest_types.EvmAddress;
|
|
1883
|
+
fee_rate: DecimalString;
|
|
1884
|
+
}>>>;
|
|
1885
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1886
|
+
status: "err";
|
|
1887
|
+
error: string;
|
|
1888
|
+
clientOrderId: PerpsClientOrderId | undefined;
|
|
1889
|
+
} | {
|
|
1890
|
+
builder?: {
|
|
1891
|
+
address: _kuest_types.EvmAddress;
|
|
1892
|
+
feeRate: DecimalString;
|
|
1893
|
+
} | undefined;
|
|
1894
|
+
status: "ok";
|
|
1895
|
+
orderId: PerpsOrderId;
|
|
1896
|
+
clientOrderId: PerpsClientOrderId | undefined;
|
|
1897
|
+
error?: undefined;
|
|
1898
|
+
}, {
|
|
1899
|
+
status: "ok" | "err";
|
|
1900
|
+
oid?: PerpsOrderId | undefined;
|
|
1901
|
+
coid?: PerpsClientOrderId | undefined;
|
|
1902
|
+
error?: string | undefined;
|
|
1903
|
+
builder?: {
|
|
1904
|
+
address: _kuest_types.EvmAddress;
|
|
1905
|
+
feeRate: DecimalString;
|
|
1906
|
+
} | undefined;
|
|
1907
|
+
}>>;
|
|
1908
|
+
/**
|
|
1909
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1910
|
+
*/
|
|
1911
|
+
type PerpsPostOrderAck = z.infer<typeof PerpsPostOrderAckSchema>;
|
|
1912
|
+
/**
|
|
1913
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1914
|
+
*/
|
|
1915
|
+
declare const PerpsCancelOrderResultSchema: z.ZodPipe<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1916
|
+
status: z.ZodLiteral<"ok">;
|
|
1917
|
+
oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
1918
|
+
coid: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
1919
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1920
|
+
status: z.ZodLiteral<"err">;
|
|
1921
|
+
error: z.ZodPipe<z.ZodString, z.ZodTransform<(string & {}) | PerpsKnownCancelOrderErrorCode, string>>;
|
|
1922
|
+
oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
1923
|
+
coid: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
1924
|
+
}, z.core.$strip>], "status">, z.ZodTransform<{
|
|
1925
|
+
status: "err";
|
|
1926
|
+
error: (string & {}) | PerpsKnownCancelOrderErrorCode;
|
|
1927
|
+
orderId: PerpsOrderId | undefined;
|
|
1928
|
+
clientOrderId: PerpsClientOrderId | undefined;
|
|
1929
|
+
} | {
|
|
1930
|
+
status: "ok";
|
|
1931
|
+
orderId: PerpsOrderId | undefined;
|
|
1932
|
+
clientOrderId: PerpsClientOrderId | undefined;
|
|
1933
|
+
error?: undefined;
|
|
1934
|
+
}, {
|
|
1935
|
+
status: "ok";
|
|
1936
|
+
oid?: PerpsOrderId | undefined;
|
|
1937
|
+
coid?: PerpsClientOrderId | undefined;
|
|
1938
|
+
} | {
|
|
1939
|
+
status: "err";
|
|
1940
|
+
error: (string & {}) | PerpsKnownCancelOrderErrorCode;
|
|
1941
|
+
oid?: PerpsOrderId | undefined;
|
|
1942
|
+
coid?: PerpsClientOrderId | undefined;
|
|
1943
|
+
}>>;
|
|
1944
|
+
/**
|
|
1945
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1946
|
+
*/
|
|
1947
|
+
type PerpsCancelOrderResult = z.infer<typeof PerpsCancelOrderResultSchema>;
|
|
1948
|
+
/**
|
|
1949
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1950
|
+
*/
|
|
1951
|
+
declare const PerpsCancelAllOrdersResponseSchema: z.ZodObject<{
|
|
1952
|
+
status: z.ZodLiteral<"ok">;
|
|
1953
|
+
}, z.core.$strip>;
|
|
1954
|
+
/**
|
|
1955
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1956
|
+
*/
|
|
1957
|
+
type PerpsCancelAllOrdersResponse = z.infer<typeof PerpsCancelAllOrdersResponseSchema>;
|
|
1958
|
+
/**
|
|
1959
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1960
|
+
*/
|
|
1961
|
+
declare const PerpsUpdateLeverageResultSchema: z.ZodPipe<z.ZodObject<{
|
|
1962
|
+
status: z.ZodLiteral<"ok">;
|
|
1963
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1964
|
+
leverage: z.ZodNumber;
|
|
1965
|
+
cross: z.ZodBoolean;
|
|
1966
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1967
|
+
status: "ok";
|
|
1968
|
+
instrumentId: PerpsInstrumentId;
|
|
1969
|
+
leverage: number;
|
|
1970
|
+
crossMargin: boolean;
|
|
1971
|
+
}, {
|
|
1972
|
+
status: "ok";
|
|
1973
|
+
instrument_id: PerpsInstrumentId;
|
|
1974
|
+
leverage: number;
|
|
1975
|
+
cross: boolean;
|
|
1976
|
+
}>>;
|
|
1977
|
+
/**
|
|
1978
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1979
|
+
*/
|
|
1980
|
+
type PerpsUpdateLeverageResult = z.infer<typeof PerpsUpdateLeverageResultSchema>;
|
|
1981
|
+
/**
|
|
1982
|
+
* A rejected item in a batch Perps leverage update.
|
|
1983
|
+
*
|
|
1984
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
1985
|
+
*/
|
|
1986
|
+
declare const PerpsUpdateLeverageRejectionSchema: z.ZodPipe<z.ZodObject<{
|
|
1987
|
+
status: z.ZodLiteral<"err">;
|
|
1988
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
1989
|
+
error: z.ZodOptional<z.ZodString>;
|
|
1990
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
1991
|
+
status: "err";
|
|
1992
|
+
instrumentId: PerpsInstrumentId;
|
|
1993
|
+
error: string;
|
|
1994
|
+
}, {
|
|
1995
|
+
status: "err";
|
|
1996
|
+
instrument_id: PerpsInstrumentId;
|
|
1997
|
+
error?: string | undefined;
|
|
1998
|
+
}>>;
|
|
1999
|
+
/**
|
|
2000
|
+
* A rejected item in a batch Perps leverage update.
|
|
2001
|
+
*
|
|
2002
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2003
|
+
*/
|
|
2004
|
+
type PerpsUpdateLeverageRejection = z.infer<typeof PerpsUpdateLeverageRejectionSchema>;
|
|
2005
|
+
/**
|
|
2006
|
+
* The result for one item in a batch Perps leverage update.
|
|
2007
|
+
*
|
|
2008
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2009
|
+
*/
|
|
2010
|
+
declare const PerpsUpdateLeverageBatchResultSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
|
|
2011
|
+
status: z.ZodLiteral<"ok">;
|
|
2012
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2013
|
+
leverage: z.ZodNumber;
|
|
2014
|
+
cross: z.ZodBoolean;
|
|
2015
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2016
|
+
status: "ok";
|
|
2017
|
+
instrumentId: PerpsInstrumentId;
|
|
2018
|
+
leverage: number;
|
|
2019
|
+
crossMargin: boolean;
|
|
2020
|
+
}, {
|
|
2021
|
+
status: "ok";
|
|
2022
|
+
instrument_id: PerpsInstrumentId;
|
|
2023
|
+
leverage: number;
|
|
2024
|
+
cross: boolean;
|
|
2025
|
+
}>>, z.ZodPipe<z.ZodObject<{
|
|
2026
|
+
status: z.ZodLiteral<"err">;
|
|
2027
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2028
|
+
error: z.ZodOptional<z.ZodString>;
|
|
2029
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2030
|
+
status: "err";
|
|
2031
|
+
instrumentId: PerpsInstrumentId;
|
|
2032
|
+
error: string;
|
|
2033
|
+
}, {
|
|
2034
|
+
status: "err";
|
|
2035
|
+
instrument_id: PerpsInstrumentId;
|
|
2036
|
+
error?: string | undefined;
|
|
2037
|
+
}>>]>;
|
|
2038
|
+
/**
|
|
2039
|
+
* The result for one item in a batch Perps leverage update.
|
|
2040
|
+
*
|
|
2041
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2042
|
+
*/
|
|
2043
|
+
type PerpsUpdateLeverageBatchResult = z.infer<typeof PerpsUpdateLeverageBatchResultSchema>;
|
|
2044
|
+
/**
|
|
2045
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2046
|
+
*/
|
|
2047
|
+
declare const PerpsOrderSchema: z.ZodPipe<z.ZodObject<{
|
|
2048
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
2049
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2050
|
+
buy: z.ZodBoolean;
|
|
2051
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2052
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2053
|
+
tif: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
2054
|
+
post_only: z.ZodBoolean;
|
|
2055
|
+
ro: z.ZodBoolean;
|
|
2056
|
+
status: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
2057
|
+
resting_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2058
|
+
filled_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2059
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2060
|
+
updated_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2061
|
+
client_order_id: z.ZodOptional<z.ZodString>;
|
|
2062
|
+
chid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>>;
|
|
2063
|
+
tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
|
|
2064
|
+
kind: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
2065
|
+
scope: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
2066
|
+
trp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2067
|
+
parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
2068
|
+
armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2069
|
+
slip_bps: z.ZodOptional<z.ZodNumber>;
|
|
2070
|
+
trail_bps: z.ZodOptional<z.ZodNumber>;
|
|
2071
|
+
act: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2072
|
+
trail_anchor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2073
|
+
trail_active: z.ZodOptional<z.ZodBoolean>;
|
|
2074
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2075
|
+
kind: PerpsTpSlKind;
|
|
2076
|
+
scope: PerpsTpSlScope;
|
|
2077
|
+
triggerPrice: DecimalString;
|
|
2078
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2079
|
+
armedQuantity: DecimalString | undefined;
|
|
2080
|
+
slippageBps: number | undefined;
|
|
2081
|
+
trailingBps: number | undefined;
|
|
2082
|
+
activationPrice: DecimalString | undefined;
|
|
2083
|
+
trailingAnchor: DecimalString | undefined;
|
|
2084
|
+
trailingActive: boolean | undefined;
|
|
2085
|
+
}, {
|
|
2086
|
+
kind: PerpsTpSlKind;
|
|
2087
|
+
scope: PerpsTpSlScope;
|
|
2088
|
+
trp: DecimalString;
|
|
2089
|
+
parent_oid?: PerpsOrderId | undefined;
|
|
2090
|
+
armed_qty?: DecimalString | undefined;
|
|
2091
|
+
slip_bps?: number | undefined;
|
|
2092
|
+
trail_bps?: number | undefined;
|
|
2093
|
+
act?: DecimalString | undefined;
|
|
2094
|
+
trail_anchor?: DecimalString | undefined;
|
|
2095
|
+
trail_active?: boolean | undefined;
|
|
2096
|
+
}>>>>;
|
|
2097
|
+
builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2098
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
2099
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2100
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2101
|
+
address: _kuest_types.EvmAddress;
|
|
2102
|
+
feeRate: DecimalString;
|
|
2103
|
+
}, {
|
|
2104
|
+
address: _kuest_types.EvmAddress;
|
|
2105
|
+
fee_rate: DecimalString;
|
|
2106
|
+
}>>>;
|
|
2107
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2108
|
+
builder?: {
|
|
2109
|
+
address: _kuest_types.EvmAddress;
|
|
2110
|
+
feeRate: DecimalString;
|
|
2111
|
+
} | undefined;
|
|
2112
|
+
tpSl: {
|
|
2113
|
+
kind: PerpsTpSlKind;
|
|
2114
|
+
scope: PerpsTpSlScope;
|
|
2115
|
+
triggerPrice: DecimalString;
|
|
2116
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2117
|
+
armedQuantity: DecimalString | undefined;
|
|
2118
|
+
slippageBps: number | undefined;
|
|
2119
|
+
trailingBps: number | undefined;
|
|
2120
|
+
activationPrice: DecimalString | undefined;
|
|
2121
|
+
trailingAnchor: DecimalString | undefined;
|
|
2122
|
+
trailingActive: boolean | undefined;
|
|
2123
|
+
} | undefined;
|
|
2124
|
+
chaseId?: PerpsChaseId | undefined;
|
|
2125
|
+
id: PerpsOrderId;
|
|
2126
|
+
instrumentId: PerpsInstrumentId;
|
|
2127
|
+
side: OrderSide;
|
|
2128
|
+
price: DecimalString;
|
|
2129
|
+
quantity: DecimalString;
|
|
2130
|
+
timeInForce: PerpsTimeInForce;
|
|
2131
|
+
postOnly: boolean;
|
|
2132
|
+
reduceOnly: boolean;
|
|
2133
|
+
status: PerpsOrderStatus;
|
|
2134
|
+
restingQuantity: DecimalString;
|
|
2135
|
+
filledQuantity: DecimalString;
|
|
2136
|
+
createdTimestamp: EpochMilliseconds;
|
|
2137
|
+
updatedTimestamp: EpochMilliseconds;
|
|
2138
|
+
clientOrderId: string | undefined;
|
|
2139
|
+
}, {
|
|
2140
|
+
order_id: PerpsOrderId;
|
|
2141
|
+
instrument_id: PerpsInstrumentId;
|
|
2142
|
+
buy: boolean;
|
|
2143
|
+
price: DecimalString;
|
|
2144
|
+
quantity: DecimalString;
|
|
2145
|
+
tif: PerpsTimeInForce;
|
|
2146
|
+
post_only: boolean;
|
|
2147
|
+
ro: boolean;
|
|
2148
|
+
status: PerpsOrderStatus;
|
|
2149
|
+
resting_quantity: DecimalString;
|
|
2150
|
+
filled_quantity: DecimalString;
|
|
2151
|
+
created_timestamp: EpochMilliseconds;
|
|
2152
|
+
updated_timestamp: EpochMilliseconds;
|
|
2153
|
+
client_order_id?: string | undefined;
|
|
2154
|
+
chid?: PerpsChaseId | undefined;
|
|
2155
|
+
tpsl?: {
|
|
2156
|
+
kind: PerpsTpSlKind;
|
|
2157
|
+
scope: PerpsTpSlScope;
|
|
2158
|
+
triggerPrice: DecimalString;
|
|
2159
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2160
|
+
armedQuantity: DecimalString | undefined;
|
|
2161
|
+
slippageBps: number | undefined;
|
|
2162
|
+
trailingBps: number | undefined;
|
|
2163
|
+
activationPrice: DecimalString | undefined;
|
|
2164
|
+
trailingAnchor: DecimalString | undefined;
|
|
2165
|
+
trailingActive: boolean | undefined;
|
|
2166
|
+
} | null | undefined;
|
|
2167
|
+
builder?: {
|
|
2168
|
+
address: _kuest_types.EvmAddress;
|
|
2169
|
+
feeRate: DecimalString;
|
|
2170
|
+
} | undefined;
|
|
2171
|
+
}>>;
|
|
2172
|
+
/**
|
|
2173
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2174
|
+
*/
|
|
2175
|
+
type PerpsOrder = z.infer<typeof PerpsOrderSchema>;
|
|
2176
|
+
/**
|
|
2177
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2178
|
+
*/
|
|
2179
|
+
declare const FetchPerpsOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
2180
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
2181
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2182
|
+
buy: z.ZodBoolean;
|
|
2183
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2184
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2185
|
+
tif: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
2186
|
+
post_only: z.ZodBoolean;
|
|
2187
|
+
ro: z.ZodBoolean;
|
|
2188
|
+
status: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
2189
|
+
resting_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2190
|
+
filled_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2191
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2192
|
+
updated_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2193
|
+
client_order_id: z.ZodOptional<z.ZodString>;
|
|
2194
|
+
chid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>>;
|
|
2195
|
+
tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
|
|
2196
|
+
kind: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
2197
|
+
scope: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
2198
|
+
trp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2199
|
+
parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
2200
|
+
armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2201
|
+
slip_bps: z.ZodOptional<z.ZodNumber>;
|
|
2202
|
+
trail_bps: z.ZodOptional<z.ZodNumber>;
|
|
2203
|
+
act: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2204
|
+
trail_anchor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2205
|
+
trail_active: z.ZodOptional<z.ZodBoolean>;
|
|
2206
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2207
|
+
kind: PerpsTpSlKind;
|
|
2208
|
+
scope: PerpsTpSlScope;
|
|
2209
|
+
triggerPrice: DecimalString;
|
|
2210
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2211
|
+
armedQuantity: DecimalString | undefined;
|
|
2212
|
+
slippageBps: number | undefined;
|
|
2213
|
+
trailingBps: number | undefined;
|
|
2214
|
+
activationPrice: DecimalString | undefined;
|
|
2215
|
+
trailingAnchor: DecimalString | undefined;
|
|
2216
|
+
trailingActive: boolean | undefined;
|
|
2217
|
+
}, {
|
|
2218
|
+
kind: PerpsTpSlKind;
|
|
2219
|
+
scope: PerpsTpSlScope;
|
|
2220
|
+
trp: DecimalString;
|
|
2221
|
+
parent_oid?: PerpsOrderId | undefined;
|
|
2222
|
+
armed_qty?: DecimalString | undefined;
|
|
2223
|
+
slip_bps?: number | undefined;
|
|
2224
|
+
trail_bps?: number | undefined;
|
|
2225
|
+
act?: DecimalString | undefined;
|
|
2226
|
+
trail_anchor?: DecimalString | undefined;
|
|
2227
|
+
trail_active?: boolean | undefined;
|
|
2228
|
+
}>>>>;
|
|
2229
|
+
builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2230
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
2231
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2232
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2233
|
+
address: _kuest_types.EvmAddress;
|
|
2234
|
+
feeRate: DecimalString;
|
|
2235
|
+
}, {
|
|
2236
|
+
address: _kuest_types.EvmAddress;
|
|
2237
|
+
fee_rate: DecimalString;
|
|
2238
|
+
}>>>;
|
|
2239
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2240
|
+
builder?: {
|
|
2241
|
+
address: _kuest_types.EvmAddress;
|
|
2242
|
+
feeRate: DecimalString;
|
|
2243
|
+
} | undefined;
|
|
2244
|
+
tpSl: {
|
|
2245
|
+
kind: PerpsTpSlKind;
|
|
2246
|
+
scope: PerpsTpSlScope;
|
|
2247
|
+
triggerPrice: DecimalString;
|
|
2248
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2249
|
+
armedQuantity: DecimalString | undefined;
|
|
2250
|
+
slippageBps: number | undefined;
|
|
2251
|
+
trailingBps: number | undefined;
|
|
2252
|
+
activationPrice: DecimalString | undefined;
|
|
2253
|
+
trailingAnchor: DecimalString | undefined;
|
|
2254
|
+
trailingActive: boolean | undefined;
|
|
2255
|
+
} | undefined;
|
|
2256
|
+
chaseId?: PerpsChaseId | undefined;
|
|
2257
|
+
id: PerpsOrderId;
|
|
2258
|
+
instrumentId: PerpsInstrumentId;
|
|
2259
|
+
side: OrderSide;
|
|
2260
|
+
price: DecimalString;
|
|
2261
|
+
quantity: DecimalString;
|
|
2262
|
+
timeInForce: PerpsTimeInForce;
|
|
2263
|
+
postOnly: boolean;
|
|
2264
|
+
reduceOnly: boolean;
|
|
2265
|
+
status: PerpsOrderStatus;
|
|
2266
|
+
restingQuantity: DecimalString;
|
|
2267
|
+
filledQuantity: DecimalString;
|
|
2268
|
+
createdTimestamp: EpochMilliseconds;
|
|
2269
|
+
updatedTimestamp: EpochMilliseconds;
|
|
2270
|
+
clientOrderId: string | undefined;
|
|
2271
|
+
}, {
|
|
2272
|
+
order_id: PerpsOrderId;
|
|
2273
|
+
instrument_id: PerpsInstrumentId;
|
|
2274
|
+
buy: boolean;
|
|
2275
|
+
price: DecimalString;
|
|
2276
|
+
quantity: DecimalString;
|
|
2277
|
+
tif: PerpsTimeInForce;
|
|
2278
|
+
post_only: boolean;
|
|
2279
|
+
ro: boolean;
|
|
2280
|
+
status: PerpsOrderStatus;
|
|
2281
|
+
resting_quantity: DecimalString;
|
|
2282
|
+
filled_quantity: DecimalString;
|
|
2283
|
+
created_timestamp: EpochMilliseconds;
|
|
2284
|
+
updated_timestamp: EpochMilliseconds;
|
|
2285
|
+
client_order_id?: string | undefined;
|
|
2286
|
+
chid?: PerpsChaseId | undefined;
|
|
2287
|
+
tpsl?: {
|
|
2288
|
+
kind: PerpsTpSlKind;
|
|
2289
|
+
scope: PerpsTpSlScope;
|
|
2290
|
+
triggerPrice: DecimalString;
|
|
2291
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2292
|
+
armedQuantity: DecimalString | undefined;
|
|
2293
|
+
slippageBps: number | undefined;
|
|
2294
|
+
trailingBps: number | undefined;
|
|
2295
|
+
activationPrice: DecimalString | undefined;
|
|
2296
|
+
trailingAnchor: DecimalString | undefined;
|
|
2297
|
+
trailingActive: boolean | undefined;
|
|
2298
|
+
} | null | undefined;
|
|
2299
|
+
builder?: {
|
|
2300
|
+
address: _kuest_types.EvmAddress;
|
|
2301
|
+
feeRate: DecimalString;
|
|
2302
|
+
} | undefined;
|
|
2303
|
+
}>>>;
|
|
2304
|
+
/**
|
|
2305
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2306
|
+
*/
|
|
2307
|
+
declare const FetchPerpsOpenOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
2308
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
2309
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2310
|
+
buy: z.ZodBoolean;
|
|
2311
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2312
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2313
|
+
tif: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
2314
|
+
post_only: z.ZodBoolean;
|
|
2315
|
+
ro: z.ZodBoolean;
|
|
2316
|
+
status: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
2317
|
+
resting_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2318
|
+
filled_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2319
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2320
|
+
updated_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2321
|
+
client_order_id: z.ZodOptional<z.ZodString>;
|
|
2322
|
+
chid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>>;
|
|
2323
|
+
tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
|
|
2324
|
+
kind: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
2325
|
+
scope: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
2326
|
+
trp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2327
|
+
parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
2328
|
+
armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2329
|
+
slip_bps: z.ZodOptional<z.ZodNumber>;
|
|
2330
|
+
trail_bps: z.ZodOptional<z.ZodNumber>;
|
|
2331
|
+
act: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2332
|
+
trail_anchor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2333
|
+
trail_active: z.ZodOptional<z.ZodBoolean>;
|
|
2334
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2335
|
+
kind: PerpsTpSlKind;
|
|
2336
|
+
scope: PerpsTpSlScope;
|
|
2337
|
+
triggerPrice: DecimalString;
|
|
2338
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2339
|
+
armedQuantity: DecimalString | undefined;
|
|
2340
|
+
slippageBps: number | undefined;
|
|
2341
|
+
trailingBps: number | undefined;
|
|
2342
|
+
activationPrice: DecimalString | undefined;
|
|
2343
|
+
trailingAnchor: DecimalString | undefined;
|
|
2344
|
+
trailingActive: boolean | undefined;
|
|
2345
|
+
}, {
|
|
2346
|
+
kind: PerpsTpSlKind;
|
|
2347
|
+
scope: PerpsTpSlScope;
|
|
2348
|
+
trp: DecimalString;
|
|
2349
|
+
parent_oid?: PerpsOrderId | undefined;
|
|
2350
|
+
armed_qty?: DecimalString | undefined;
|
|
2351
|
+
slip_bps?: number | undefined;
|
|
2352
|
+
trail_bps?: number | undefined;
|
|
2353
|
+
act?: DecimalString | undefined;
|
|
2354
|
+
trail_anchor?: DecimalString | undefined;
|
|
2355
|
+
trail_active?: boolean | undefined;
|
|
2356
|
+
}>>>>;
|
|
2357
|
+
builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2358
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
2359
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2360
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2361
|
+
address: _kuest_types.EvmAddress;
|
|
2362
|
+
feeRate: DecimalString;
|
|
2363
|
+
}, {
|
|
2364
|
+
address: _kuest_types.EvmAddress;
|
|
2365
|
+
fee_rate: DecimalString;
|
|
2366
|
+
}>>>;
|
|
2367
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2368
|
+
builder?: {
|
|
2369
|
+
address: _kuest_types.EvmAddress;
|
|
2370
|
+
feeRate: DecimalString;
|
|
2371
|
+
} | undefined;
|
|
2372
|
+
tpSl: {
|
|
2373
|
+
kind: PerpsTpSlKind;
|
|
2374
|
+
scope: PerpsTpSlScope;
|
|
2375
|
+
triggerPrice: DecimalString;
|
|
2376
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2377
|
+
armedQuantity: DecimalString | undefined;
|
|
2378
|
+
slippageBps: number | undefined;
|
|
2379
|
+
trailingBps: number | undefined;
|
|
2380
|
+
activationPrice: DecimalString | undefined;
|
|
2381
|
+
trailingAnchor: DecimalString | undefined;
|
|
2382
|
+
trailingActive: boolean | undefined;
|
|
2383
|
+
} | undefined;
|
|
2384
|
+
chaseId?: PerpsChaseId | undefined;
|
|
2385
|
+
id: PerpsOrderId;
|
|
2386
|
+
instrumentId: PerpsInstrumentId;
|
|
2387
|
+
side: OrderSide;
|
|
2388
|
+
price: DecimalString;
|
|
2389
|
+
quantity: DecimalString;
|
|
2390
|
+
timeInForce: PerpsTimeInForce;
|
|
2391
|
+
postOnly: boolean;
|
|
2392
|
+
reduceOnly: boolean;
|
|
2393
|
+
status: PerpsOrderStatus;
|
|
2394
|
+
restingQuantity: DecimalString;
|
|
2395
|
+
filledQuantity: DecimalString;
|
|
2396
|
+
createdTimestamp: EpochMilliseconds;
|
|
2397
|
+
updatedTimestamp: EpochMilliseconds;
|
|
2398
|
+
clientOrderId: string | undefined;
|
|
2399
|
+
}, {
|
|
2400
|
+
order_id: PerpsOrderId;
|
|
2401
|
+
instrument_id: PerpsInstrumentId;
|
|
2402
|
+
buy: boolean;
|
|
2403
|
+
price: DecimalString;
|
|
2404
|
+
quantity: DecimalString;
|
|
2405
|
+
tif: PerpsTimeInForce;
|
|
2406
|
+
post_only: boolean;
|
|
2407
|
+
ro: boolean;
|
|
2408
|
+
status: PerpsOrderStatus;
|
|
2409
|
+
resting_quantity: DecimalString;
|
|
2410
|
+
filled_quantity: DecimalString;
|
|
2411
|
+
created_timestamp: EpochMilliseconds;
|
|
2412
|
+
updated_timestamp: EpochMilliseconds;
|
|
2413
|
+
client_order_id?: string | undefined;
|
|
2414
|
+
chid?: PerpsChaseId | undefined;
|
|
2415
|
+
tpsl?: {
|
|
2416
|
+
kind: PerpsTpSlKind;
|
|
2417
|
+
scope: PerpsTpSlScope;
|
|
2418
|
+
triggerPrice: DecimalString;
|
|
2419
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2420
|
+
armedQuantity: DecimalString | undefined;
|
|
2421
|
+
slippageBps: number | undefined;
|
|
2422
|
+
trailingBps: number | undefined;
|
|
2423
|
+
activationPrice: DecimalString | undefined;
|
|
2424
|
+
trailingAnchor: DecimalString | undefined;
|
|
2425
|
+
trailingActive: boolean | undefined;
|
|
2426
|
+
} | null | undefined;
|
|
2427
|
+
builder?: {
|
|
2428
|
+
address: _kuest_types.EvmAddress;
|
|
2429
|
+
feeRate: DecimalString;
|
|
2430
|
+
} | undefined;
|
|
2431
|
+
}>>>;
|
|
2432
|
+
/**
|
|
2433
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2434
|
+
*/
|
|
2435
|
+
declare const PerpsOrderUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
2436
|
+
oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
2437
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2438
|
+
buy: z.ZodBoolean;
|
|
2439
|
+
p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2440
|
+
qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2441
|
+
tif: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
2442
|
+
po: z.ZodBoolean;
|
|
2443
|
+
ro: z.ZodBoolean;
|
|
2444
|
+
status: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
2445
|
+
rest: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2446
|
+
fill: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2447
|
+
cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2448
|
+
uts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2449
|
+
coid: z.ZodOptional<z.ZodString>;
|
|
2450
|
+
chid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsChaseId, number>>>;
|
|
2451
|
+
tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
|
|
2452
|
+
kind: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
2453
|
+
scope: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
2454
|
+
trp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2455
|
+
parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
2456
|
+
armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2457
|
+
slip_bps: z.ZodOptional<z.ZodNumber>;
|
|
2458
|
+
trail_bps: z.ZodOptional<z.ZodNumber>;
|
|
2459
|
+
act: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2460
|
+
trail_anchor: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2461
|
+
trail_active: z.ZodOptional<z.ZodBoolean>;
|
|
2462
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2463
|
+
kind: PerpsTpSlKind;
|
|
2464
|
+
scope: PerpsTpSlScope;
|
|
2465
|
+
triggerPrice: DecimalString;
|
|
2466
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2467
|
+
armedQuantity: DecimalString | undefined;
|
|
2468
|
+
slippageBps: number | undefined;
|
|
2469
|
+
trailingBps: number | undefined;
|
|
2470
|
+
activationPrice: DecimalString | undefined;
|
|
2471
|
+
trailingAnchor: DecimalString | undefined;
|
|
2472
|
+
trailingActive: boolean | undefined;
|
|
2473
|
+
}, {
|
|
2474
|
+
kind: PerpsTpSlKind;
|
|
2475
|
+
scope: PerpsTpSlScope;
|
|
2476
|
+
trp: DecimalString;
|
|
2477
|
+
parent_oid?: PerpsOrderId | undefined;
|
|
2478
|
+
armed_qty?: DecimalString | undefined;
|
|
2479
|
+
slip_bps?: number | undefined;
|
|
2480
|
+
trail_bps?: number | undefined;
|
|
2481
|
+
act?: DecimalString | undefined;
|
|
2482
|
+
trail_anchor?: DecimalString | undefined;
|
|
2483
|
+
trail_active?: boolean | undefined;
|
|
2484
|
+
}>>>>;
|
|
2485
|
+
builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2486
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
2487
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2488
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2489
|
+
address: _kuest_types.EvmAddress;
|
|
2490
|
+
feeRate: DecimalString;
|
|
2491
|
+
}, {
|
|
2492
|
+
address: _kuest_types.EvmAddress;
|
|
2493
|
+
fee_rate: DecimalString;
|
|
2494
|
+
}>>>;
|
|
2495
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2496
|
+
builder?: {
|
|
2497
|
+
address: _kuest_types.EvmAddress;
|
|
2498
|
+
feeRate: DecimalString;
|
|
2499
|
+
} | undefined;
|
|
2500
|
+
tpSl: {
|
|
2501
|
+
kind: PerpsTpSlKind;
|
|
2502
|
+
scope: PerpsTpSlScope;
|
|
2503
|
+
triggerPrice: DecimalString;
|
|
2504
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2505
|
+
armedQuantity: DecimalString | undefined;
|
|
2506
|
+
slippageBps: number | undefined;
|
|
2507
|
+
trailingBps: number | undefined;
|
|
2508
|
+
activationPrice: DecimalString | undefined;
|
|
2509
|
+
trailingAnchor: DecimalString | undefined;
|
|
2510
|
+
trailingActive: boolean | undefined;
|
|
2511
|
+
} | undefined;
|
|
2512
|
+
chaseId?: PerpsChaseId | undefined;
|
|
2513
|
+
id: PerpsOrderId;
|
|
2514
|
+
instrumentId: PerpsInstrumentId;
|
|
2515
|
+
side: OrderSide;
|
|
2516
|
+
price: DecimalString;
|
|
2517
|
+
quantity: DecimalString;
|
|
2518
|
+
timeInForce: PerpsTimeInForce;
|
|
2519
|
+
postOnly: boolean;
|
|
2520
|
+
reduceOnly: boolean;
|
|
2521
|
+
status: PerpsOrderStatus;
|
|
2522
|
+
restingQuantity: DecimalString;
|
|
2523
|
+
filledQuantity: DecimalString;
|
|
2524
|
+
createdTimestamp: EpochMilliseconds;
|
|
2525
|
+
updatedTimestamp: EpochMilliseconds;
|
|
2526
|
+
clientOrderId: string | undefined;
|
|
2527
|
+
}, {
|
|
2528
|
+
oid: PerpsOrderId;
|
|
2529
|
+
iid: PerpsInstrumentId;
|
|
2530
|
+
buy: boolean;
|
|
2531
|
+
p: DecimalString;
|
|
2532
|
+
qty: DecimalString;
|
|
2533
|
+
tif: PerpsTimeInForce;
|
|
2534
|
+
po: boolean;
|
|
2535
|
+
ro: boolean;
|
|
2536
|
+
status: PerpsOrderStatus;
|
|
2537
|
+
rest: DecimalString;
|
|
2538
|
+
fill: DecimalString;
|
|
2539
|
+
cts: EpochMilliseconds;
|
|
2540
|
+
uts: EpochMilliseconds;
|
|
2541
|
+
coid?: string | undefined;
|
|
2542
|
+
chid?: PerpsChaseId | undefined;
|
|
2543
|
+
tpsl?: {
|
|
2544
|
+
kind: PerpsTpSlKind;
|
|
2545
|
+
scope: PerpsTpSlScope;
|
|
2546
|
+
triggerPrice: DecimalString;
|
|
2547
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
2548
|
+
armedQuantity: DecimalString | undefined;
|
|
2549
|
+
slippageBps: number | undefined;
|
|
2550
|
+
trailingBps: number | undefined;
|
|
2551
|
+
activationPrice: DecimalString | undefined;
|
|
2552
|
+
trailingAnchor: DecimalString | undefined;
|
|
2553
|
+
trailingActive: boolean | undefined;
|
|
2554
|
+
} | null | undefined;
|
|
2555
|
+
builder?: {
|
|
2556
|
+
address: _kuest_types.EvmAddress;
|
|
2557
|
+
feeRate: DecimalString;
|
|
2558
|
+
} | undefined;
|
|
2559
|
+
}>>;
|
|
2560
|
+
/**
|
|
2561
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2562
|
+
*/
|
|
2563
|
+
declare enum PerpsLiquidationMethod {
|
|
2564
|
+
Market = "market",
|
|
2565
|
+
Backstop = "backstop"
|
|
2566
|
+
}
|
|
2567
|
+
/**
|
|
2568
|
+
* Liquidation command context, distinct from the fill's accounting price.
|
|
2569
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2570
|
+
*/
|
|
2571
|
+
declare const PerpsLiquidationDetailsSchema: z.ZodPipe<z.ZodObject<{
|
|
2572
|
+
liquidated_user: z.ZodOptional<z.ZodString>;
|
|
2573
|
+
mark: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2574
|
+
method: z.ZodEnum<typeof PerpsLiquidationMethod>;
|
|
2575
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2576
|
+
mark: DecimalString;
|
|
2577
|
+
method: PerpsLiquidationMethod;
|
|
2578
|
+
liquidatedUser?: string | undefined;
|
|
2579
|
+
}, {
|
|
2580
|
+
mark: DecimalString;
|
|
2581
|
+
method: PerpsLiquidationMethod;
|
|
2582
|
+
liquidated_user?: string | undefined;
|
|
2583
|
+
}>>;
|
|
2584
|
+
/**
|
|
2585
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2586
|
+
*/
|
|
2587
|
+
type PerpsLiquidationDetails = z.infer<typeof PerpsLiquidationDetailsSchema>;
|
|
2588
|
+
/**
|
|
2589
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2590
|
+
*/
|
|
2591
|
+
declare const PerpsAccountFillSchema: z.ZodPipe<z.ZodObject<{
|
|
2592
|
+
trade_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
2593
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
2594
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2595
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
2596
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
2597
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2598
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2599
|
+
taker: z.ZodBoolean;
|
|
2600
|
+
fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2601
|
+
builder_fee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
|
|
2602
|
+
total_fee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
|
|
2603
|
+
builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2604
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
2605
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2606
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2607
|
+
address: _kuest_types.EvmAddress;
|
|
2608
|
+
feeRate: DecimalString;
|
|
2609
|
+
}, {
|
|
2610
|
+
address: _kuest_types.EvmAddress;
|
|
2611
|
+
fee_rate: DecimalString;
|
|
2612
|
+
}>>>;
|
|
2613
|
+
fee_asset: z.ZodString;
|
|
2614
|
+
previous_size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2615
|
+
previous_entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2616
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2617
|
+
liquidation: z.ZodBoolean;
|
|
2618
|
+
adl: z.ZodBoolean;
|
|
2619
|
+
liquidation_details: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2620
|
+
liquidated_user: z.ZodOptional<z.ZodString>;
|
|
2621
|
+
mark: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2622
|
+
method: z.ZodEnum<typeof PerpsLiquidationMethod>;
|
|
2623
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2624
|
+
mark: DecimalString;
|
|
2625
|
+
method: PerpsLiquidationMethod;
|
|
2626
|
+
liquidatedUser?: string | undefined;
|
|
2627
|
+
}, {
|
|
2628
|
+
mark: DecimalString;
|
|
2629
|
+
method: PerpsLiquidationMethod;
|
|
2630
|
+
liquidated_user?: string | undefined;
|
|
2631
|
+
}>>>;
|
|
2632
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2633
|
+
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.TxHash, string>>>>;
|
|
2634
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2635
|
+
feeAsset: string;
|
|
2636
|
+
previousSize: DecimalString;
|
|
2637
|
+
previousEntryPrice: DecimalString;
|
|
2638
|
+
pnl: DecimalString;
|
|
2639
|
+
liquidation: boolean;
|
|
2640
|
+
/** Whether this fill came from auto-deleveraging. */
|
|
2641
|
+
adl: boolean;
|
|
2642
|
+
/** Present for backstop liquidations; ordinary order-book liquidations omit it. */
|
|
2643
|
+
liquidationDetails: {
|
|
2644
|
+
mark: DecimalString;
|
|
2645
|
+
method: PerpsLiquidationMethod;
|
|
2646
|
+
liquidatedUser?: string | undefined;
|
|
2647
|
+
} | undefined;
|
|
2648
|
+
timestamp: EpochMilliseconds;
|
|
2649
|
+
hash: _kuest_types.TxHash | undefined;
|
|
2650
|
+
builder?: {
|
|
2651
|
+
address: _kuest_types.EvmAddress;
|
|
2652
|
+
feeRate: DecimalString;
|
|
2653
|
+
} | undefined;
|
|
2654
|
+
tradeId: PerpsTradeId;
|
|
2655
|
+
orderId: PerpsOrderId;
|
|
2656
|
+
instrumentId: PerpsInstrumentId;
|
|
2657
|
+
side: PerpsSide;
|
|
2658
|
+
/** True for a position close at instrument settlement; false on older responses. */
|
|
2659
|
+
settlement: boolean;
|
|
2660
|
+
price: DecimalString;
|
|
2661
|
+
quantity: DecimalString;
|
|
2662
|
+
taker: boolean;
|
|
2663
|
+
/** Exchange fee for this fill, excluding any builder fee. */
|
|
2664
|
+
fee: DecimalString;
|
|
2665
|
+
/** Builder fee charged in addition to `fee`; zero without one. */
|
|
2666
|
+
builderFee: DecimalString;
|
|
2667
|
+
/** Sum of `fee` and `builderFee`. */
|
|
2668
|
+
totalFee: DecimalString;
|
|
2669
|
+
}, {
|
|
2670
|
+
trade_id: PerpsTradeId;
|
|
2671
|
+
order_id: PerpsOrderId;
|
|
2672
|
+
instrument_id: PerpsInstrumentId;
|
|
2673
|
+
side: PerpsSide;
|
|
2674
|
+
settlement: boolean;
|
|
2675
|
+
price: DecimalString;
|
|
2676
|
+
quantity: DecimalString;
|
|
2677
|
+
taker: boolean;
|
|
2678
|
+
fee: DecimalString;
|
|
2679
|
+
fee_asset: string;
|
|
2680
|
+
previous_size: DecimalString;
|
|
2681
|
+
previous_entry_price: DecimalString;
|
|
2682
|
+
pnl: DecimalString;
|
|
2683
|
+
liquidation: boolean;
|
|
2684
|
+
adl: boolean;
|
|
2685
|
+
timestamp: EpochMilliseconds;
|
|
2686
|
+
builder_fee?: DecimalString | undefined;
|
|
2687
|
+
total_fee?: DecimalString | undefined;
|
|
2688
|
+
builder?: {
|
|
2689
|
+
address: _kuest_types.EvmAddress;
|
|
2690
|
+
feeRate: DecimalString;
|
|
2691
|
+
} | undefined;
|
|
2692
|
+
liquidation_details?: {
|
|
2693
|
+
mark: DecimalString;
|
|
2694
|
+
method: PerpsLiquidationMethod;
|
|
2695
|
+
liquidatedUser?: string | undefined;
|
|
2696
|
+
} | undefined;
|
|
2697
|
+
hash?: _kuest_types.TxHash | undefined;
|
|
2698
|
+
}>>;
|
|
2699
|
+
/**
|
|
2700
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2701
|
+
*/
|
|
2702
|
+
type PerpsAccountFill = z.infer<typeof PerpsAccountFillSchema>;
|
|
2703
|
+
/**
|
|
2704
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2705
|
+
*/
|
|
2706
|
+
declare const ListPerpsFillsResponseSchema: z.ZodObject<{
|
|
2707
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
2708
|
+
trade_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
2709
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
2710
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2711
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
2712
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
2713
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2714
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2715
|
+
taker: z.ZodBoolean;
|
|
2716
|
+
fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2717
|
+
builder_fee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
|
|
2718
|
+
total_fee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
|
|
2719
|
+
builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2720
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
2721
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2722
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2723
|
+
address: _kuest_types.EvmAddress;
|
|
2724
|
+
feeRate: DecimalString;
|
|
2725
|
+
}, {
|
|
2726
|
+
address: _kuest_types.EvmAddress;
|
|
2727
|
+
fee_rate: DecimalString;
|
|
2728
|
+
}>>>;
|
|
2729
|
+
fee_asset: z.ZodString;
|
|
2730
|
+
previous_size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2731
|
+
previous_entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2732
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2733
|
+
liquidation: z.ZodBoolean;
|
|
2734
|
+
adl: z.ZodBoolean;
|
|
2735
|
+
liquidation_details: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2736
|
+
liquidated_user: z.ZodOptional<z.ZodString>;
|
|
2737
|
+
mark: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2738
|
+
method: z.ZodEnum<typeof PerpsLiquidationMethod>;
|
|
2739
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2740
|
+
mark: DecimalString;
|
|
2741
|
+
method: PerpsLiquidationMethod;
|
|
2742
|
+
liquidatedUser?: string | undefined;
|
|
2743
|
+
}, {
|
|
2744
|
+
mark: DecimalString;
|
|
2745
|
+
method: PerpsLiquidationMethod;
|
|
2746
|
+
liquidated_user?: string | undefined;
|
|
2747
|
+
}>>>;
|
|
2748
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2749
|
+
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.TxHash, string>>>>;
|
|
2750
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2751
|
+
feeAsset: string;
|
|
2752
|
+
previousSize: DecimalString;
|
|
2753
|
+
previousEntryPrice: DecimalString;
|
|
2754
|
+
pnl: DecimalString;
|
|
2755
|
+
liquidation: boolean;
|
|
2756
|
+
/** Whether this fill came from auto-deleveraging. */
|
|
2757
|
+
adl: boolean;
|
|
2758
|
+
/** Present for backstop liquidations; ordinary order-book liquidations omit it. */
|
|
2759
|
+
liquidationDetails: {
|
|
2760
|
+
mark: DecimalString;
|
|
2761
|
+
method: PerpsLiquidationMethod;
|
|
2762
|
+
liquidatedUser?: string | undefined;
|
|
2763
|
+
} | undefined;
|
|
2764
|
+
timestamp: EpochMilliseconds;
|
|
2765
|
+
hash: _kuest_types.TxHash | undefined;
|
|
2766
|
+
builder?: {
|
|
2767
|
+
address: _kuest_types.EvmAddress;
|
|
2768
|
+
feeRate: DecimalString;
|
|
2769
|
+
} | undefined;
|
|
2770
|
+
tradeId: PerpsTradeId;
|
|
2771
|
+
orderId: PerpsOrderId;
|
|
2772
|
+
instrumentId: PerpsInstrumentId;
|
|
2773
|
+
side: PerpsSide;
|
|
2774
|
+
/** True for a position close at instrument settlement; false on older responses. */
|
|
2775
|
+
settlement: boolean;
|
|
2776
|
+
price: DecimalString;
|
|
2777
|
+
quantity: DecimalString;
|
|
2778
|
+
taker: boolean;
|
|
2779
|
+
/** Exchange fee for this fill, excluding any builder fee. */
|
|
2780
|
+
fee: DecimalString;
|
|
2781
|
+
/** Builder fee charged in addition to `fee`; zero without one. */
|
|
2782
|
+
builderFee: DecimalString;
|
|
2783
|
+
/** Sum of `fee` and `builderFee`. */
|
|
2784
|
+
totalFee: DecimalString;
|
|
2785
|
+
}, {
|
|
2786
|
+
trade_id: PerpsTradeId;
|
|
2787
|
+
order_id: PerpsOrderId;
|
|
2788
|
+
instrument_id: PerpsInstrumentId;
|
|
2789
|
+
side: PerpsSide;
|
|
2790
|
+
settlement: boolean;
|
|
2791
|
+
price: DecimalString;
|
|
2792
|
+
quantity: DecimalString;
|
|
2793
|
+
taker: boolean;
|
|
2794
|
+
fee: DecimalString;
|
|
2795
|
+
fee_asset: string;
|
|
2796
|
+
previous_size: DecimalString;
|
|
2797
|
+
previous_entry_price: DecimalString;
|
|
2798
|
+
pnl: DecimalString;
|
|
2799
|
+
liquidation: boolean;
|
|
2800
|
+
adl: boolean;
|
|
2801
|
+
timestamp: EpochMilliseconds;
|
|
2802
|
+
builder_fee?: DecimalString | undefined;
|
|
2803
|
+
total_fee?: DecimalString | undefined;
|
|
2804
|
+
builder?: {
|
|
2805
|
+
address: _kuest_types.EvmAddress;
|
|
2806
|
+
feeRate: DecimalString;
|
|
2807
|
+
} | undefined;
|
|
2808
|
+
liquidation_details?: {
|
|
2809
|
+
mark: DecimalString;
|
|
2810
|
+
method: PerpsLiquidationMethod;
|
|
2811
|
+
liquidatedUser?: string | undefined;
|
|
2812
|
+
} | undefined;
|
|
2813
|
+
hash?: _kuest_types.TxHash | undefined;
|
|
2814
|
+
}>>>;
|
|
2815
|
+
more: z.ZodBoolean;
|
|
2816
|
+
}, z.core.$strip>;
|
|
2817
|
+
/**
|
|
2818
|
+
* @experimental This API may change in a breaking way in any release, including patch releases.
|
|
2819
|
+
*/
|
|
2820
|
+
declare const PerpsAccountFillUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
2821
|
+
tid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
2822
|
+
oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
2823
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
2824
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
2825
|
+
settlement: z.ZodDefault<z.ZodBoolean>;
|
|
2826
|
+
p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2827
|
+
qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2828
|
+
taker: z.ZodBoolean;
|
|
2829
|
+
fee: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2830
|
+
builder_fee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
|
|
2831
|
+
total_fee: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>>;
|
|
2832
|
+
builder: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2833
|
+
address: z.ZodPipe<z.ZodString, z.ZodTransform<_kuest_types.EvmAddress, string>>;
|
|
2834
|
+
fee_rate: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2835
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2836
|
+
address: _kuest_types.EvmAddress;
|
|
2837
|
+
feeRate: DecimalString;
|
|
2838
|
+
}, {
|
|
2839
|
+
address: _kuest_types.EvmAddress;
|
|
2840
|
+
fee_rate: DecimalString;
|
|
2841
|
+
}>>>;
|
|
2842
|
+
fea: z.ZodString;
|
|
2843
|
+
psz: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2844
|
+
pep: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2845
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
2846
|
+
liq: z.ZodBoolean;
|
|
2847
|
+
adl: z.ZodBoolean;
|
|
2848
|
+
liquidation_details: z.ZodOptional<z.ZodPipe<z.ZodObject<{
|
|
2849
|
+
liquidated_user: z.ZodOptional<z.ZodString>;
|
|
2850
|
+
mark: z.ZodPipe<z.ZodString, z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
2851
|
+
method: z.ZodEnum<typeof PerpsLiquidationMethod>;
|
|
2852
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2853
|
+
mark: DecimalString;
|
|
2854
|
+
method: PerpsLiquidationMethod;
|
|
2855
|
+
liquidatedUser?: string | undefined;
|
|
2856
|
+
}, {
|
|
2857
|
+
mark: DecimalString;
|
|
2858
|
+
method: PerpsLiquidationMethod;
|
|
2859
|
+
liquidated_user?: string | undefined;
|
|
2860
|
+
}>>>;
|
|
2861
|
+
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
2862
|
+
coid: z.ZodOptional<z.ZodString>;
|
|
2863
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
2864
|
+
feeAsset: string;
|
|
2865
|
+
previousSize: DecimalString;
|
|
2866
|
+
previousEntryPrice: DecimalString;
|
|
2867
|
+
pnl: DecimalString;
|
|
2868
|
+
liquidation: boolean;
|
|
2869
|
+
/** Whether this fill came from auto-deleveraging. */
|
|
2870
|
+
adl: boolean;
|
|
2871
|
+
/** Present for backstop liquidations; ordinary order-book liquidations omit it. */
|
|
2872
|
+
liquidationDetails: {
|
|
2873
|
+
mark: DecimalString;
|
|
2874
|
+
method: PerpsLiquidationMethod;
|
|
2875
|
+
liquidatedUser?: string | undefined;
|
|
2876
|
+
} | undefined;
|
|
2877
|
+
timestamp: EpochMilliseconds;
|
|
2878
|
+
clientOrderId: string | undefined;
|
|
2879
|
+
builder?: {
|
|
2880
|
+
address: _kuest_types.EvmAddress;
|
|
2881
|
+
feeRate: DecimalString;
|
|
2882
|
+
} | undefined;
|
|
2883
|
+
tradeId: PerpsTradeId;
|
|
2884
|
+
orderId: PerpsOrderId;
|
|
2885
|
+
instrumentId: PerpsInstrumentId;
|
|
2886
|
+
side: PerpsSide;
|
|
2887
|
+
/** True for a position close at instrument settlement; false on older responses. */
|
|
2888
|
+
settlement: boolean;
|
|
2889
|
+
price: DecimalString;
|
|
2890
|
+
quantity: DecimalString;
|
|
2891
|
+
taker: boolean;
|
|
2892
|
+
/** Exchange fee for this fill, excluding any builder fee. */
|
|
2893
|
+
fee: DecimalString;
|
|
2894
|
+
/** Builder fee charged in addition to `fee`; zero without one. */
|
|
2895
|
+
builderFee: DecimalString;
|
|
2896
|
+
/** Sum of `fee` and `builderFee`. */
|
|
2897
|
+
totalFee: DecimalString;
|
|
2898
|
+
}, {
|
|
2899
|
+
tid: PerpsTradeId;
|
|
2900
|
+
oid: PerpsOrderId;
|
|
2901
|
+
iid: PerpsInstrumentId;
|
|
2902
|
+
side: PerpsSide;
|
|
2903
|
+
settlement: boolean;
|
|
2904
|
+
p: DecimalString;
|
|
2905
|
+
qty: DecimalString;
|
|
2906
|
+
taker: boolean;
|
|
2907
|
+
fee: DecimalString;
|
|
2908
|
+
fea: string;
|
|
2909
|
+
psz: DecimalString;
|
|
2910
|
+
pep: DecimalString;
|
|
2911
|
+
pnl: DecimalString;
|
|
2912
|
+
liq: boolean;
|
|
2913
|
+
adl: boolean;
|
|
2914
|
+
ts: EpochMilliseconds;
|
|
2915
|
+
builder_fee?: DecimalString | undefined;
|
|
2916
|
+
total_fee?: DecimalString | undefined;
|
|
2917
|
+
builder?: {
|
|
2918
|
+
address: _kuest_types.EvmAddress;
|
|
2919
|
+
feeRate: DecimalString;
|
|
2920
|
+
} | undefined;
|
|
2921
|
+
liquidation_details?: {
|
|
2922
|
+
mark: DecimalString;
|
|
2923
|
+
method: PerpsLiquidationMethod;
|
|
2924
|
+
liquidatedUser?: string | undefined;
|
|
2925
|
+
} | undefined;
|
|
2926
|
+
coid?: string | undefined;
|
|
2927
|
+
}>>;
|
|
2928
|
+
|
|
2929
|
+
export { PerpsChaseAcceptedSchema as $, type PerpsBuilderEarning as A, type PerpsBuilderEarningId as B, CreatePerpsChaseResponseSchema as C, PerpsBuilderEarningIdSchema as D, PerpsBuilderEarningSchema as E, FetchPerpsBuilderApprovalsResponseSchema as F, type PerpsBuilderEarningsAsset as G, PerpsBuilderEarningsAssetSchema as H, type PerpsBuilderEarningsSnapshot as I, PerpsBuilderEarningsSnapshotSchema as J, type PerpsBuilderEarningsSummary as K, ListPerpsBuilderEarningsResponseSchema as L, MarkPerpsNotificationsReadResponseSchema as M, PerpsBuilderEarningsSummarySchema as N, type PerpsBuilderStatus as O, type PerpsInstrumentId as P, PerpsBuilderStatusSchema as Q, type PerpsBuilderTerms as R, PerpsBuilderTermsSchema as S, type PerpsCancelAllOrdersResponse as T, PerpsCancelAllOrdersResponseSchema as U, type PerpsCancelOrderErrorCode as V, PerpsCancelOrderErrorCodeSchema as W, type PerpsCancelOrderResult as X, PerpsCancelOrderResultSchema as Y, type PerpsChase as Z, type PerpsChaseAccepted as _, type PerpsEntityId as a, PerpsPositionLiquidatedNotificationSchema as a$, type PerpsChaseId as a0, PerpsChaseIdSchema as a1, PerpsChaseSchema as a2, PerpsClientOrderIdSchema as a3, type PerpsCommandAck as a4, PerpsCommandAckSchema as a5, PerpsCommandStatusSchema as a6, type PerpsCredentials as a7, PerpsDataResponseSchema as a8, type PerpsDecimal as a9, PerpsMarginType as aA, PerpsMarginTypeSchema as aB, type PerpsNotification as aC, type PerpsNotificationEntry as aD, PerpsNotificationEntrySchema as aE, type PerpsNotificationId as aF, PerpsNotificationIdSchema as aG, PerpsNotificationOrderType as aH, PerpsNotificationOrderTypeSchema as aI, PerpsNotificationSchema as aJ, PerpsNotificationType as aK, PerpsNotificationTypeSchema as aL, type PerpsOrder as aM, PerpsOrderIdSchema as aN, PerpsOrderSchema as aO, PerpsOrderStatus as aP, PerpsOrderStatusSchema as aQ, PerpsOrderUpdateSchema as aR, PerpsPnlInterval as aS, PerpsPnlIntervalSchema as aT, type PerpsPositionChangeNotification as aU, PerpsPositionChangeNotificationSchema as aV, type PerpsPositionClosedNotification as aW, PerpsPositionClosedNotificationSchema as aX, type PerpsPositionDeleveragedNotification as aY, PerpsPositionDeleveragedNotificationSchema as aZ, type PerpsPositionLiquidatedNotification as a_, type PerpsDecimalInput as aa, PerpsDecimalInputSchema as ab, type PerpsDepositAmount as ac, PerpsDepositStatusSchema as ad, PerpsEntityIdSchema as ae, type PerpsFundingInterval as af, PerpsFundingIntervalSchema as ag, PerpsFundingPaymentIdSchema as ah, PerpsInstrumentCategorySchema as ai, PerpsInstrumentIdSchema as aj, PerpsInstrumentTypeSchema as ak, PerpsInternalTransferDirectionSchema as al, PerpsInternalTransferIdSchema as am, type PerpsInternalTransferType as an, PerpsInternalTransferTypeSchema as ao, PerpsKlineInterval as ap, PerpsKlineIntervalSchema as aq, PerpsKnownCancelOrderErrorCode as ar, type PerpsLimitOrderCanceledNotification as as, PerpsLimitOrderCanceledNotificationSchema as at, type PerpsLiquidationDetails as au, PerpsLiquidationDetailsSchema as av, PerpsLiquidationMethod as aw, type PerpsLiquidationWarningNotification as ax, PerpsLiquidationWarningNotificationSchema as ay, PerpsLiquidityRole as az, type PerpsFundingPaymentId as b, type PerpsPostOrderAck as b0, PerpsPostOrderAckSchema as b1, PerpsSideSchema as b2, PerpsSortDirection as b3, PerpsSortDirectionSchema as b4, PerpsTimeInForce as b5, PerpsTimeInForceSchema as b6, PerpsTpSlKind as b7, PerpsTpSlKindSchema as b8, type PerpsTpSlOrderFields as b9, PerpsTpSlOrderFieldsSchema as ba, PerpsTpSlScope as bb, PerpsTpSlScopeSchema as bc, PerpsTradeIdSchema as bd, type PerpsTxHash as be, PerpsTxHashSchema as bf, type PerpsUpdateLeverageBatchResult as bg, PerpsUpdateLeverageBatchResultSchema as bh, type PerpsUpdateLeverageRejection as bi, PerpsUpdateLeverageRejectionSchema as bj, type PerpsUpdateLeverageResult as bk, PerpsUpdateLeverageResultSchema as bl, type PerpsWithdrawalAmount as bm, PerpsWithdrawalIdSchema as bn, type PerpsWithdrawalStatus as bo, PerpsWithdrawalStatusSchema as bp, decimalString as bq, perpsBaseUnits as br, perpsDecimal as bs, PerpsDepositStatus as c, type PerpsInternalTransferId as d, PerpsKnownInternalTransferType as e, PerpsInternalTransferDirection as f, type PerpsWithdrawalId as g, PerpsKnownWithdrawalStatus as h, PerpsInstrumentType as i, PerpsInstrumentCategory as j, type PerpsTradeId as k, PerpsSide as l, type PerpsClientOrderId as m, type PerpsOrderId as n, FetchPerpsChasesResponseSchema as o, FetchPerpsOpenOrdersResponseSchema as p, FetchPerpsOrdersResponseSchema as q, FetchPerpsUnreadNotificationsCountResponseSchema as r, ListPerpsFillsResponseSchema as s, ListPerpsNotificationsResponseSchema as t, type PerpsAccountFill as u, PerpsAccountFillSchema as v, PerpsAccountFillUpdateSchema as w, PerpsAssetSchema as x, type PerpsBuilderApproval as y, PerpsBuilderApprovalSchema as z };
|