hyperliquid-prime 0.1.4 → 0.1.5

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.
Files changed (66) hide show
  1. package/README.md +64 -28
  2. package/dist/cli/program.d.ts.map +1 -1
  3. package/dist/cli/program.js +5 -1
  4. package/dist/cli/program.js.map +1 -1
  5. package/dist/collateral/manager.d.ts +2 -2
  6. package/dist/collateral/manager.d.ts.map +1 -1
  7. package/dist/collateral/manager.js +487 -91
  8. package/dist/collateral/manager.js.map +1 -1
  9. package/dist/config.d.ts +5 -0
  10. package/dist/config.d.ts.map +1 -1
  11. package/dist/config.js.map +1 -1
  12. package/dist/execution/executor.d.ts +21 -0
  13. package/dist/execution/executor.d.ts.map +1 -1
  14. package/dist/execution/executor.js +311 -112
  15. package/dist/execution/executor.js.map +1 -1
  16. package/dist/execution/types.d.ts +23 -2
  17. package/dist/execution/types.d.ts.map +1 -1
  18. package/dist/index.d.ts +42 -5
  19. package/dist/index.d.ts.map +1 -1
  20. package/dist/index.js +196 -14
  21. package/dist/index.js.map +1 -1
  22. package/dist/market/registry.d.ts +3 -0
  23. package/dist/market/registry.d.ts.map +1 -1
  24. package/dist/market/registry.js +53 -23
  25. package/dist/market/registry.js.map +1 -1
  26. package/dist/market/types.d.ts +6 -0
  27. package/dist/market/types.d.ts.map +1 -1
  28. package/dist/position/manager.d.ts +6 -3
  29. package/dist/position/manager.d.ts.map +1 -1
  30. package/dist/position/manager.js +58 -31
  31. package/dist/position/manager.js.map +1 -1
  32. package/dist/provider/nktkas.d.ts +38 -3
  33. package/dist/provider/nktkas.d.ts.map +1 -1
  34. package/dist/provider/nktkas.js +202 -35
  35. package/dist/provider/nktkas.js.map +1 -1
  36. package/dist/provider/provider.d.ts +29 -3
  37. package/dist/provider/provider.d.ts.map +1 -1
  38. package/dist/provider/schemas.d.ts +933 -0
  39. package/dist/provider/schemas.d.ts.map +1 -0
  40. package/dist/provider/schemas.js +330 -0
  41. package/dist/provider/schemas.js.map +1 -0
  42. package/dist/provider/types.d.ts +88 -1
  43. package/dist/provider/types.d.ts.map +1 -1
  44. package/dist/router/router.d.ts.map +1 -1
  45. package/dist/router/router.js +96 -27
  46. package/dist/router/router.js.map +1 -1
  47. package/dist/router/scorer.d.ts +3 -1
  48. package/dist/router/scorer.d.ts.map +1 -1
  49. package/dist/router/scorer.js +28 -5
  50. package/dist/router/scorer.js.map +1 -1
  51. package/dist/router/types.d.ts +3 -0
  52. package/dist/router/types.d.ts.map +1 -1
  53. package/dist/router/types.js.map +1 -1
  54. package/dist/types/result.d.ts +16 -0
  55. package/dist/types/result.d.ts.map +1 -0
  56. package/dist/types/result.js +9 -0
  57. package/dist/types/result.js.map +1 -0
  58. package/dist/utils/asset.d.ts +2 -0
  59. package/dist/utils/asset.d.ts.map +1 -0
  60. package/dist/utils/asset.js +18 -0
  61. package/dist/utils/asset.js.map +1 -0
  62. package/dist/utils/order-precision.d.ts +16 -0
  63. package/dist/utils/order-precision.d.ts.map +1 -0
  64. package/dist/utils/order-precision.js +45 -0
  65. package/dist/utils/order-precision.js.map +1 -0
  66. package/package.json +7 -3
