@proton/wrap-constants 0.2.44 → 0.2.46
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/parsers/dex.d.ts +90 -138
- package/dist/wrap-constants.cjs.development.js +18 -20
- package/dist/wrap-constants.cjs.development.js.map +1 -1
- package/dist/wrap-constants.cjs.production.min.js +1 -1
- package/dist/wrap-constants.cjs.production.min.js.map +1 -1
- package/dist/wrap-constants.esm.js +18 -20
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/parsers/dex.ts +13 -15
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
8
|
-
"version": "0.2.
|
|
8
|
+
"version": "0.2.46",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"main": "dist/index.js",
|
|
11
11
|
"typings": "dist/index.d.ts",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"resolutions": {
|
|
45
45
|
"typescript": "4.5"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "274e1e4b0da06caa731caa67f5d2f4475f5a25cf"
|
|
48
48
|
}
|
package/src/parsers/dex.ts
CHANGED
|
@@ -17,7 +17,7 @@ export const getOhlcvParser = z.object({
|
|
|
17
17
|
from: z.string(),
|
|
18
18
|
to: z.string(),
|
|
19
19
|
symbol: z.string(),
|
|
20
|
-
limit: z.
|
|
20
|
+
limit: z.string().default("500").refine(n => +n <= 1000, 'Max limit is 1000'),
|
|
21
21
|
})
|
|
22
22
|
export type GetOHLCV = z.infer<typeof getOhlcvParser>
|
|
23
23
|
|
|
@@ -50,8 +50,8 @@ export type OrderHistory = z.infer<typeof orderHistoryParser>
|
|
|
50
50
|
export const getOrderHistoryParser = z.object({
|
|
51
51
|
account: z.string(),
|
|
52
52
|
symbol: z.string().optional(),
|
|
53
|
-
offset: z.
|
|
54
|
-
limit: z.
|
|
53
|
+
offset: z.string().default("0"),
|
|
54
|
+
limit: z.string().default("100").refine(n => +n <= 250, 'Max limit is 250'),
|
|
55
55
|
})
|
|
56
56
|
export type GetOrderHistory = z.infer<typeof getOrderHistoryParser>
|
|
57
57
|
|
|
@@ -73,7 +73,7 @@ export type Depth = z.infer<typeof depthParser>
|
|
|
73
73
|
export const getDepthParser = z.object({
|
|
74
74
|
symbol: z.string(),
|
|
75
75
|
step: z.string(),
|
|
76
|
-
limit: z.
|
|
76
|
+
limit: z.string().default("100").refine(n => +n <= 250, 'Max limit is 250'),
|
|
77
77
|
})
|
|
78
78
|
export type GetDepth = z.infer<typeof getDepthParser>
|
|
79
79
|
|
|
@@ -111,18 +111,16 @@ export const marketParser = z.object({
|
|
|
111
111
|
taker_fee: z.number(),
|
|
112
112
|
order_min: z.number(),
|
|
113
113
|
bid_token: z.object({
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
contract: z.string()
|
|
114
|
+
code: z.string(),
|
|
115
|
+
precision: z.number(),
|
|
116
|
+
contract: z.string(),
|
|
117
|
+
multiplier: z.number()
|
|
119
118
|
}),
|
|
120
119
|
ask_token: z.object({
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
precision: z.number(),
|
|
124
|
-
}),
|
|
120
|
+
code: z.string(),
|
|
121
|
+
precision: z.number(),
|
|
125
122
|
contract: z.string(),
|
|
123
|
+
multiplier: z.number()
|
|
126
124
|
})
|
|
127
125
|
})
|
|
128
126
|
export type Market = z.infer<typeof marketParser>
|
|
@@ -156,8 +154,8 @@ export type Trade = z.infer<typeof tradeParser>
|
|
|
156
154
|
|
|
157
155
|
export const getTradesParser = z.object({
|
|
158
156
|
symbol: z.string(),
|
|
159
|
-
offset: z.
|
|
160
|
-
limit: z.
|
|
157
|
+
offset: z.string().default("0"),
|
|
158
|
+
limit: z.string().default("100").refine(n => +n <= 250, 'Max limit is 250'),
|
|
161
159
|
})
|
|
162
160
|
export type GetTrades = z.infer<typeof getTradesParser>
|
|
163
161
|
|