@polymarket/bindings 0.1.0-beta.7 → 0.1.0-beta.8
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-PJWPI2GS.js +2 -0
- package/dist/chunk-PJWPI2GS.js.map +1 -0
- package/dist/chunk-WZTOZWYR.js +2 -0
- package/dist/chunk-WZTOZWYR.js.map +1 -0
- package/dist/clob/index.d.ts +1 -28
- package/dist/clob/index.js +1 -1
- package/dist/clob/index.js.map +1 -1
- package/dist/gamma/index.d.ts +1 -0
- package/dist/gamma/index.js +1 -1
- package/dist/orders-ByouGgI5.d.ts +516 -0
- package/dist/perps/index.d.ts +82 -677
- package/dist/perps/index.js +1 -1
- package/dist/subscriptions/index.d.ts +17 -17
- package/dist/subscriptions/index.js +1 -1
- package/dist/subscriptions/index.js.map +1 -1
- package/package.json +2 -2
- package/dist/chunk-CFT5AXUR.js +0 -2
- package/dist/chunk-CFT5AXUR.js.map +0 -1
- package/dist/chunk-RN5EPAZQ.js +0 -2
- package/dist/chunk-RN5EPAZQ.js.map +0 -1
- package/dist/common-DVmtlYtD.d.ts +0 -99
|
@@ -0,0 +1,516 @@
|
|
|
1
|
+
import * as _polymarket_types from '@polymarket/types';
|
|
2
|
+
import { EvmAddress, PrivateKey, TxHash } from '@polymarket/types';
|
|
3
|
+
import { DecimalString, BaseUnits, EpochMilliseconds } 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 PerpsFundingInterval = `${number}h`;
|
|
16
|
+
declare const PerpsInstrumentIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
17
|
+
declare const PerpsOrderIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
18
|
+
declare const PerpsClientOrderIdSchema: z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>;
|
|
19
|
+
declare const PerpsTradeIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
20
|
+
declare const PerpsWithdrawalIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsWithdrawalId, number>>;
|
|
21
|
+
declare const PerpsInternalTransferIdSchema: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInternalTransferId, number>>;
|
|
22
|
+
declare const PerpsFundingIntervalSchema: z.ZodPipe<z.ZodString, z.ZodTransform<`${number}h`, string>>;
|
|
23
|
+
declare const PerpsDecimalInputSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>, z.ZodPipe<z.ZodNumber, z.ZodTransform<DecimalString, number>>]>;
|
|
24
|
+
type PerpsDecimalInput = z.input<typeof PerpsDecimalInputSchema>;
|
|
25
|
+
declare enum PerpsInstrumentType {
|
|
26
|
+
Perpetual = "perpetual"
|
|
27
|
+
}
|
|
28
|
+
declare enum PerpsInstrumentCategory {
|
|
29
|
+
Equity = "equity",
|
|
30
|
+
Commodity = "commodity",
|
|
31
|
+
Index = "index",
|
|
32
|
+
Crypto = "crypto"
|
|
33
|
+
}
|
|
34
|
+
declare enum PerpsSide {
|
|
35
|
+
Long = "long",
|
|
36
|
+
Short = "short"
|
|
37
|
+
}
|
|
38
|
+
declare enum PerpsTimeInForce {
|
|
39
|
+
GTC = "gtc",
|
|
40
|
+
IOC = "ioc",
|
|
41
|
+
FOK = "fok"
|
|
42
|
+
}
|
|
43
|
+
declare enum PerpsDepositStatus {
|
|
44
|
+
Pending = "pending",
|
|
45
|
+
Confirmed = "confirmed",
|
|
46
|
+
Removed = "removed"
|
|
47
|
+
}
|
|
48
|
+
declare enum PerpsWithdrawalStatus {
|
|
49
|
+
Pending = "pending",
|
|
50
|
+
Confirmed = "confirmed",
|
|
51
|
+
Removed = "removed"
|
|
52
|
+
}
|
|
53
|
+
declare enum PerpsInternalTransferDirection {
|
|
54
|
+
In = "in",
|
|
55
|
+
Out = "out"
|
|
56
|
+
}
|
|
57
|
+
declare enum PerpsKlineInterval {
|
|
58
|
+
OneSecond = "1s",
|
|
59
|
+
OneMinute = "1m",
|
|
60
|
+
FiveMinutes = "5m",
|
|
61
|
+
FifteenMinutes = "15m",
|
|
62
|
+
OneHour = "1h",
|
|
63
|
+
FourHours = "4h",
|
|
64
|
+
OneDay = "1d",
|
|
65
|
+
OneWeek = "1w"
|
|
66
|
+
}
|
|
67
|
+
declare enum PerpsPnlInterval {
|
|
68
|
+
OneHour = "1h",
|
|
69
|
+
FourHours = "4h",
|
|
70
|
+
OneDay = "1d",
|
|
71
|
+
OneWeek = "1w"
|
|
72
|
+
}
|
|
73
|
+
declare const PerpsInstrumentTypeSchema: z.ZodEnum<typeof PerpsInstrumentType>;
|
|
74
|
+
declare const PerpsInstrumentCategorySchema: z.ZodEnum<typeof PerpsInstrumentCategory>;
|
|
75
|
+
declare const PerpsSideSchema: z.ZodEnum<typeof PerpsSide>;
|
|
76
|
+
declare const PerpsTimeInForceSchema: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
77
|
+
declare const PerpsDepositStatusSchema: z.ZodEnum<typeof PerpsDepositStatus>;
|
|
78
|
+
declare const PerpsWithdrawalStatusSchema: z.ZodEnum<typeof PerpsWithdrawalStatus>;
|
|
79
|
+
declare const PerpsInternalTransferDirectionSchema: z.ZodEnum<typeof PerpsInternalTransferDirection>;
|
|
80
|
+
declare const PerpsKlineIntervalSchema: z.ZodEnum<typeof PerpsKlineInterval>;
|
|
81
|
+
declare const PerpsPnlIntervalSchema: z.ZodEnum<typeof PerpsPnlInterval>;
|
|
82
|
+
declare const PerpsAssetSchema: z.ZodString;
|
|
83
|
+
declare const PerpsTxHashSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<TxHash, string>>>>;
|
|
84
|
+
declare const PerpsDataResponseSchema: <T extends z.ZodType>(itemSchema: T) => z.ZodObject<{
|
|
85
|
+
data: z.ZodArray<T>;
|
|
86
|
+
more: z.ZodBoolean;
|
|
87
|
+
}, z.core.$strip>;
|
|
88
|
+
type PerpsCredentials = {
|
|
89
|
+
proxy: EvmAddress;
|
|
90
|
+
privateKey: PrivateKey;
|
|
91
|
+
secret: string;
|
|
92
|
+
expiresAt: number;
|
|
93
|
+
};
|
|
94
|
+
type PerpsDepositAmount = BaseUnits;
|
|
95
|
+
type PerpsWithdrawalAmount = BaseUnits;
|
|
96
|
+
type PerpsTxHash = TxHash;
|
|
97
|
+
type PerpsDecimal = DecimalString;
|
|
98
|
+
declare function perpsDecimal(value: string | number): DecimalString;
|
|
99
|
+
declare function perpsBaseUnits(value: string): BaseUnits;
|
|
100
|
+
declare function decimalString(value: string): DecimalString;
|
|
101
|
+
|
|
102
|
+
declare enum PerpsOrderStatus {
|
|
103
|
+
Accepted = "accepted",
|
|
104
|
+
Open = "open",
|
|
105
|
+
Partial = "partial",
|
|
106
|
+
Filled = "filled",
|
|
107
|
+
Cancelled = "cancelled",
|
|
108
|
+
AutoCancelled = "auto_cancelled",
|
|
109
|
+
PostOnlyRejected = "post_only_rejected",
|
|
110
|
+
FokUnfilled = "fok_unfilled",
|
|
111
|
+
IocNoFill = "ioc_no_fill",
|
|
112
|
+
IocExpired = "ioc_expired",
|
|
113
|
+
StpCancelled = "stp_cancelled",
|
|
114
|
+
ZeroQuantity = "zero_quantity",
|
|
115
|
+
DuplicateOrder = "duplicate_order",
|
|
116
|
+
OrderNotFound = "order_not_found",
|
|
117
|
+
ReduceOnlyInvalid = "reduce_only_invalid",
|
|
118
|
+
ReduceOnlyExpired = "reduce_only_expired",
|
|
119
|
+
OrderExpired = "order_expired",
|
|
120
|
+
Untriggered = "untriggered",
|
|
121
|
+
Armed = "armed",
|
|
122
|
+
Triggered = "triggered",
|
|
123
|
+
ParentCancelled = "parent_cancelled",
|
|
124
|
+
PositionClosed = "position_closed",
|
|
125
|
+
PositionFlipped = "position_flipped",
|
|
126
|
+
ReduceOnlyInvalidAtTrigger = "reduce_only_invalid_at_trigger",
|
|
127
|
+
Expired = "expired"
|
|
128
|
+
}
|
|
129
|
+
declare const PerpsOrderStatusSchema: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
130
|
+
declare const PerpsCommandStatusSchema: z.ZodEnum<{
|
|
131
|
+
ok: "ok";
|
|
132
|
+
err: "err";
|
|
133
|
+
}>;
|
|
134
|
+
declare const PerpsCommandAckSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
135
|
+
status: z.ZodLiteral<"ok">;
|
|
136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
137
|
+
status: z.ZodLiteral<"err">;
|
|
138
|
+
error: z.ZodPipe<z.ZodOptional<z.ZodString>, z.ZodTransform<string, string | undefined>>;
|
|
139
|
+
}, z.core.$strip>], "status">;
|
|
140
|
+
type PerpsCommandAck = z.infer<typeof PerpsCommandAckSchema>;
|
|
141
|
+
declare const PerpsPostOrderAckSchema: z.ZodPipe<z.ZodObject<{
|
|
142
|
+
status: z.ZodEnum<{
|
|
143
|
+
ok: "ok";
|
|
144
|
+
err: "err";
|
|
145
|
+
}>;
|
|
146
|
+
oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
147
|
+
coid: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
148
|
+
error: z.ZodOptional<z.ZodString>;
|
|
149
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
150
|
+
status: "err";
|
|
151
|
+
error: string;
|
|
152
|
+
clientOrderId: PerpsClientOrderId | undefined;
|
|
153
|
+
orderId?: undefined;
|
|
154
|
+
} | {
|
|
155
|
+
status: "ok";
|
|
156
|
+
orderId: PerpsOrderId;
|
|
157
|
+
clientOrderId: PerpsClientOrderId | undefined;
|
|
158
|
+
error?: undefined;
|
|
159
|
+
}, {
|
|
160
|
+
status: "ok" | "err";
|
|
161
|
+
oid?: PerpsOrderId | undefined;
|
|
162
|
+
coid?: PerpsClientOrderId | undefined;
|
|
163
|
+
error?: string | undefined;
|
|
164
|
+
}>>;
|
|
165
|
+
type PerpsPostOrderAck = z.infer<typeof PerpsPostOrderAckSchema>;
|
|
166
|
+
declare const PerpsCancelOrderResultSchema: z.ZodPipe<z.ZodObject<{
|
|
167
|
+
status: z.ZodEnum<{
|
|
168
|
+
ok: "ok";
|
|
169
|
+
err: "err";
|
|
170
|
+
}>;
|
|
171
|
+
oid: z.ZodOptional<z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>>;
|
|
172
|
+
coid: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<PerpsClientOrderId, string>>>;
|
|
173
|
+
error: z.ZodOptional<z.ZodString>;
|
|
174
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
175
|
+
status: "err";
|
|
176
|
+
error: string;
|
|
177
|
+
orderId: PerpsOrderId | undefined;
|
|
178
|
+
clientOrderId: PerpsClientOrderId | undefined;
|
|
179
|
+
} | {
|
|
180
|
+
status: "ok";
|
|
181
|
+
orderId: PerpsOrderId | undefined;
|
|
182
|
+
clientOrderId: PerpsClientOrderId | undefined;
|
|
183
|
+
error?: undefined;
|
|
184
|
+
}, {
|
|
185
|
+
status: "ok" | "err";
|
|
186
|
+
oid?: PerpsOrderId | undefined;
|
|
187
|
+
coid?: PerpsClientOrderId | undefined;
|
|
188
|
+
error?: string | undefined;
|
|
189
|
+
}>>;
|
|
190
|
+
type PerpsCancelOrderResult = z.infer<typeof PerpsCancelOrderResultSchema>;
|
|
191
|
+
declare const PerpsOrderSchema: z.ZodPipe<z.ZodObject<{
|
|
192
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
193
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
194
|
+
buy: z.ZodBoolean;
|
|
195
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
196
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
197
|
+
tif: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
198
|
+
post_only: z.ZodBoolean;
|
|
199
|
+
status: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
200
|
+
resting_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
201
|
+
filled_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
202
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
203
|
+
updated_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
204
|
+
client_order_id: z.ZodOptional<z.ZodString>;
|
|
205
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
206
|
+
id: PerpsOrderId;
|
|
207
|
+
instrumentId: PerpsInstrumentId;
|
|
208
|
+
buy: boolean;
|
|
209
|
+
price: DecimalString;
|
|
210
|
+
quantity: DecimalString;
|
|
211
|
+
timeInForce: PerpsTimeInForce;
|
|
212
|
+
postOnly: boolean;
|
|
213
|
+
status: PerpsOrderStatus;
|
|
214
|
+
restingQuantity: DecimalString;
|
|
215
|
+
filledQuantity: DecimalString;
|
|
216
|
+
createdTimestamp: EpochMilliseconds;
|
|
217
|
+
updatedTimestamp: EpochMilliseconds;
|
|
218
|
+
clientOrderId: string | undefined;
|
|
219
|
+
}, {
|
|
220
|
+
order_id: PerpsOrderId;
|
|
221
|
+
instrument_id: PerpsInstrumentId;
|
|
222
|
+
buy: boolean;
|
|
223
|
+
price: DecimalString;
|
|
224
|
+
quantity: DecimalString;
|
|
225
|
+
tif: PerpsTimeInForce;
|
|
226
|
+
post_only: boolean;
|
|
227
|
+
status: PerpsOrderStatus;
|
|
228
|
+
resting_quantity: DecimalString;
|
|
229
|
+
filled_quantity: DecimalString;
|
|
230
|
+
created_timestamp: EpochMilliseconds;
|
|
231
|
+
updated_timestamp: EpochMilliseconds;
|
|
232
|
+
client_order_id?: string | undefined;
|
|
233
|
+
}>>;
|
|
234
|
+
type PerpsOrder = z.infer<typeof PerpsOrderSchema>;
|
|
235
|
+
declare const FetchPerpsOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
236
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
237
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
238
|
+
buy: z.ZodBoolean;
|
|
239
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
240
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
241
|
+
tif: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
242
|
+
post_only: z.ZodBoolean;
|
|
243
|
+
status: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
244
|
+
resting_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
245
|
+
filled_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
246
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
247
|
+
updated_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
248
|
+
client_order_id: z.ZodOptional<z.ZodString>;
|
|
249
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
250
|
+
id: PerpsOrderId;
|
|
251
|
+
instrumentId: PerpsInstrumentId;
|
|
252
|
+
buy: boolean;
|
|
253
|
+
price: DecimalString;
|
|
254
|
+
quantity: DecimalString;
|
|
255
|
+
timeInForce: PerpsTimeInForce;
|
|
256
|
+
postOnly: boolean;
|
|
257
|
+
status: PerpsOrderStatus;
|
|
258
|
+
restingQuantity: DecimalString;
|
|
259
|
+
filledQuantity: DecimalString;
|
|
260
|
+
createdTimestamp: EpochMilliseconds;
|
|
261
|
+
updatedTimestamp: EpochMilliseconds;
|
|
262
|
+
clientOrderId: string | undefined;
|
|
263
|
+
}, {
|
|
264
|
+
order_id: PerpsOrderId;
|
|
265
|
+
instrument_id: PerpsInstrumentId;
|
|
266
|
+
buy: boolean;
|
|
267
|
+
price: DecimalString;
|
|
268
|
+
quantity: DecimalString;
|
|
269
|
+
tif: PerpsTimeInForce;
|
|
270
|
+
post_only: boolean;
|
|
271
|
+
status: PerpsOrderStatus;
|
|
272
|
+
resting_quantity: DecimalString;
|
|
273
|
+
filled_quantity: DecimalString;
|
|
274
|
+
created_timestamp: EpochMilliseconds;
|
|
275
|
+
updated_timestamp: EpochMilliseconds;
|
|
276
|
+
client_order_id?: string | undefined;
|
|
277
|
+
}>>>;
|
|
278
|
+
declare const FetchPerpsOpenOrdersResponseSchema: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
279
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
280
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
281
|
+
buy: z.ZodBoolean;
|
|
282
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
283
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
284
|
+
tif: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
285
|
+
post_only: z.ZodBoolean;
|
|
286
|
+
status: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
287
|
+
resting_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
288
|
+
filled_quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
289
|
+
created_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
290
|
+
updated_timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
291
|
+
client_order_id: z.ZodOptional<z.ZodString>;
|
|
292
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
293
|
+
id: PerpsOrderId;
|
|
294
|
+
instrumentId: PerpsInstrumentId;
|
|
295
|
+
buy: boolean;
|
|
296
|
+
price: DecimalString;
|
|
297
|
+
quantity: DecimalString;
|
|
298
|
+
timeInForce: PerpsTimeInForce;
|
|
299
|
+
postOnly: boolean;
|
|
300
|
+
status: PerpsOrderStatus;
|
|
301
|
+
restingQuantity: DecimalString;
|
|
302
|
+
filledQuantity: DecimalString;
|
|
303
|
+
createdTimestamp: EpochMilliseconds;
|
|
304
|
+
updatedTimestamp: EpochMilliseconds;
|
|
305
|
+
clientOrderId: string | undefined;
|
|
306
|
+
}, {
|
|
307
|
+
order_id: PerpsOrderId;
|
|
308
|
+
instrument_id: PerpsInstrumentId;
|
|
309
|
+
buy: boolean;
|
|
310
|
+
price: DecimalString;
|
|
311
|
+
quantity: DecimalString;
|
|
312
|
+
tif: PerpsTimeInForce;
|
|
313
|
+
post_only: boolean;
|
|
314
|
+
status: PerpsOrderStatus;
|
|
315
|
+
resting_quantity: DecimalString;
|
|
316
|
+
filled_quantity: DecimalString;
|
|
317
|
+
created_timestamp: EpochMilliseconds;
|
|
318
|
+
updated_timestamp: EpochMilliseconds;
|
|
319
|
+
client_order_id?: string | undefined;
|
|
320
|
+
}>>>;
|
|
321
|
+
declare const PerpsOrderUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
322
|
+
oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
323
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
324
|
+
buy: z.ZodBoolean;
|
|
325
|
+
p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
326
|
+
qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
327
|
+
tif: z.ZodEnum<typeof PerpsTimeInForce>;
|
|
328
|
+
po: z.ZodBoolean;
|
|
329
|
+
status: z.ZodEnum<typeof PerpsOrderStatus>;
|
|
330
|
+
rest: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
331
|
+
fill: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
332
|
+
cts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
333
|
+
uts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
334
|
+
coid: z.ZodOptional<z.ZodString>;
|
|
335
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
336
|
+
id: PerpsOrderId;
|
|
337
|
+
instrumentId: PerpsInstrumentId;
|
|
338
|
+
buy: boolean;
|
|
339
|
+
price: DecimalString;
|
|
340
|
+
quantity: DecimalString;
|
|
341
|
+
timeInForce: PerpsTimeInForce;
|
|
342
|
+
postOnly: boolean;
|
|
343
|
+
status: PerpsOrderStatus;
|
|
344
|
+
restingQuantity: DecimalString;
|
|
345
|
+
filledQuantity: DecimalString;
|
|
346
|
+
createdTimestamp: EpochMilliseconds;
|
|
347
|
+
updatedTimestamp: EpochMilliseconds;
|
|
348
|
+
clientOrderId: string | undefined;
|
|
349
|
+
}, {
|
|
350
|
+
oid: PerpsOrderId;
|
|
351
|
+
iid: PerpsInstrumentId;
|
|
352
|
+
buy: boolean;
|
|
353
|
+
p: DecimalString;
|
|
354
|
+
qty: DecimalString;
|
|
355
|
+
tif: PerpsTimeInForce;
|
|
356
|
+
po: boolean;
|
|
357
|
+
status: PerpsOrderStatus;
|
|
358
|
+
rest: DecimalString;
|
|
359
|
+
fill: DecimalString;
|
|
360
|
+
cts: EpochMilliseconds;
|
|
361
|
+
uts: EpochMilliseconds;
|
|
362
|
+
coid?: string | undefined;
|
|
363
|
+
}>>;
|
|
364
|
+
declare const PerpsAccountFillSchema: z.ZodPipe<z.ZodObject<{
|
|
365
|
+
trade_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
366
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
367
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
368
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
369
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
370
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
371
|
+
taker: z.ZodBoolean;
|
|
372
|
+
fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
373
|
+
fee_asset: z.ZodString;
|
|
374
|
+
previous_size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
375
|
+
previous_entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
376
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
377
|
+
liquidation: z.ZodBoolean;
|
|
378
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
379
|
+
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
|
|
380
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
381
|
+
tradeId: PerpsTradeId;
|
|
382
|
+
orderId: PerpsOrderId;
|
|
383
|
+
instrumentId: PerpsInstrumentId;
|
|
384
|
+
side: PerpsSide;
|
|
385
|
+
price: DecimalString;
|
|
386
|
+
quantity: DecimalString;
|
|
387
|
+
taker: boolean;
|
|
388
|
+
fee: DecimalString;
|
|
389
|
+
feeAsset: string;
|
|
390
|
+
previousSize: DecimalString;
|
|
391
|
+
previousEntryPrice: DecimalString;
|
|
392
|
+
pnl: DecimalString;
|
|
393
|
+
liquidation: boolean;
|
|
394
|
+
timestamp: EpochMilliseconds;
|
|
395
|
+
hash: _polymarket_types.TxHash | undefined;
|
|
396
|
+
}, {
|
|
397
|
+
trade_id: PerpsTradeId;
|
|
398
|
+
order_id: PerpsOrderId;
|
|
399
|
+
instrument_id: PerpsInstrumentId;
|
|
400
|
+
side: PerpsSide;
|
|
401
|
+
price: DecimalString;
|
|
402
|
+
quantity: DecimalString;
|
|
403
|
+
taker: boolean;
|
|
404
|
+
fee: DecimalString;
|
|
405
|
+
fee_asset: string;
|
|
406
|
+
previous_size: DecimalString;
|
|
407
|
+
previous_entry_price: DecimalString;
|
|
408
|
+
pnl: DecimalString;
|
|
409
|
+
liquidation: boolean;
|
|
410
|
+
timestamp: EpochMilliseconds;
|
|
411
|
+
hash?: _polymarket_types.TxHash | undefined;
|
|
412
|
+
}>>;
|
|
413
|
+
type PerpsAccountFill = z.infer<typeof PerpsAccountFillSchema>;
|
|
414
|
+
declare const ListPerpsFillsResponseSchema: z.ZodObject<{
|
|
415
|
+
data: z.ZodArray<z.ZodPipe<z.ZodObject<{
|
|
416
|
+
trade_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
417
|
+
order_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
418
|
+
instrument_id: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
419
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
420
|
+
price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
421
|
+
quantity: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
422
|
+
taker: z.ZodBoolean;
|
|
423
|
+
fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
424
|
+
fee_asset: z.ZodString;
|
|
425
|
+
previous_size: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
426
|
+
previous_entry_price: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
427
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
428
|
+
liquidation: z.ZodBoolean;
|
|
429
|
+
timestamp: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
430
|
+
hash: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<_polymarket_types.TxHash, string>>>>;
|
|
431
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
432
|
+
tradeId: PerpsTradeId;
|
|
433
|
+
orderId: PerpsOrderId;
|
|
434
|
+
instrumentId: PerpsInstrumentId;
|
|
435
|
+
side: PerpsSide;
|
|
436
|
+
price: DecimalString;
|
|
437
|
+
quantity: DecimalString;
|
|
438
|
+
taker: boolean;
|
|
439
|
+
fee: DecimalString;
|
|
440
|
+
feeAsset: string;
|
|
441
|
+
previousSize: DecimalString;
|
|
442
|
+
previousEntryPrice: DecimalString;
|
|
443
|
+
pnl: DecimalString;
|
|
444
|
+
liquidation: boolean;
|
|
445
|
+
timestamp: EpochMilliseconds;
|
|
446
|
+
hash: _polymarket_types.TxHash | undefined;
|
|
447
|
+
}, {
|
|
448
|
+
trade_id: PerpsTradeId;
|
|
449
|
+
order_id: PerpsOrderId;
|
|
450
|
+
instrument_id: PerpsInstrumentId;
|
|
451
|
+
side: PerpsSide;
|
|
452
|
+
price: DecimalString;
|
|
453
|
+
quantity: DecimalString;
|
|
454
|
+
taker: boolean;
|
|
455
|
+
fee: DecimalString;
|
|
456
|
+
fee_asset: string;
|
|
457
|
+
previous_size: DecimalString;
|
|
458
|
+
previous_entry_price: DecimalString;
|
|
459
|
+
pnl: DecimalString;
|
|
460
|
+
liquidation: boolean;
|
|
461
|
+
timestamp: EpochMilliseconds;
|
|
462
|
+
hash?: _polymarket_types.TxHash | undefined;
|
|
463
|
+
}>>>;
|
|
464
|
+
more: z.ZodBoolean;
|
|
465
|
+
}, z.core.$strip>;
|
|
466
|
+
declare const PerpsAccountFillUpdateSchema: z.ZodPipe<z.ZodObject<{
|
|
467
|
+
tid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsTradeId, number>>;
|
|
468
|
+
oid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsOrderId, number>>;
|
|
469
|
+
iid: z.ZodPipe<z.ZodNumber, z.ZodTransform<PerpsInstrumentId, number>>;
|
|
470
|
+
side: z.ZodEnum<typeof PerpsSide>;
|
|
471
|
+
p: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
472
|
+
qty: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
473
|
+
taker: z.ZodBoolean;
|
|
474
|
+
fee: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
475
|
+
fea: z.ZodString;
|
|
476
|
+
psz: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
477
|
+
pep: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
478
|
+
pnl: z.ZodPipe<z.ZodString, z.ZodTransform<DecimalString, string>>;
|
|
479
|
+
liq: z.ZodBoolean;
|
|
480
|
+
ts: z.ZodPipe<z.ZodNumber, z.ZodTransform<EpochMilliseconds, number>>;
|
|
481
|
+
coid: z.ZodOptional<z.ZodString>;
|
|
482
|
+
}, z.core.$strip>, z.ZodTransform<{
|
|
483
|
+
tradeId: PerpsTradeId;
|
|
484
|
+
orderId: PerpsOrderId;
|
|
485
|
+
instrumentId: PerpsInstrumentId;
|
|
486
|
+
side: PerpsSide;
|
|
487
|
+
price: DecimalString;
|
|
488
|
+
quantity: DecimalString;
|
|
489
|
+
taker: boolean;
|
|
490
|
+
fee: DecimalString;
|
|
491
|
+
feeAsset: string;
|
|
492
|
+
previousSize: DecimalString;
|
|
493
|
+
previousEntryPrice: DecimalString;
|
|
494
|
+
pnl: DecimalString;
|
|
495
|
+
liquidation: boolean;
|
|
496
|
+
timestamp: EpochMilliseconds;
|
|
497
|
+
clientOrderId: string | undefined;
|
|
498
|
+
}, {
|
|
499
|
+
tid: PerpsTradeId;
|
|
500
|
+
oid: PerpsOrderId;
|
|
501
|
+
iid: PerpsInstrumentId;
|
|
502
|
+
side: PerpsSide;
|
|
503
|
+
p: DecimalString;
|
|
504
|
+
qty: DecimalString;
|
|
505
|
+
taker: boolean;
|
|
506
|
+
fee: DecimalString;
|
|
507
|
+
fea: string;
|
|
508
|
+
psz: DecimalString;
|
|
509
|
+
pep: DecimalString;
|
|
510
|
+
pnl: DecimalString;
|
|
511
|
+
liq: boolean;
|
|
512
|
+
ts: EpochMilliseconds;
|
|
513
|
+
coid?: string | undefined;
|
|
514
|
+
}>>;
|
|
515
|
+
|
|
516
|
+
export { PerpsTimeInForceSchema as $, type PerpsDepositAmount as A, PerpsDepositStatusSchema as B, type PerpsFundingInterval as C, PerpsFundingIntervalSchema as D, PerpsInstrumentCategorySchema as E, FetchPerpsOpenOrdersResponseSchema as F, PerpsInstrumentIdSchema as G, PerpsInstrumentTypeSchema as H, PerpsInternalTransferDirectionSchema as I, PerpsInternalTransferIdSchema as J, PerpsKlineInterval as K, ListPerpsFillsResponseSchema as L, PerpsKlineIntervalSchema as M, type PerpsOrder as N, type PerpsOrderId as O, type PerpsInstrumentId as P, PerpsOrderIdSchema as Q, PerpsOrderSchema as R, PerpsOrderStatus as S, PerpsOrderStatusSchema as T, PerpsOrderUpdateSchema as U, PerpsPnlInterval as V, PerpsPnlIntervalSchema as W, type PerpsPostOrderAck as X, PerpsPostOrderAckSchema as Y, PerpsSideSchema as Z, PerpsTimeInForce as _, PerpsDepositStatus as a, PerpsTradeIdSchema as a0, type PerpsTxHash as a1, PerpsTxHashSchema as a2, type PerpsWithdrawalAmount as a3, PerpsWithdrawalIdSchema as a4, PerpsWithdrawalStatusSchema as a5, decimalString as a6, perpsBaseUnits as a7, perpsDecimal as a8, type PerpsWithdrawalId as b, PerpsWithdrawalStatus as c, type PerpsInternalTransferId as d, PerpsInternalTransferDirection as e, PerpsInstrumentType as f, PerpsInstrumentCategory as g, type PerpsTradeId as h, PerpsSide as i, FetchPerpsOrdersResponseSchema as j, type PerpsAccountFill as k, PerpsAccountFillSchema as l, PerpsAccountFillUpdateSchema as m, PerpsAssetSchema as n, type PerpsCancelOrderResult as o, PerpsCancelOrderResultSchema as p, type PerpsClientOrderId as q, PerpsClientOrderIdSchema as r, type PerpsCommandAck as s, PerpsCommandAckSchema as t, PerpsCommandStatusSchema as u, type PerpsCredentials as v, PerpsDataResponseSchema as w, type PerpsDecimal as x, type PerpsDecimalInput as y, PerpsDecimalInputSchema as z };
|