@@ -0,0 +1,933 @@
1
+ /**
2
+ * Zod schemas for runtime validation of all @nktkas/hyperliquid responses.
3
+ * Applied at the provider boundary to catch upstream API changes early.
4
+ */
5
+ import { z } from "zod";
6
+ export declare const MetaAssetSchema: z.ZodObject<{
7
+ name: z.ZodString;
8
+ szDecimals: z.ZodNumber;
9
+ maxLeverage: z.ZodNumber;
10
+ onlyIsolated: z.ZodOptional<z.ZodBoolean>;
11
+ marginMode: z.ZodOptional<z.ZodString>;
12
+ isDelisted: z.ZodOptional<z.ZodBoolean>;
13
+ }, z.core.$strip>;
14
+ export declare const MetaSchema: z.ZodObject<{
15
+ universe: z.ZodArray<z.ZodObject<{
16
+ name: z.ZodString;
17
+ szDecimals: z.ZodNumber;
18
+ maxLeverage: z.ZodNumber;
19
+ onlyIsolated: z.ZodOptional<z.ZodBoolean>;
20
+ marginMode: z.ZodOptional<z.ZodString>;
21
+ isDelisted: z.ZodOptional<z.ZodBoolean>;
22
+ }, z.core.$strip>>;
23
+ collateralToken: z.ZodNumber;
24
+ }, z.core.$strip>;
25
+ export declare const AssetCtxSchema: z.ZodObject<{
26
+ funding: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
27
+ openInterest: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
28
+ prevDayPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
29
+ dayNtlVlm: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
30
+ premium: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>>, z.ZodTransform<string | undefined, string | null | undefined>>;
31
+ oraclePx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
32
+ markPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
33
+ midPx: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>>, z.ZodTransform<string | undefined, string | null | undefined>>;
34
+ impactPxs: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>], null>>>, z.ZodTransform<[string, string] | undefined, [string, string] | null | undefined>>;
35
+ }, z.core.$strip>;
36
+ export declare const MetaAndAssetCtxsSchema: z.ZodTuple<[z.ZodObject<{
37
+ universe: z.ZodArray<z.ZodObject<{
38
+ name: z.ZodString;
39
+ szDecimals: z.ZodNumber;
40
+ maxLeverage: z.ZodNumber;
41
+ onlyIsolated: z.ZodOptional<z.ZodBoolean>;
42
+ marginMode: z.ZodOptional<z.ZodString>;
43
+ isDelisted: z.ZodOptional<z.ZodBoolean>;
44
+ }, z.core.$strip>>;
45
+ collateralToken: z.ZodNumber;
46
+ }, z.core.$strip>, z.ZodArray<z.ZodObject<{
47
+ funding: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
48
+ openInterest: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
49
+ prevDayPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
50
+ dayNtlVlm: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
51
+ premium: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>>, z.ZodTransform<string | undefined, string | null | undefined>>;
52
+ oraclePx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
53
+ markPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
54
+ midPx: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>>, z.ZodTransform<string | undefined, string | null | undefined>>;
55
+ impactPxs: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodTuple<[z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>, z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>], null>>>, z.ZodTransform<[string, string] | undefined, [string, string] | null | undefined>>;
56
+ }, z.core.$strip>>], null>;
57
+ export declare const L2LevelSchema: z.ZodObject<{
58
+ px: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
59
+ sz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
60
+ n: z.ZodNumber;
61
+ }, z.core.$strip>;
62
+ export declare const L2BookSchema: z.ZodObject<{
63
+ coin: z.ZodString;
64
+ time: z.ZodNumber;
65
+ levels: z.ZodTuple<[z.ZodArray<z.ZodObject<{
66
+ px: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
67
+ sz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
68
+ n: z.ZodNumber;
69
+ }, z.core.$strip>>, z.ZodArray<z.ZodObject<{
70
+ px: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
71
+ sz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
72
+ n: z.ZodNumber;
73
+ }, z.core.$strip>>], null>;
74
+ }, z.core.$strip>;
75
+ export declare const PerpDexSchema: z.ZodObject<{
76
+ name: z.ZodString;
77
+ deployer: z.ZodString;
78
+ fullName: z.ZodOptional<z.ZodString>;
79
+ oracleUpdater: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
+ feeRecipient: z.ZodOptional<z.ZodNullable<z.ZodString>>;
81
+ }, z.core.$strip>;
82
+ export declare const SpotTokenSchema: z.ZodObject<{
83
+ name: z.ZodString;
84
+ index: z.ZodNumber;
85
+ szDecimals: z.ZodNumber;
86
+ weiDecimals: z.ZodNumber;
87
+ tokenId: z.ZodString;
88
+ isCanonical: z.ZodBoolean;
89
+ fullName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
90
+ }, z.core.$strip>;
91
+ export declare const SpotMetaSchema: z.ZodObject<{
92
+ tokens: z.ZodArray<z.ZodObject<{
93
+ name: z.ZodString;
94
+ index: z.ZodNumber;
95
+ szDecimals: z.ZodNumber;
96
+ weiDecimals: z.ZodNumber;
97
+ tokenId: z.ZodString;
98
+ isCanonical: z.ZodBoolean;
99
+ fullName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
100
+ }, z.core.$strip>>;
101
+ universe: z.ZodArray<z.ZodObject<{
102
+ name: z.ZodString;
103
+ tokens: z.ZodArray<z.ZodNumber>;
104
+ index: z.ZodNumber;
105
+ isCanonical: z.ZodBoolean;
106
+ }, z.core.$strip>>;
107
+ }, z.core.$strip>;
108
+ export declare const AssetPositionSchema: z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
109
+ position: z.ZodObject<{
110
+ coin: z.ZodString;
111
+ szi: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
112
+ entryPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
113
+ positionValue: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
114
+ unrealizedPnl: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
115
+ returnOnEquity: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
116
+ leverage: z.ZodNullable<z.ZodObject<{
117
+ type: z.ZodString;
118
+ value: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
119
+ }, z.core.$strip>>;
120
+ liquidationPx: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
121
+ marginUsed: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
122
+ maxLeverage: z.ZodNumber;
123
+ cumFunding: z.ZodObject<{
124
+ allTime: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
125
+ sinceChange: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
126
+ sinceOpen: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
127
+ }, z.core.$strip>;
128
+ markPx: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
129
+ }, z.core.$strip>;
130
+ type: z.ZodOptional<z.ZodString>;
131
+ }, z.core.$strip>, z.ZodTransform<{
132
+ position: {
133
+ coin: string;
134
+ szi: string;
135
+ entryPx: string;
136
+ positionValue: string;
137
+ unrealizedPnl: string;
138
+ returnOnEquity: string;
139
+ leverage: {
140
+ type: string;
141
+ value: string;
142
+ } | null;
143
+ liquidationPx: string | null;
144
+ marginUsed: string;
145
+ maxLeverage: number;
146
+ cumFunding: {
147
+ allTime: string;
148
+ sinceChange: string;
149
+ sinceOpen: string;
150
+ };
151
+ markPx?: string | undefined;
152
+ };
153
+ type: string;
154
+ }, {
155
+ position: {
156
+ coin: string;
157
+ szi: string;
158
+ entryPx: string;
159
+ positionValue: string;
160
+ unrealizedPnl: string;
161
+ returnOnEquity: string;
162
+ leverage: {
163
+ type: string;
164
+ value: string;
165
+ } | null;
166
+ liquidationPx: string | null;
167
+ marginUsed: string;
168
+ maxLeverage: number;
169
+ cumFunding: {
170
+ allTime: string;
171
+ sinceChange: string;
172
+ sinceOpen: string;
173
+ };
174
+ markPx?: string | undefined;
175
+ };
176
+ type?: string | undefined;
177
+ }>>, z.ZodPipe<z.ZodObject<{
178
+ coin: z.ZodString;
179
+ szi: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
180
+ entryPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
181
+ positionValue: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
182
+ unrealizedPnl: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
183
+ returnOnEquity: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
184
+ leverage: z.ZodNullable<z.ZodObject<{
185
+ type: z.ZodString;
186
+ value: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
187
+ }, z.core.$strip>>;
188
+ liquidationPx: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
189
+ marginUsed: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
190
+ maxLeverage: z.ZodNumber;
191
+ cumFunding: z.ZodObject<{
192
+ allTime: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
193
+ sinceChange: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
194
+ sinceOpen: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
195
+ }, z.core.$strip>;
196
+ markPx: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
197
+ }, z.core.$strip>, z.ZodTransform<{
198
+ position: {
199
+ coin: string;
200
+ szi: string;
201
+ entryPx: string;
202
+ positionValue: string;
203
+ unrealizedPnl: string;
204
+ returnOnEquity: string;
205
+ leverage: {
206
+ type: string;
207
+ value: string;
208
+ } | null;
209
+ liquidationPx: string | null;
210
+ marginUsed: string;
211
+ maxLeverage: number;
212
+ cumFunding: {
213
+ allTime: string;
214
+ sinceChange: string;
215
+ sinceOpen: string;
216
+ };
217
+ markPx?: string | undefined;
218
+ };
219
+ type: string;
220
+ }, {
221
+ coin: string;
222
+ szi: string;
223
+ entryPx: string;
224
+ positionValue: string;
225
+ unrealizedPnl: string;
226
+ returnOnEquity: string;
227
+ leverage: {
228
+ type: string;
229
+ value: string;
230
+ } | null;
231
+ liquidationPx: string | null;
232
+ marginUsed: string;
233
+ maxLeverage: number;
234
+ cumFunding: {
235
+ allTime: string;
236
+ sinceChange: string;
237
+ sinceOpen: string;
238
+ };
239
+ markPx?: string | undefined;
240
+ }>>]>;
241
+ export declare const ClearinghouseStateSchema: z.ZodPipe<z.ZodObject<{
242
+ marginSummary: z.ZodObject<{
243
+ accountValue: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
244
+ totalNtlPos: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
245
+ totalRawUsd: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
246
+ totalMarginUsed: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
247
+ }, z.core.$strip>;
248
+ crossMarginSummary: z.ZodObject<{
249
+ accountValue: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
250
+ totalNtlPos: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
251
+ totalRawUsd: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
252
+ totalMarginUsed: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
253
+ }, z.core.$strip>;
254
+ assetPositions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
255
+ position: z.ZodObject<{
256
+ coin: z.ZodString;
257
+ szi: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
258
+ entryPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
259
+ positionValue: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
260
+ unrealizedPnl: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
261
+ returnOnEquity: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
262
+ leverage: z.ZodNullable<z.ZodObject<{
263
+ type: z.ZodString;
264
+ value: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
265
+ }, z.core.$strip>>;
266
+ liquidationPx: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
267
+ marginUsed: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
268
+ maxLeverage: z.ZodNumber;
269
+ cumFunding: z.ZodObject<{
270
+ allTime: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
271
+ sinceChange: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
272
+ sinceOpen: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
273
+ }, z.core.$strip>;
274
+ markPx: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
275
+ }, z.core.$strip>;
276
+ type: z.ZodOptional<z.ZodString>;
277
+ }, z.core.$strip>, z.ZodTransform<{
278
+ position: {
279
+ coin: string;
280
+ szi: string;
281
+ entryPx: string;
282
+ positionValue: string;
283
+ unrealizedPnl: string;
284
+ returnOnEquity: string;
285
+ leverage: {
286
+ type: string;
287
+ value: string;
288
+ } | null;
289
+ liquidationPx: string | null;
290
+ marginUsed: string;
291
+ maxLeverage: number;
292
+ cumFunding: {
293
+ allTime: string;
294
+ sinceChange: string;
295
+ sinceOpen: string;
296
+ };
297
+ markPx?: string | undefined;
298
+ };
299
+ type: string;
300
+ }, {
301
+ position: {
302
+ coin: string;
303
+ szi: string;
304
+ entryPx: string;
305
+ positionValue: string;
306
+ unrealizedPnl: string;
307
+ returnOnEquity: string;
308
+ leverage: {
309
+ type: string;
310
+ value: string;
311
+ } | null;
312
+ liquidationPx: string | null;
313
+ marginUsed: string;
314
+ maxLeverage: number;
315
+ cumFunding: {
316
+ allTime: string;
317
+ sinceChange: string;
318
+ sinceOpen: string;
319
+ };
320
+ markPx?: string | undefined;
321
+ };
322
+ type?: string | undefined;
323
+ }>>, z.ZodPipe<z.ZodObject<{
324
+ coin: z.ZodString;
325
+ szi: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
326
+ entryPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
327
+ positionValue: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
328
+ unrealizedPnl: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
329
+ returnOnEquity: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
330
+ leverage: z.ZodNullable<z.ZodObject<{
331
+ type: z.ZodString;
332
+ value: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
333
+ }, z.core.$strip>>;
334
+ liquidationPx: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
335
+ marginUsed: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
336
+ maxLeverage: z.ZodNumber;
337
+ cumFunding: z.ZodObject<{
338
+ allTime: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
339
+ sinceChange: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
340
+ sinceOpen: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
341
+ }, z.core.$strip>;
342
+ markPx: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
343
+ }, z.core.$strip>, z.ZodTransform<{
344
+ position: {
345
+ coin: string;
346
+ szi: string;
347
+ entryPx: string;
348
+ positionValue: string;
349
+ unrealizedPnl: string;
350
+ returnOnEquity: string;
351
+ leverage: {
352
+ type: string;
353
+ value: string;
354
+ } | null;
355
+ liquidationPx: string | null;
356
+ marginUsed: string;
357
+ maxLeverage: number;
358
+ cumFunding: {
359
+ allTime: string;
360
+ sinceChange: string;
361
+ sinceOpen: string;
362
+ };
363
+ markPx?: string | undefined;
364
+ };
365
+ type: string;
366
+ }, {
367
+ coin: string;
368
+ szi: string;
369
+ entryPx: string;
370
+ positionValue: string;
371
+ unrealizedPnl: string;
372
+ returnOnEquity: string;
373
+ leverage: {
374
+ type: string;
375
+ value: string;
376
+ } | null;
377
+ liquidationPx: string | null;
378
+ marginUsed: string;
379
+ maxLeverage: number;
380
+ cumFunding: {
381
+ allTime: string;
382
+ sinceChange: string;
383
+ sinceOpen: string;
384
+ };
385
+ markPx?: string | undefined;
386
+ }>>]>>>;
387
+ positions: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodPipe<z.ZodObject<{
388
+ position: z.ZodObject<{
389
+ coin: z.ZodString;
390
+ szi: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
391
+ entryPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
392
+ positionValue: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
393
+ unrealizedPnl: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
394
+ returnOnEquity: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
395
+ leverage: z.ZodNullable<z.ZodObject<{
396
+ type: z.ZodString;
397
+ value: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
398
+ }, z.core.$strip>>;
399
+ liquidationPx: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
400
+ marginUsed: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
401
+ maxLeverage: z.ZodNumber;
402
+ cumFunding: z.ZodObject<{
403
+ allTime: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
404
+ sinceChange: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
405
+ sinceOpen: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
406
+ }, z.core.$strip>;
407
+ markPx: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
408
+ }, z.core.$strip>;
409
+ type: z.ZodOptional<z.ZodString>;
410
+ }, z.core.$strip>, z.ZodTransform<{
411
+ position: {
412
+ coin: string;
413
+ szi: string;
414
+ entryPx: string;
415
+ positionValue: string;
416
+ unrealizedPnl: string;
417
+ returnOnEquity: string;
418
+ leverage: {
419
+ type: string;
420
+ value: string;
421
+ } | null;
422
+ liquidationPx: string | null;
423
+ marginUsed: string;
424
+ maxLeverage: number;
425
+ cumFunding: {
426
+ allTime: string;
427
+ sinceChange: string;
428
+ sinceOpen: string;
429
+ };
430
+ markPx?: string | undefined;
431
+ };
432
+ type: string;
433
+ }, {
434
+ position: {
435
+ coin: string;
436
+ szi: string;
437
+ entryPx: string;
438
+ positionValue: string;
439
+ unrealizedPnl: string;
440
+ returnOnEquity: string;
441
+ leverage: {
442
+ type: string;
443
+ value: string;
444
+ } | null;
445
+ liquidationPx: string | null;
446
+ marginUsed: string;
447
+ maxLeverage: number;
448
+ cumFunding: {
449
+ allTime: string;
450
+ sinceChange: string;
451
+ sinceOpen: string;
452
+ };
453
+ markPx?: string | undefined;
454
+ };
455
+ type?: string | undefined;
456
+ }>>, z.ZodPipe<z.ZodObject<{
457
+ coin: z.ZodString;
458
+ szi: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
459
+ entryPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
460
+ positionValue: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
461
+ unrealizedPnl: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
462
+ returnOnEquity: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
463
+ leverage: z.ZodNullable<z.ZodObject<{
464
+ type: z.ZodString;
465
+ value: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
466
+ }, z.core.$strip>>;
467
+ liquidationPx: z.ZodNullable<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
468
+ marginUsed: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
469
+ maxLeverage: z.ZodNumber;
470
+ cumFunding: z.ZodObject<{
471
+ allTime: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
472
+ sinceChange: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
473
+ sinceOpen: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
474
+ }, z.core.$strip>;
475
+ markPx: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
476
+ }, z.core.$strip>, z.ZodTransform<{
477
+ position: {
478
+ coin: string;
479
+ szi: string;
480
+ entryPx: string;
481
+ positionValue: string;
482
+ unrealizedPnl: string;
483
+ returnOnEquity: string;
484
+ leverage: {
485
+ type: string;
486
+ value: string;
487
+ } | null;
488
+ liquidationPx: string | null;
489
+ marginUsed: string;
490
+ maxLeverage: number;
491
+ cumFunding: {
492
+ allTime: string;
493
+ sinceChange: string;
494
+ sinceOpen: string;
495
+ };
496
+ markPx?: string | undefined;
497
+ };
498
+ type: string;
499
+ }, {
500
+ coin: string;
501
+ szi: string;
502
+ entryPx: string;
503
+ positionValue: string;
504
+ unrealizedPnl: string;
505
+ returnOnEquity: string;
506
+ leverage: {
507
+ type: string;
508
+ value: string;
509
+ } | null;
510
+ liquidationPx: string | null;
511
+ marginUsed: string;
512
+ maxLeverage: number;
513
+ cumFunding: {
514
+ allTime: string;
515
+ sinceChange: string;
516
+ sinceOpen: string;
517
+ };
518
+ markPx?: string | undefined;
519
+ }>>]>>>;
520
+ crossMaintenanceMarginUsed: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
521
+ withdrawable: z.ZodOptional<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
522
+ }, z.core.$strip>, z.ZodTransform<{
523
+ marginSummary: {
524
+ accountValue: string;
525
+ totalNtlPos: string;
526
+ totalRawUsd: string;
527
+ totalMarginUsed: string;
528
+ };
529
+ crossMarginSummary: {
530
+ accountValue: string;
531
+ totalNtlPos: string;
532
+ totalRawUsd: string;
533
+ totalMarginUsed: string;
534
+ };
535
+ assetPositions: ({
536
+ position: {
537
+ coin: string;
538
+ szi: string;
539
+ entryPx: string;
540
+ positionValue: string;
541
+ unrealizedPnl: string;
542
+ returnOnEquity: string;
543
+ leverage: {
544
+ type: string;
545
+ value: string;
546
+ } | null;
547
+ liquidationPx: string | null;
548
+ marginUsed: string;
549
+ maxLeverage: number;
550
+ cumFunding: {
551
+ allTime: string;
552
+ sinceChange: string;
553
+ sinceOpen: string;
554
+ };
555
+ markPx?: string | undefined;
556
+ };
557
+ type: string;
558
+ } | {
559
+ position: {
560
+ coin: string;
561
+ szi: string;
562
+ entryPx: string;
563
+ positionValue: string;
564
+ unrealizedPnl: string;
565
+ returnOnEquity: string;
566
+ leverage: {
567
+ type: string;
568
+ value: string;
569
+ } | null;
570
+ liquidationPx: string | null;
571
+ marginUsed: string;
572
+ maxLeverage: number;
573
+ cumFunding: {
574
+ allTime: string;
575
+ sinceChange: string;
576
+ sinceOpen: string;
577
+ };
578
+ markPx?: string | undefined;
579
+ };
580
+ type: string;
581
+ })[];
582
+ crossMaintenanceMarginUsed: string;
583
+ withdrawable: string | undefined;
584
+ }, {
585
+ marginSummary: {
586
+ accountValue: string;
587
+ totalNtlPos: string;
588
+ totalRawUsd: string;
589
+ totalMarginUsed: string;
590
+ };
591
+ crossMarginSummary: {
592
+ accountValue: string;
593
+ totalNtlPos: string;
594
+ totalRawUsd: string;
595
+ totalMarginUsed: string;
596
+ };
597
+ crossMaintenanceMarginUsed: string;
598
+ assetPositions?: ({
599
+ position: {
600
+ coin: string;
601
+ szi: string;
602
+ entryPx: string;
603
+ positionValue: string;
604
+ unrealizedPnl: string;
605
+ returnOnEquity: string;
606
+ leverage: {
607
+ type: string;
608
+ value: string;
609
+ } | null;
610
+ liquidationPx: string | null;
611
+ marginUsed: string;
612
+ maxLeverage: number;
613
+ cumFunding: {
614
+ allTime: string;
615
+ sinceChange: string;
616
+ sinceOpen: string;
617
+ };
618
+ markPx?: string | undefined;
619
+ };
620
+ type: string;
621
+ } | {
622
+ position: {
623
+ coin: string;
624
+ szi: string;
625
+ entryPx: string;
626
+ positionValue: string;
627
+ unrealizedPnl: string;
628
+ returnOnEquity: string;
629
+ leverage: {
630
+ type: string;
631
+ value: string;
632
+ } | null;
633
+ liquidationPx: string | null;
634
+ marginUsed: string;
635
+ maxLeverage: number;
636
+ cumFunding: {
637
+ allTime: string;
638
+ sinceChange: string;
639
+ sinceOpen: string;
640
+ };
641
+ markPx?: string | undefined;
642
+ };
643
+ type: string;
644
+ })[] | undefined;
645
+ positions?: ({
646
+ position: {
647
+ coin: string;
648
+ szi: string;
649
+ entryPx: string;
650
+ positionValue: string;
651
+ unrealizedPnl: string;
652
+ returnOnEquity: string;
653
+ leverage: {
654
+ type: string;
655
+ value: string;
656
+ } | null;
657
+ liquidationPx: string | null;
658
+ marginUsed: string;
659
+ maxLeverage: number;
660
+ cumFunding: {
661
+ allTime: string;
662
+ sinceChange: string;
663
+ sinceOpen: string;
664
+ };
665
+ markPx?: string | undefined;
666
+ };
667
+ type: string;
668
+ } | {
669
+ position: {
670
+ coin: string;
671
+ szi: string;
672
+ entryPx: string;
673
+ positionValue: string;
674
+ unrealizedPnl: string;
675
+ returnOnEquity: string;
676
+ leverage: {
677
+ type: string;
678
+ value: string;
679
+ } | null;
680
+ liquidationPx: string | null;
681
+ marginUsed: string;
682
+ maxLeverage: number;
683
+ cumFunding: {
684
+ allTime: string;
685
+ sinceChange: string;
686
+ sinceOpen: string;
687
+ };
688
+ markPx?: string | undefined;
689
+ };
690
+ type: string;
691
+ })[] | undefined;
692
+ withdrawable?: string | undefined;
693
+ }>>;
694
+ export declare const SpotBalanceSchema: z.ZodObject<{
695
+ coin: z.ZodString;
696
+ hold: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
697
+ total: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
698
+ entryNtl: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
699
+ token: z.ZodNumber;
700
+ }, z.core.$strip>;
701
+ export declare const SpotClearinghouseStateSchema: z.ZodObject<{
702
+ balances: z.ZodArray<z.ZodObject<{
703
+ coin: z.ZodString;
704
+ hold: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
705
+ total: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
706
+ entryNtl: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
707
+ token: z.ZodNumber;
708
+ }, z.core.$strip>>;
709
+ }, z.core.$strip>;
710
+ export declare const OpenOrderSchema: z.ZodObject<{
711
+ coin: z.ZodString;
712
+ limitPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
713
+ oid: z.ZodNumber;
714
+ side: z.ZodString;
715
+ sz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
716
+ timestamp: z.ZodNumber;
717
+ cloid: z.ZodOptional<z.ZodString>;
718
+ }, z.core.$strip>;
719
+ export declare const FrontendOpenOrderSchema: z.ZodObject<{
720
+ coin: z.ZodString;
721
+ side: z.ZodEnum<{
722
+ B: "B";
723
+ A: "A";
724
+ }>;
725
+ limitPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
726
+ sz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
727
+ oid: z.ZodNumber;
728
+ timestamp: z.ZodNumber;
729
+ origSz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
730
+ triggerCondition: z.ZodString;
731
+ isTrigger: z.ZodBoolean;
732
+ triggerPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
733
+ children: z.ZodArray<z.ZodUnknown>;
734
+ isPositionTpsl: z.ZodBoolean;
735
+ reduceOnly: z.ZodBoolean;
736
+ orderType: z.ZodString;
737
+ tif: z.ZodNullable<z.ZodString>;
738
+ cloid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
739
+ }, z.core.$strip>;
740
+ export declare const HistoricalOrderSchema: z.ZodObject<{
741
+ order: z.ZodObject<{
742
+ coin: z.ZodString;
743
+ side: z.ZodEnum<{
744
+ B: "B";
745
+ A: "A";
746
+ }>;
747
+ limitPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
748
+ sz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
749
+ oid: z.ZodNumber;
750
+ timestamp: z.ZodNumber;
751
+ origSz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
752
+ triggerCondition: z.ZodString;
753
+ isTrigger: z.ZodBoolean;
754
+ triggerPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
755
+ children: z.ZodArray<z.ZodUnknown>;
756
+ isPositionTpsl: z.ZodBoolean;
757
+ reduceOnly: z.ZodBoolean;
758
+ orderType: z.ZodString;
759
+ tif: z.ZodNullable<z.ZodString>;
760
+ cloid: z.ZodOptional<z.ZodNullable<z.ZodString>>;
761
+ }, z.core.$strip>;
762
+ status: z.ZodString;
763
+ statusTimestamp: z.ZodNumber;
764
+ }, z.core.$strip>;
765
+ export declare const FillSchema: z.ZodObject<{
766
+ coin: z.ZodString;
767
+ px: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
768
+ sz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
769
+ side: z.ZodString;
770
+ time: z.ZodNumber;
771
+ startPosition: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
772
+ dir: z.ZodString;
773
+ closedPnl: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
774
+ hash: z.ZodString;
775
+ oid: z.ZodNumber;
776
+ crossed: z.ZodBoolean;
777
+ fee: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
778
+ feeToken: z.ZodString;
779
+ tid: z.ZodNumber;
780
+ liquidation: z.ZodOptional<z.ZodBoolean>;
781
+ }, z.core.$strip>;
782
+ export declare const FundingRecordSchema: z.ZodObject<{
783
+ coin: z.ZodString;
784
+ fundingRate: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
785
+ premium: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
786
+ time: z.ZodNumber;
787
+ }, z.core.$strip>;
788
+ export declare const UserFundingEntrySchema: z.ZodObject<{
789
+ time: z.ZodNumber;
790
+ hash: z.ZodString;
791
+ delta: z.ZodObject<{
792
+ type: z.ZodLiteral<"funding">;
793
+ coin: z.ZodString;
794
+ usdc: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
795
+ szi: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
796
+ fundingRate: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
797
+ nSamples: z.ZodNullable<z.ZodNumber>;
798
+ }, z.core.$strip>;
799
+ }, z.core.$strip>;
800
+ export declare const CandleSchema: z.ZodObject<{
801
+ t: z.ZodNumber;
802
+ T: z.ZodNumber;
803
+ s: z.ZodString;
804
+ i: z.ZodString;
805
+ o: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
806
+ c: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
807
+ h: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
808
+ l: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
809
+ v: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
810
+ n: z.ZodNumber;
811
+ }, z.core.$strip>;
812
+ export declare const OrderStatusSchema: z.ZodUnion<readonly [z.ZodObject<{
813
+ filled: z.ZodObject<{
814
+ totalSz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
815
+ avgPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
816
+ oid: z.ZodNumber;
817
+ }, z.core.$strip>;
818
+ }, z.core.$strip>, z.ZodObject<{
819
+ resting: z.ZodObject<{
820
+ oid: z.ZodNumber;
821
+ cloid: z.ZodOptional<z.ZodString>;
822
+ }, z.core.$strip>;
823
+ }, z.core.$strip>, z.ZodObject<{
824
+ error: z.ZodString;
825
+ }, z.core.$strip>, z.ZodLiteral<"waitingForFill">, z.ZodLiteral<"waitingForTrigger">]>;
826
+ export declare const OrderResultSchema: z.ZodObject<{
827
+ statuses: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
828
+ filled: z.ZodObject<{
829
+ totalSz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
830
+ avgPx: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
831
+ oid: z.ZodNumber;
832
+ }, z.core.$strip>;
833
+ }, z.core.$strip>, z.ZodObject<{
834
+ resting: z.ZodObject<{
835
+ oid: z.ZodNumber;
836
+ cloid: z.ZodOptional<z.ZodString>;
837
+ }, z.core.$strip>;
838
+ }, z.core.$strip>, z.ZodObject<{
839
+ error: z.ZodString;
840
+ }, z.core.$strip>, z.ZodLiteral<"waitingForFill">, z.ZodLiteral<"waitingForTrigger">]>>;
841
+ }, z.core.$strip>;
842
+ export declare const ReferralResponseSchema: z.ZodObject<{
843
+ referredBy: z.ZodNullable<z.ZodObject<{
844
+ referrer: z.ZodString;
845
+ code: z.ZodString;
846
+ }, z.core.$strip>>;
847
+ cumVlm: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
848
+ unclaimedRewards: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
849
+ claimedRewards: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
850
+ builderRewards: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
851
+ referrerState: z.ZodUnion<readonly [z.ZodObject<{
852
+ stage: z.ZodLiteral<"ready">;
853
+ data: z.ZodObject<{
854
+ code: z.ZodString;
855
+ nReferrals: z.ZodNumber;
856
+ referralStates: z.ZodArray<z.ZodObject<{
857
+ user: z.ZodString;
858
+ cumVlm: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
859
+ cumRewardedFeesSinceReferred: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
860
+ cumFeesRewardedToReferrer: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
861
+ timeJoined: z.ZodNumber;
862
+ }, z.core.$strip>>;
863
+ }, z.core.$strip>;
864
+ }, z.core.$strip>, z.ZodObject<{
865
+ stage: z.ZodLiteral<"needToCreateCode">;
866
+ }, z.core.$strip>, z.ZodObject<{
867
+ stage: z.ZodLiteral<"needToTrade">;
868
+ data: z.ZodObject<{
869
+ required: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
870
+ }, z.core.$strip>;
871
+ }, z.core.$strip>]>;
872
+ rewardHistory: z.ZodArray<z.ZodObject<{
873
+ earned: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
874
+ vlm: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
875
+ referralVlm: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
876
+ time: z.ZodNumber;
877
+ }, z.core.$strip>>;
878
+ }, z.core.$strip>;
879
+ export declare const L2BookUpdateSchema: z.ZodObject<{
880
+ coin: z.ZodString;
881
+ time: z.ZodNumber;
882
+ levels: z.ZodTuple<[z.ZodArray<z.ZodObject<{
883
+ px: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
884
+ sz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
885
+ n: z.ZodNumber;
886
+ }, z.core.$strip>>, z.ZodArray<z.ZodObject<{
887
+ px: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
888
+ sz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
889
+ n: z.ZodNumber;
890
+ }, z.core.$strip>>], null>;
891
+ }, z.core.$strip>;
892
+ export declare const AllMidsUpdateSchema: z.ZodObject<{
893
+ mids: z.ZodRecord<z.ZodString, z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>>;
894
+ }, z.core.$strip>;
895
+ export declare const TradeSchema: z.ZodObject<{
896
+ coin: z.ZodString;
897
+ side: z.ZodString;
898
+ px: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
899
+ sz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
900
+ time: z.ZodNumber;
901
+ hash: z.ZodString;
902
+ tid: z.ZodNumber;
903
+ }, z.core.$strip>;
904
+ export declare const UserEventSchema: z.ZodObject<{
905
+ fills: z.ZodOptional<z.ZodArray<z.ZodObject<{
906
+ coin: z.ZodString;
907
+ px: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
908
+ sz: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
909
+ side: z.ZodString;
910
+ time: z.ZodNumber;
911
+ startPosition: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
912
+ dir: z.ZodString;
913
+ closedPnl: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
914
+ hash: z.ZodString;
915
+ oid: z.ZodNumber;
916
+ crossed: z.ZodBoolean;
917
+ fee: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
918
+ feeToken: z.ZodString;
919
+ tid: z.ZodNumber;
920
+ liquidation: z.ZodOptional<z.ZodBoolean>;
921
+ }, z.core.$strip>>>;
922
+ funding: z.ZodOptional<z.ZodObject<{
923
+ coin: z.ZodString;
924
+ fundingRate: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
925
+ szi: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
926
+ usdc: z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>, z.ZodTransform<string, string | number>>;
927
+ time: z.ZodNumber;
928
+ hash: z.ZodString;
929
+ nSamples: z.ZodNumber;
930
+ }, z.core.$strip>>;
931
+ liquidation: z.ZodOptional<z.ZodUnknown>;
932
+ }, z.core.$strip>;
933
+ //# sourceMappingURL=schemas.d.ts.map