@polymarket/bindings 0.1.0-beta.1 → 0.1.0-beta.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-GYP7YNXL.js +2 -0
- package/dist/chunk-GYP7YNXL.js.map +1 -0
- package/dist/chunk-HOD4LKZU.js +2 -0
- package/dist/chunk-HOD4LKZU.js.map +1 -0
- package/dist/chunk-IY6FKANL.js +2 -0
- package/dist/chunk-IY6FKANL.js.map +1 -0
- package/dist/chunk-VBHCYSM7.js +2 -0
- package/dist/chunk-VBHCYSM7.js.map +1 -0
- package/dist/clob/index.d.ts +110 -135
- package/dist/clob/index.js +1 -1
- package/dist/clob/index.js.map +1 -1
- package/dist/data/index.d.ts +849 -60
- package/dist/data/index.js +1 -1
- package/dist/data/index.js.map +1 -1
- package/dist/gamma/index.d.ts +215 -198
- package/dist/gamma/index.js +1 -1
- package/dist/gamma/index.js.map +1 -1
- package/dist/index.d.ts +39 -7
- package/dist/index.js +1 -1
- package/dist/orders-Uj0Gkvd4.d.ts +736 -0
- package/dist/perps/index.d.ts +1414 -0
- package/dist/perps/index.js +2 -0
- package/dist/perps/index.js.map +1 -0
- package/dist/relayer/index.js +1 -1
- package/dist/relayer/index.js.map +1 -1
- package/dist/rfq.d.ts +701 -0
- package/dist/rfq.js +2 -0
- package/dist/rfq.js.map +1 -0
- package/dist/signature-type-CrLAA9AN.d.ts +23 -0
- package/dist/subscriptions/index.d.ts +2040 -12
- package/dist/subscriptions/index.js +1 -1
- package/dist/subscriptions/index.js.map +1 -1
- package/package.json +25 -3
- package/dist/chunk-6WCDEPBE.js +0 -2
- package/dist/chunk-6WCDEPBE.js.map +0 -1
- package/dist/chunk-TM2ZY32Q.js +0 -2
- package/dist/chunk-TM2ZY32Q.js.map +0 -1
|
@@ -0,0 +1,736 @@
|
|
|
1
|
+
import * as _polymarket_types from '@polymarket/types';
|
|
2
|
+
import { EvmAddress, PrivateKey, TxHash } from '@polymarket/types';
|
|
3
|
+
import { DecimalString, BaseUnits, EpochMilliseconds, OrderSide } from './index.js';
|
|
4
|
+
import { z } from 'zod';
|
|
5
|
+
|
|
6
|
+
type Tagged<T, Tag extends string> = T & {
|
|
7
|
+
readonly __tag: Tag;
|
|
8
|
+
};
|
|
9
|
+
type PerpsInstrumentId = Tagged<number, 'PerpsInstrumentId'>;
|
|
10
|
+
type PerpsOrderId = Tagged<number, 'PerpsOrderId'>;
|
|
11
|
+
type PerpsClientOrderId = Tagged<string, 'PerpsClientOrderId'>;
|
|
12
|
+
type PerpsTradeId = Tagged<number, 'PerpsTradeId'>;
|
|
13
|
+
type PerpsWithdrawalId = Tagged<number, 'PerpsWithdrawalId'>;
|
|
14
|
+
type PerpsInternalTransferId = Tagged<number, 'PerpsInternalTransferId'>;
|
|
15
|
+
type PerpsEntityId = Tagged<number, 'PerpsEntityId'>;
|
|
16
|
+
type PerpsFundingInterval = `${number}h`;
|
|
17
|
+
declare const PerpsInstrumentIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
18
|
+
declare const PerpsOrderIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
19
|
+
declare const PerpsClientOrderIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>;
|
|
20
|
+
declare const PerpsTradeIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
21
|
+
declare const PerpsWithdrawalIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsWithdrawalId, number>>;
|
|
22
|
+
declare const PerpsInternalTransferIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInternalTransferId, number>>;
|
|
23
|
+
declare const PerpsEntityIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsEntityId, number>>;
|
|
24
|
+
declare const PerpsFundingIntervalSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`${number}h`, string>>;
|
|
25
|
+
declare const PerpsDecimalInputSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
26
|
+
type PerpsDecimalInput = z.input<typeof PerpsDecimalInputSchema>;
|
|
27
|
+
declare enum PerpsInstrumentType {
|
|
28
|
+
Perpetual = "perpetual"
|
|
29
|
+
}
|
|
30
|
+
declare enum PerpsInstrumentCategory {
|
|
31
|
+
Equity = "equity",
|
|
32
|
+
Commodity = "commodity",
|
|
33
|
+
Index = "index",
|
|
34
|
+
Crypto = "crypto"
|
|
35
|
+
}
|
|
36
|
+
declare enum PerpsSide {
|
|
37
|
+
Long = "long",
|
|
38
|
+
Short = "short"
|
|
39
|
+
}
|
|
40
|
+
declare enum PerpsTimeInForce {
|
|
41
|
+
GTC = "gtc",
|
|
42
|
+
IOC = "ioc",
|
|
43
|
+
FOK = "fok"
|
|
44
|
+
}
|
|
45
|
+
declare enum PerpsTpSlKind {
|
|
46
|
+
TakeProfit = "tp",
|
|
47
|
+
StopLoss = "sl"
|
|
48
|
+
}
|
|
49
|
+
declare enum PerpsTpSlScope {
|
|
50
|
+
Order = "order",
|
|
51
|
+
Position = "position"
|
|
52
|
+
}
|
|
53
|
+
declare enum PerpsDepositStatus {
|
|
54
|
+
Pending = "pending",
|
|
55
|
+
Confirmed = "confirmed",
|
|
56
|
+
Removed = "removed"
|
|
57
|
+
}
|
|
58
|
+
declare enum PerpsWithdrawalStatus {
|
|
59
|
+
Pending = "pending",
|
|
60
|
+
Confirmed = "confirmed",
|
|
61
|
+
Removed = "removed"
|
|
62
|
+
}
|
|
63
|
+
declare enum PerpsInternalTransferDirection {
|
|
64
|
+
In = "in",
|
|
65
|
+
Out = "out"
|
|
66
|
+
}
|
|
67
|
+
declare enum PerpsKlineInterval {
|
|
68
|
+
OneSecond = "1s",
|
|
69
|
+
OneMinute = "1m",
|
|
70
|
+
FiveMinutes = "5m",
|
|
71
|
+
FifteenMinutes = "15m",
|
|
72
|
+
OneHour = "1h",
|
|
73
|
+
FourHours = "4h",
|
|
74
|
+
OneDay = "1d",
|
|
75
|
+
OneWeek = "1w"
|
|
76
|
+
}
|
|
77
|
+
declare enum PerpsPnlInterval {
|
|
78
|
+
OneHour = "1h",
|
|
79
|
+
FourHours = "4h",
|
|
80
|
+
OneDay = "1d",
|
|
81
|
+
OneWeek = "1w"
|
|
82
|
+
}
|
|
83
|
+
declare const PerpsInstrumentTypeSchema: z.ZodEnum<typeof PerpsInstrumentType>;
|
|
84
|
+
declare const PerpsInstrumentCategorySchema: z.ZodEnum<typeof PerpsInstrumentCategory>;
|
|
85
|
+
declare const PerpsSideSchema: z.ZodEnum<typeof PerpsSide>;
|
|
86
|
+
declare const PerpsTimeInForceSchema: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
87
|
+
declare const PerpsTpSlKindSchema: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
88
|
+
declare const PerpsTpSlScopeSchema: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
89
|
+
declare const PerpsDepositStatusSchema: z.ZodEnum<typeof PerpsDepositStatus>;
|
|
90
|
+
declare const PerpsWithdrawalStatusSchema: z.ZodEnum<typeof PerpsWithdrawalStatus>;
|
|
91
|
+
declare const PerpsInternalTransferDirectionSchema: z.ZodEnum<typeof PerpsInternalTransferDirection>;
|
|
92
|
+
declare const PerpsKlineIntervalSchema: z.ZodEnum<typeof PerpsKlineInterval>;
|
|
93
|
+
declare const PerpsPnlIntervalSchema: z.ZodEnum<typeof PerpsPnlInterval>;
|
|
94
|
+
declare const PerpsAssetSchema: z.ZodString;
|
|
95
|
+
declare const PerpsTxHashSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<TxHash, string>>>>;
|
|
96
|
+
declare const PerpsDataResponseSchema: <T extends z.ZodType>(itemSchema: T) => z.ZodObject<{
|
|
97
|
+
data: z.ZodArray<T>;
|
|
98
|
+
more: z.ZodBoolean;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
type PerpsCredentials = {
|
|
101
|
+
proxy: EvmAddress;
|
|
102
|
+
privateKey: PrivateKey;
|
|
103
|
+
secret: string;
|
|
104
|
+
expiresAt: number;
|
|
105
|
+
};
|
|
106
|
+
type PerpsDepositAmount = BaseUnits;
|
|
107
|
+
type PerpsWithdrawalAmount = BaseUnits;
|
|
108
|
+
type PerpsTxHash = TxHash;
|
|
109
|
+
type PerpsDecimal = DecimalString;
|
|
110
|
+
declare function perpsDecimal(value: string | number): DecimalString;
|
|
111
|
+
declare function perpsBaseUnits(value: string): BaseUnits;
|
|
112
|
+
declare function decimalString(value: string): DecimalString;
|
|
113
|
+
|
|
114
|
+
declare enum PerpsOrderStatus {
|
|
115
|
+
Accepted = "accepted",
|
|
116
|
+
Open = "open",
|
|
117
|
+
Partial = "partial",
|
|
118
|
+
Filled = "filled",
|
|
119
|
+
Cancelled = "cancelled",
|
|
120
|
+
AutoCancelled = "auto_cancelled",
|
|
121
|
+
PostOnlyRejected = "post_only_rejected",
|
|
122
|
+
FokUnfilled = "fok_unfilled",
|
|
123
|
+
IocNoFill = "ioc_no_fill",
|
|
124
|
+
IocExpired = "ioc_expired",
|
|
125
|
+
StpCancelled = "stp_cancelled",
|
|
126
|
+
ZeroQuantity = "zero_quantity",
|
|
127
|
+
DuplicateOrder = "duplicate_order",
|
|
128
|
+
OrderNotFound = "order_not_found",
|
|
129
|
+
ReduceOnlyInvalid = "reduce_only_invalid",
|
|
130
|
+
ReduceOnlyExpired = "reduce_only_expired",
|
|
131
|
+
OrderExpired = "order_expired",
|
|
132
|
+
Untriggered = "untriggered",
|
|
133
|
+
Armed = "armed",
|
|
134
|
+
Triggered = "triggered",
|
|
135
|
+
ParentCancelled = "parent_cancelled",
|
|
136
|
+
PositionClosed = "position_closed",
|
|
137
|
+
PositionFlipped = "position_flipped",
|
|
138
|
+
ReduceOnlyInvalidAtTrigger = "reduce_only_invalid_at_trigger",
|
|
139
|
+
Expired = "expired"
|
|
140
|
+
}
|
|
141
|
+
declare const PerpsTpSlOrderFieldsSchema: z.ZodPipe<z.ZodObject<{
|
|
142
|
+
kind: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
143
|
+
scope: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
144
|
+
trp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
145
|
+
parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
146
|
+
armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
147
|
+
slip_bps: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
149
|
+
kind: PerpsTpSlKind;
|
|
150
|
+
scope: PerpsTpSlScope;
|
|
151
|
+
triggerPrice: DecimalString;
|
|
152
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
153
|
+
armedQuantity: DecimalString | undefined;
|
|
154
|
+
slippageBps: number | undefined;
|
|
155
|
+
}, {
|
|
156
|
+
kind: PerpsTpSlKind;
|
|
157
|
+
scope: PerpsTpSlScope;
|
|
158
|
+
trp: DecimalString;
|
|
159
|
+
parent_oid?: PerpsOrderId | undefined;
|
|
160
|
+
armed_qty?: DecimalString | undefined;
|
|
161
|
+
slip_bps?: number | undefined;
|
|
162
|
+
}>>;
|
|
163
|
+
type PerpsTpSlOrderFields = z.infer<typeof PerpsTpSlOrderFieldsSchema>;
|
|
164
|
+
declare const PerpsOrderStatusSchema: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
165
|
+
declare const PerpsCommandStatusSchema: z.ZodEnum<{
|
|
166
|
+
ok: "ok";
|
|
167
|
+
err: "err";
|
|
168
|
+
}>;
|
|
169
|
+
declare const PerpsCommandAckSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
170
|
+
status: z.ZodLiteral<"ok">;
|
|
171
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
172
|
+
status: z.ZodLiteral<"err">;
|
|
173
|
+
error: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string, string | undefined>>;
|
|
174
|
+
}, z.core.$strip>], "status">;
|
|
175
|
+
type PerpsCommandAck = z.infer<typeof PerpsCommandAckSchema>;
|
|
176
|
+
declare const PerpsPostOrderAckSchema: z.ZodPipe<z.ZodObject<{
|
|
177
|
+
status: z.ZodEnum<{
|
|
178
|
+
ok: "ok";
|
|
179
|
+
err: "err";
|
|
180
|
+
}>;
|
|
181
|
+
oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
182
|
+
coid: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
183
|
+
error: z.ZodOptional<z.ZodString>;
|
|
184
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
185
|
+
status: "err";
|
|
186
|
+
error: string;
|
|
187
|
+
clientOrderId: PerpsClientOrderId | undefined;
|
|
188
|
+
orderId?: undefined;
|
|
189
|
+
} | {
|
|
190
|
+
status: "ok";
|
|
191
|
+
orderId: PerpsOrderId;
|
|
192
|
+
clientOrderId: PerpsClientOrderId | undefined;
|
|
193
|
+
error?: undefined;
|
|
194
|
+
}, {
|
|
195
|
+
status: "ok" | "err";
|
|
196
|
+
oid?: PerpsOrderId | undefined;
|
|
197
|
+
coid?: PerpsClientOrderId | undefined;
|
|
198
|
+
error?: string | undefined;
|
|
199
|
+
}>>;
|
|
200
|
+
type PerpsPostOrderAck = z.infer<typeof PerpsPostOrderAckSchema>;
|
|
201
|
+
declare const PerpsCancelOrderResultSchema: z.ZodPipe<z.ZodObject<{
|
|
202
|
+
status: z.ZodEnum<{
|
|
203
|
+
ok: "ok";
|
|
204
|
+
err: "err";
|
|
205
|
+
}>;
|
|
206
|
+
oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
207
|
+
coid: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
208
|
+
error: z.ZodOptional<z.ZodString>;
|
|
209
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
210
|
+
status: "err";
|
|
211
|
+
error: string;
|
|
212
|
+
orderId: PerpsOrderId | undefined;
|
|
213
|
+
clientOrderId: PerpsClientOrderId | undefined;
|
|
214
|
+
} | {
|
|
215
|
+
status: "ok";
|
|
216
|
+
orderId: PerpsOrderId | undefined;
|
|
217
|
+
clientOrderId: PerpsClientOrderId | undefined;
|
|
218
|
+
error?: undefined;
|
|
219
|
+
}, {
|
|
220
|
+
status: "ok" | "err";
|
|
221
|
+
oid?: PerpsOrderId | undefined;
|
|
222
|
+
coid?: PerpsClientOrderId | undefined;
|
|
223
|
+
error?: string | undefined;
|
|
224
|
+
}>>;
|
|
225
|
+
type PerpsCancelOrderResult = z.infer<typeof PerpsCancelOrderResultSchema>;
|
|
226
|
+
declare const PerpsCancelAllOrdersResponseSchema: z.ZodObject<{
|
|
227
|
+
status: z.ZodLiteral<"ok">;
|
|
228
|
+
}, z.core.$strip>;
|
|
229
|
+
type PerpsCancelAllOrdersResponse = z.infer<typeof PerpsCancelAllOrdersResponseSchema>;
|
|
230
|
+
declare const PerpsUpdateLeverageResultSchema: z.ZodPipe<z.ZodObject<{
|
|
231
|
+
status: z.ZodLiteral<"ok">;
|
|
232
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
233
|
+
leverage: z.ZodNumber;
|
|
234
|
+
cross: z.ZodBoolean;
|
|
235
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
236
|
+
status: "ok";
|
|
237
|
+
instrumentId: PerpsInstrumentId;
|
|
238
|
+
leverage: number;
|
|
239
|
+
crossMargin: boolean;
|
|
240
|
+
}, {
|
|
241
|
+
status: "ok";
|
|
242
|
+
instrument_id: PerpsInstrumentId;
|
|
243
|
+
leverage: number;
|
|
244
|
+
cross: boolean;
|
|
245
|
+
}>>;
|
|
246
|
+
type PerpsUpdateLeverageResult = z.infer<typeof PerpsUpdateLeverageResultSchema>;
|
|
247
|
+
declare const PerpsOrderSchema: z.ZodPipe<z.ZodObject<{
|
|
248
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
249
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
250
|
+
buy: z.ZodBoolean;
|
|
251
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
252
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
253
|
+
tif: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
254
|
+
post_only: z.ZodBoolean;
|
|
255
|
+
ro: z.ZodBoolean;
|
|
256
|
+
status: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
257
|
+
resting_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
258
|
+
filled_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
259
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
260
|
+
updated_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
261
|
+
client_order_id: z.ZodOptional<z.ZodString>;
|
|
262
|
+
tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
|
|
263
|
+
kind: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
264
|
+
scope: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
265
|
+
trp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
266
|
+
parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
267
|
+
armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
268
|
+
slip_bps: z.ZodOptional<z.ZodNumber>;
|
|
269
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
270
|
+
kind: PerpsTpSlKind;
|
|
271
|
+
scope: PerpsTpSlScope;
|
|
272
|
+
triggerPrice: DecimalString;
|
|
273
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
274
|
+
armedQuantity: DecimalString | undefined;
|
|
275
|
+
slippageBps: number | undefined;
|
|
276
|
+
}, {
|
|
277
|
+
kind: PerpsTpSlKind;
|
|
278
|
+
scope: PerpsTpSlScope;
|
|
279
|
+
trp: DecimalString;
|
|
280
|
+
parent_oid?: PerpsOrderId | undefined;
|
|
281
|
+
armed_qty?: DecimalString | undefined;
|
|
282
|
+
slip_bps?: number | undefined;
|
|
283
|
+
}>>>>;
|
|
284
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
285
|
+
id: PerpsOrderId;
|
|
286
|
+
instrumentId: PerpsInstrumentId;
|
|
287
|
+
side: OrderSide;
|
|
288
|
+
price: DecimalString;
|
|
289
|
+
quantity: DecimalString;
|
|
290
|
+
timeInForce: PerpsTimeInForce;
|
|
291
|
+
postOnly: boolean;
|
|
292
|
+
reduceOnly: boolean;
|
|
293
|
+
status: PerpsOrderStatus;
|
|
294
|
+
restingQuantity: DecimalString;
|
|
295
|
+
filledQuantity: DecimalString;
|
|
296
|
+
createdTimestamp: EpochMilliseconds;
|
|
297
|
+
updatedTimestamp: EpochMilliseconds;
|
|
298
|
+
clientOrderId: string | undefined;
|
|
299
|
+
tpSl: {
|
|
300
|
+
kind: PerpsTpSlKind;
|
|
301
|
+
scope: PerpsTpSlScope;
|
|
302
|
+
triggerPrice: DecimalString;
|
|
303
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
304
|
+
armedQuantity: DecimalString | undefined;
|
|
305
|
+
slippageBps: number | undefined;
|
|
306
|
+
} | undefined;
|
|
307
|
+
}, {
|
|
308
|
+
order_id: PerpsOrderId;
|
|
309
|
+
instrument_id: PerpsInstrumentId;
|
|
310
|
+
buy: boolean;
|
|
311
|
+
price: DecimalString;
|
|
312
|
+
quantity: DecimalString;
|
|
313
|
+
tif: PerpsTimeInForce;
|
|
314
|
+
post_only: boolean;
|
|
315
|
+
ro: boolean;
|
|
316
|
+
status: PerpsOrderStatus;
|
|
317
|
+
resting_quantity: DecimalString;
|
|
318
|
+
filled_quantity: DecimalString;
|
|
319
|
+
created_timestamp: EpochMilliseconds;
|
|
320
|
+
updated_timestamp: EpochMilliseconds;
|
|
321
|
+
client_order_id?: string | undefined;
|
|
322
|
+
tpsl?: {
|
|
323
|
+
kind: PerpsTpSlKind;
|
|
324
|
+
scope: PerpsTpSlScope;
|
|
325
|
+
triggerPrice: DecimalString;
|
|
326
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
327
|
+
armedQuantity: DecimalString | undefined;
|
|
328
|
+
slippageBps: number | undefined;
|
|
329
|
+
} | null | undefined;
|
|
330
|
+
}>>;
|
|
331
|
+
type PerpsOrder = z.infer<typeof PerpsOrderSchema>;
|
|
332
|
+
declare const FetchPerpsOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
333
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
334
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
335
|
+
buy: z.ZodBoolean;
|
|
336
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
337
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
338
|
+
tif: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
339
|
+
post_only: z.ZodBoolean;
|
|
340
|
+
ro: z.ZodBoolean;
|
|
341
|
+
status: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
342
|
+
resting_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
343
|
+
filled_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
344
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
345
|
+
updated_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
346
|
+
client_order_id: z.ZodOptional<z.ZodString>;
|
|
347
|
+
tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
|
|
348
|
+
kind: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
349
|
+
scope: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
350
|
+
trp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
351
|
+
parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
352
|
+
armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
353
|
+
slip_bps: z.ZodOptional<z.ZodNumber>;
|
|
354
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
355
|
+
kind: PerpsTpSlKind;
|
|
356
|
+
scope: PerpsTpSlScope;
|
|
357
|
+
triggerPrice: DecimalString;
|
|
358
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
359
|
+
armedQuantity: DecimalString | undefined;
|
|
360
|
+
slippageBps: number | undefined;
|
|
361
|
+
}, {
|
|
362
|
+
kind: PerpsTpSlKind;
|
|
363
|
+
scope: PerpsTpSlScope;
|
|
364
|
+
trp: DecimalString;
|
|
365
|
+
parent_oid?: PerpsOrderId | undefined;
|
|
366
|
+
armed_qty?: DecimalString | undefined;
|
|
367
|
+
slip_bps?: number | undefined;
|
|
368
|
+
}>>>>;
|
|
369
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
370
|
+
id: PerpsOrderId;
|
|
371
|
+
instrumentId: PerpsInstrumentId;
|
|
372
|
+
side: OrderSide;
|
|
373
|
+
price: DecimalString;
|
|
374
|
+
quantity: DecimalString;
|
|
375
|
+
timeInForce: PerpsTimeInForce;
|
|
376
|
+
postOnly: boolean;
|
|
377
|
+
reduceOnly: boolean;
|
|
378
|
+
status: PerpsOrderStatus;
|
|
379
|
+
restingQuantity: DecimalString;
|
|
380
|
+
filledQuantity: DecimalString;
|
|
381
|
+
createdTimestamp: EpochMilliseconds;
|
|
382
|
+
updatedTimestamp: EpochMilliseconds;
|
|
383
|
+
clientOrderId: string | undefined;
|
|
384
|
+
tpSl: {
|
|
385
|
+
kind: PerpsTpSlKind;
|
|
386
|
+
scope: PerpsTpSlScope;
|
|
387
|
+
triggerPrice: DecimalString;
|
|
388
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
389
|
+
armedQuantity: DecimalString | undefined;
|
|
390
|
+
slippageBps: number | undefined;
|
|
391
|
+
} | undefined;
|
|
392
|
+
}, {
|
|
393
|
+
order_id: PerpsOrderId;
|
|
394
|
+
instrument_id: PerpsInstrumentId;
|
|
395
|
+
buy: boolean;
|
|
396
|
+
price: DecimalString;
|
|
397
|
+
quantity: DecimalString;
|
|
398
|
+
tif: PerpsTimeInForce;
|
|
399
|
+
post_only: boolean;
|
|
400
|
+
ro: boolean;
|
|
401
|
+
status: PerpsOrderStatus;
|
|
402
|
+
resting_quantity: DecimalString;
|
|
403
|
+
filled_quantity: DecimalString;
|
|
404
|
+
created_timestamp: EpochMilliseconds;
|
|
405
|
+
updated_timestamp: EpochMilliseconds;
|
|
406
|
+
client_order_id?: string | undefined;
|
|
407
|
+
tpsl?: {
|
|
408
|
+
kind: PerpsTpSlKind;
|
|
409
|
+
scope: PerpsTpSlScope;
|
|
410
|
+
triggerPrice: DecimalString;
|
|
411
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
412
|
+
armedQuantity: DecimalString | undefined;
|
|
413
|
+
slippageBps: number | undefined;
|
|
414
|
+
} | null | undefined;
|
|
415
|
+
}>>>;
|
|
416
|
+
declare const FetchPerpsOpenOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
417
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
418
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
419
|
+
buy: z.ZodBoolean;
|
|
420
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
421
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
422
|
+
tif: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
423
|
+
post_only: z.ZodBoolean;
|
|
424
|
+
ro: z.ZodBoolean;
|
|
425
|
+
status: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
426
|
+
resting_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
427
|
+
filled_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
428
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
429
|
+
updated_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
430
|
+
client_order_id: z.ZodOptional<z.ZodString>;
|
|
431
|
+
tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
|
|
432
|
+
kind: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
433
|
+
scope: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
434
|
+
trp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
435
|
+
parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
436
|
+
armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
437
|
+
slip_bps: z.ZodOptional<z.ZodNumber>;
|
|
438
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
439
|
+
kind: PerpsTpSlKind;
|
|
440
|
+
scope: PerpsTpSlScope;
|
|
441
|
+
triggerPrice: DecimalString;
|
|
442
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
443
|
+
armedQuantity: DecimalString | undefined;
|
|
444
|
+
slippageBps: number | undefined;
|
|
445
|
+
}, {
|
|
446
|
+
kind: PerpsTpSlKind;
|
|
447
|
+
scope: PerpsTpSlScope;
|
|
448
|
+
trp: DecimalString;
|
|
449
|
+
parent_oid?: PerpsOrderId | undefined;
|
|
450
|
+
armed_qty?: DecimalString | undefined;
|
|
451
|
+
slip_bps?: number | undefined;
|
|
452
|
+
}>>>>;
|
|
453
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
454
|
+
id: PerpsOrderId;
|
|
455
|
+
instrumentId: PerpsInstrumentId;
|
|
456
|
+
side: OrderSide;
|
|
457
|
+
price: DecimalString;
|
|
458
|
+
quantity: DecimalString;
|
|
459
|
+
timeInForce: PerpsTimeInForce;
|
|
460
|
+
postOnly: boolean;
|
|
461
|
+
reduceOnly: boolean;
|
|
462
|
+
status: PerpsOrderStatus;
|
|
463
|
+
restingQuantity: DecimalString;
|
|
464
|
+
filledQuantity: DecimalString;
|
|
465
|
+
createdTimestamp: EpochMilliseconds;
|
|
466
|
+
updatedTimestamp: EpochMilliseconds;
|
|
467
|
+
clientOrderId: string | undefined;
|
|
468
|
+
tpSl: {
|
|
469
|
+
kind: PerpsTpSlKind;
|
|
470
|
+
scope: PerpsTpSlScope;
|
|
471
|
+
triggerPrice: DecimalString;
|
|
472
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
473
|
+
armedQuantity: DecimalString | undefined;
|
|
474
|
+
slippageBps: number | undefined;
|
|
475
|
+
} | undefined;
|
|
476
|
+
}, {
|
|
477
|
+
order_id: PerpsOrderId;
|
|
478
|
+
instrument_id: PerpsInstrumentId;
|
|
479
|
+
buy: boolean;
|
|
480
|
+
price: DecimalString;
|
|
481
|
+
quantity: DecimalString;
|
|
482
|
+
tif: PerpsTimeInForce;
|
|
483
|
+
post_only: boolean;
|
|
484
|
+
ro: boolean;
|
|
485
|
+
status: PerpsOrderStatus;
|
|
486
|
+
resting_quantity: DecimalString;
|
|
487
|
+
filled_quantity: DecimalString;
|
|
488
|
+
created_timestamp: EpochMilliseconds;
|
|
489
|
+
updated_timestamp: EpochMilliseconds;
|
|
490
|
+
client_order_id?: string | undefined;
|
|
491
|
+
tpsl?: {
|
|
492
|
+
kind: PerpsTpSlKind;
|
|
493
|
+
scope: PerpsTpSlScope;
|
|
494
|
+
triggerPrice: DecimalString;
|
|
495
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
496
|
+
armedQuantity: DecimalString | undefined;
|
|
497
|
+
slippageBps: number | undefined;
|
|
498
|
+
} | null | undefined;
|
|
499
|
+
}>>>;
|
|
500
|
+
declare const PerpsOrderUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
501
|
+
oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
502
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
503
|
+
buy: z.ZodBoolean;
|
|
504
|
+
p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
505
|
+
qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
506
|
+
tif: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
507
|
+
po: z.ZodBoolean;
|
|
508
|
+
ro: z.ZodBoolean;
|
|
509
|
+
status: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
510
|
+
rest: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
511
|
+
fill: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
512
|
+
cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
513
|
+
uts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
514
|
+
coid: z.ZodOptional<z.ZodString>;
|
|
515
|
+
tpsl: z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodObject<{
|
|
516
|
+
kind: z.ZodEnum<typeof PerpsTpSlKind>;
|
|
517
|
+
scope: z.ZodEnum<typeof PerpsTpSlScope>;
|
|
518
|
+
trp: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
519
|
+
parent_oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
520
|
+
armed_qty: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>>;
|
|
521
|
+
slip_bps: z.ZodOptional<z.ZodNumber>;
|
|
522
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
523
|
+
kind: PerpsTpSlKind;
|
|
524
|
+
scope: PerpsTpSlScope;
|
|
525
|
+
triggerPrice: DecimalString;
|
|
526
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
527
|
+
armedQuantity: DecimalString | undefined;
|
|
528
|
+
slippageBps: number | undefined;
|
|
529
|
+
}, {
|
|
530
|
+
kind: PerpsTpSlKind;
|
|
531
|
+
scope: PerpsTpSlScope;
|
|
532
|
+
trp: DecimalString;
|
|
533
|
+
parent_oid?: PerpsOrderId | undefined;
|
|
534
|
+
armed_qty?: DecimalString | undefined;
|
|
535
|
+
slip_bps?: number | undefined;
|
|
536
|
+
}>>>>;
|
|
537
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
538
|
+
id: PerpsOrderId;
|
|
539
|
+
instrumentId: PerpsInstrumentId;
|
|
540
|
+
side: OrderSide;
|
|
541
|
+
price: DecimalString;
|
|
542
|
+
quantity: DecimalString;
|
|
543
|
+
timeInForce: PerpsTimeInForce;
|
|
544
|
+
postOnly: boolean;
|
|
545
|
+
reduceOnly: boolean;
|
|
546
|
+
status: PerpsOrderStatus;
|
|
547
|
+
restingQuantity: DecimalString;
|
|
548
|
+
filledQuantity: DecimalString;
|
|
549
|
+
createdTimestamp: EpochMilliseconds;
|
|
550
|
+
updatedTimestamp: EpochMilliseconds;
|
|
551
|
+
clientOrderId: string | undefined;
|
|
552
|
+
tpSl: {
|
|
553
|
+
kind: PerpsTpSlKind;
|
|
554
|
+
scope: PerpsTpSlScope;
|
|
555
|
+
triggerPrice: DecimalString;
|
|
556
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
557
|
+
armedQuantity: DecimalString | undefined;
|
|
558
|
+
slippageBps: number | undefined;
|
|
559
|
+
} | undefined;
|
|
560
|
+
}, {
|
|
561
|
+
oid: PerpsOrderId;
|
|
562
|
+
iid: PerpsInstrumentId;
|
|
563
|
+
buy: boolean;
|
|
564
|
+
p: DecimalString;
|
|
565
|
+
qty: DecimalString;
|
|
566
|
+
tif: PerpsTimeInForce;
|
|
567
|
+
po: boolean;
|
|
568
|
+
ro: boolean;
|
|
569
|
+
status: PerpsOrderStatus;
|
|
570
|
+
rest: DecimalString;
|
|
571
|
+
fill: DecimalString;
|
|
572
|
+
cts: EpochMilliseconds;
|
|
573
|
+
uts: EpochMilliseconds;
|
|
574
|
+
coid?: string | undefined;
|
|
575
|
+
tpsl?: {
|
|
576
|
+
kind: PerpsTpSlKind;
|
|
577
|
+
scope: PerpsTpSlScope;
|
|
578
|
+
triggerPrice: DecimalString;
|
|
579
|
+
parentOrderId: PerpsOrderId | undefined;
|
|
580
|
+
armedQuantity: DecimalString | undefined;
|
|
581
|
+
slippageBps: number | undefined;
|
|
582
|
+
} | null | undefined;
|
|
583
|
+
}>>;
|
|
584
|
+
declare const PerpsAccountFillSchema: z.ZodPipe<z.ZodObject<{
|
|
585
|
+
trade_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
586
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
587
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
588
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
589
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
590
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
591
|
+
taker: z.ZodBoolean;
|
|
592
|
+
fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
593
|
+
fee_asset: z.ZodString;
|
|
594
|
+
previous_size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
595
|
+
previous_entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
596
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
597
|
+
liquidation: z.ZodBoolean;
|
|
598
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
599
|
+
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
|
|
600
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
601
|
+
tradeId: PerpsTradeId;
|
|
602
|
+
orderId: PerpsOrderId;
|
|
603
|
+
instrumentId: PerpsInstrumentId;
|
|
604
|
+
side: PerpsSide;
|
|
605
|
+
price: DecimalString;
|
|
606
|
+
quantity: DecimalString;
|
|
607
|
+
taker: boolean;
|
|
608
|
+
fee: DecimalString;
|
|
609
|
+
feeAsset: string;
|
|
610
|
+
previousSize: DecimalString;
|
|
611
|
+
previousEntryPrice: DecimalString;
|
|
612
|
+
pnl: DecimalString;
|
|
613
|
+
liquidation: boolean;
|
|
614
|
+
timestamp: EpochMilliseconds;
|
|
615
|
+
hash: _polymarket_types.TxHash | undefined;
|
|
616
|
+
}, {
|
|
617
|
+
trade_id: PerpsTradeId;
|
|
618
|
+
order_id: PerpsOrderId;
|
|
619
|
+
instrument_id: PerpsInstrumentId;
|
|
620
|
+
side: PerpsSide;
|
|
621
|
+
price: DecimalString;
|
|
622
|
+
quantity: DecimalString;
|
|
623
|
+
taker: boolean;
|
|
624
|
+
fee: DecimalString;
|
|
625
|
+
fee_asset: string;
|
|
626
|
+
previous_size: DecimalString;
|
|
627
|
+
previous_entry_price: DecimalString;
|
|
628
|
+
pnl: DecimalString;
|
|
629
|
+
liquidation: boolean;
|
|
630
|
+
timestamp: EpochMilliseconds;
|
|
631
|
+
hash?: _polymarket_types.TxHash | undefined;
|
|
632
|
+
}>>;
|
|
633
|
+
type PerpsAccountFill = z.infer<typeof PerpsAccountFillSchema>;
|
|
634
|
+
declare const ListPerpsFillsResponseSchema: z.ZodObject<{
|
|
635
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
636
|
+
trade_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
637
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
638
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
639
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
640
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
641
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
642
|
+
taker: z.ZodBoolean;
|
|
643
|
+
fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
644
|
+
fee_asset: z.ZodString;
|
|
645
|
+
previous_size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
646
|
+
previous_entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
647
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
648
|
+
liquidation: z.ZodBoolean;
|
|
649
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
650
|
+
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
|
|
651
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
652
|
+
tradeId: PerpsTradeId;
|
|
653
|
+
orderId: PerpsOrderId;
|
|
654
|
+
instrumentId: PerpsInstrumentId;
|
|
655
|
+
side: PerpsSide;
|
|
656
|
+
price: DecimalString;
|
|
657
|
+
quantity: DecimalString;
|
|
658
|
+
taker: boolean;
|
|
659
|
+
fee: DecimalString;
|
|
660
|
+
feeAsset: string;
|
|
661
|
+
previousSize: DecimalString;
|
|
662
|
+
previousEntryPrice: DecimalString;
|
|
663
|
+
pnl: DecimalString;
|
|
664
|
+
liquidation: boolean;
|
|
665
|
+
timestamp: EpochMilliseconds;
|
|
666
|
+
hash: _polymarket_types.TxHash | undefined;
|
|
667
|
+
}, {
|
|
668
|
+
trade_id: PerpsTradeId;
|
|
669
|
+
order_id: PerpsOrderId;
|
|
670
|
+
instrument_id: PerpsInstrumentId;
|
|
671
|
+
side: PerpsSide;
|
|
672
|
+
price: DecimalString;
|
|
673
|
+
quantity: DecimalString;
|
|
674
|
+
taker: boolean;
|
|
675
|
+
fee: DecimalString;
|
|
676
|
+
fee_asset: string;
|
|
677
|
+
previous_size: DecimalString;
|
|
678
|
+
previous_entry_price: DecimalString;
|
|
679
|
+
pnl: DecimalString;
|
|
680
|
+
liquidation: boolean;
|
|
681
|
+
timestamp: EpochMilliseconds;
|
|
682
|
+
hash?: _polymarket_types.TxHash | undefined;
|
|
683
|
+
}>>>;
|
|
684
|
+
more: z.ZodBoolean;
|
|
685
|
+
}, z.core.$strip>;
|
|
686
|
+
declare const PerpsAccountFillUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
687
|
+
tid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
688
|
+
oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
689
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
690
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
691
|
+
p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
692
|
+
qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
693
|
+
taker: z.ZodBoolean;
|
|
694
|
+
fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
695
|
+
fea: z.ZodString;
|
|
696
|
+
psz: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
697
|
+
pep: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
698
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
699
|
+
liq: z.ZodBoolean;
|
|
700
|
+
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
701
|
+
coid: z.ZodOptional<z.ZodString>;
|
|
702
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
703
|
+
tradeId: PerpsTradeId;
|
|
704
|
+
orderId: PerpsOrderId;
|
|
705
|
+
instrumentId: PerpsInstrumentId;
|
|
706
|
+
side: PerpsSide;
|
|
707
|
+
price: DecimalString;
|
|
708
|
+
quantity: DecimalString;
|
|
709
|
+
taker: boolean;
|
|
710
|
+
fee: DecimalString;
|
|
711
|
+
feeAsset: string;
|
|
712
|
+
previousSize: DecimalString;
|
|
713
|
+
previousEntryPrice: DecimalString;
|
|
714
|
+
pnl: DecimalString;
|
|
715
|
+
liquidation: boolean;
|
|
716
|
+
timestamp: EpochMilliseconds;
|
|
717
|
+
clientOrderId: string | undefined;
|
|
718
|
+
}, {
|
|
719
|
+
tid: PerpsTradeId;
|
|
720
|
+
oid: PerpsOrderId;
|
|
721
|
+
iid: PerpsInstrumentId;
|
|
722
|
+
side: PerpsSide;
|
|
723
|
+
p: DecimalString;
|
|
724
|
+
qty: DecimalString;
|
|
725
|
+
taker: boolean;
|
|
726
|
+
fee: DecimalString;
|
|
727
|
+
fea: string;
|
|
728
|
+
psz: DecimalString;
|
|
729
|
+
pep: DecimalString;
|
|
730
|
+
pnl: DecimalString;
|
|
731
|
+
liq: boolean;
|
|
732
|
+
ts: EpochMilliseconds;
|
|
733
|
+
coid?: string | undefined;
|
|
734
|
+
}>>;
|
|
735
|
+
|
|
736
|
+
export { type PerpsPostOrderAck as $, type PerpsDecimal as A, type PerpsDecimalInput as B, PerpsDecimalInputSchema as C, type PerpsDepositAmount as D, PerpsDepositStatusSchema as E, FetchPerpsOpenOrdersResponseSchema as F, PerpsEntityIdSchema as G, type PerpsFundingInterval as H, PerpsFundingIntervalSchema as I, PerpsInstrumentCategorySchema as J, PerpsInstrumentIdSchema as K, ListPerpsFillsResponseSchema as L, PerpsInstrumentTypeSchema as M, PerpsInternalTransferDirectionSchema as N, PerpsInternalTransferIdSchema as O, type PerpsInstrumentId as P, PerpsKlineInterval as Q, PerpsKlineIntervalSchema as R, type PerpsOrder as S, type PerpsOrderId as T, PerpsOrderIdSchema as U, PerpsOrderSchema as V, PerpsOrderStatus as W, PerpsOrderStatusSchema as X, PerpsOrderUpdateSchema as Y, PerpsPnlInterval as Z, PerpsPnlIntervalSchema as _, type PerpsEntityId as a, PerpsPostOrderAckSchema as a0, PerpsSideSchema as a1, PerpsTimeInForce as a2, PerpsTimeInForceSchema as a3, PerpsTpSlKind as a4, PerpsTpSlKindSchema as a5, type PerpsTpSlOrderFields as a6, PerpsTpSlOrderFieldsSchema as a7, PerpsTpSlScope as a8, PerpsTpSlScopeSchema as a9, PerpsTradeIdSchema as aa, type PerpsTxHash as ab, PerpsTxHashSchema as ac, type PerpsUpdateLeverageResult as ad, PerpsUpdateLeverageResultSchema as ae, type PerpsWithdrawalAmount as af, PerpsWithdrawalIdSchema as ag, PerpsWithdrawalStatusSchema as ah, decimalString as ai, perpsBaseUnits as aj, perpsDecimal as ak, PerpsDepositStatus as b, type PerpsWithdrawalId as c, PerpsWithdrawalStatus as d, type PerpsInternalTransferId as e, PerpsInternalTransferDirection as f, PerpsInstrumentType as g, PerpsInstrumentCategory as h, type PerpsTradeId as i, PerpsSide as j, FetchPerpsOrdersResponseSchema as k, type PerpsAccountFill as l, PerpsAccountFillSchema as m, PerpsAccountFillUpdateSchema as n, PerpsAssetSchema as o, type PerpsCancelAllOrdersResponse as p, PerpsCancelAllOrdersResponseSchema as q, type PerpsCancelOrderResult as r, PerpsCancelOrderResultSchema as s, type PerpsClientOrderId as t, PerpsClientOrderIdSchema as u, type PerpsCommandAck as v, PerpsCommandAckSchema as w, PerpsCommandStatusSchema as x, type PerpsCredentials as y, PerpsDataResponseSchema as z };
|