@proton/wrap-constants 0.2.57 → 0.2.59
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 +120 -4
- package/dist/wrap-constants.cjs.development.js +19 -4
- 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 +16 -3
- package/dist/wrap-constants.esm.js.map +1 -1
- package/package.json +2 -2
- package/src/parsers/dex.ts +19 -4
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.59",
|
|
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": "e6a9873e89a90f10e21d8270b9c36e4ceaa1e6a3"
|
|
48
48
|
}
|
package/src/parsers/dex.ts
CHANGED
|
@@ -68,16 +68,16 @@ export const getOrderHistoryResponseParser = z.object({
|
|
|
68
68
|
})
|
|
69
69
|
export type GetOrderHistoryResponse = z.infer<typeof getOrderHistoryResponseParser>
|
|
70
70
|
|
|
71
|
-
export const
|
|
71
|
+
export const getOrderParser = z.object({
|
|
72
72
|
order_id: z.string()
|
|
73
73
|
})
|
|
74
|
-
export type GetOrder = z.infer<typeof
|
|
74
|
+
export type GetOrder = z.infer<typeof getOrderParser>
|
|
75
75
|
|
|
76
|
-
export const
|
|
76
|
+
export const getOrderResponseParser = z.object({
|
|
77
77
|
sync: z.number(),
|
|
78
78
|
data: z.array(orderHistoryParser)
|
|
79
79
|
})
|
|
80
|
-
export type GetOrderResponse = z.infer<typeof
|
|
80
|
+
export type GetOrderResponse = z.infer<typeof getOrderResponseParser>
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
83
|
* Depth
|
|
@@ -194,6 +194,21 @@ export const getTradesResponseParser = z.object({
|
|
|
194
194
|
})
|
|
195
195
|
export type GetTradesResponseParser = z.infer<typeof getTradesResponseParser>
|
|
196
196
|
|
|
197
|
+
export const getTradeHistoryParser = z.object({
|
|
198
|
+
account: z.string(),
|
|
199
|
+
symbol: z.string().optional(),
|
|
200
|
+
offset: z.string().default("0"),
|
|
201
|
+
limit: z.string().default("100").refine(n => +n <= 250, 'Max limit is 250'),
|
|
202
|
+
})
|
|
203
|
+
export type GetTradeHistory = z.infer<typeof getTradeHistoryParser>
|
|
204
|
+
|
|
205
|
+
export const getTradeHistoryResponseParser = z.object({
|
|
206
|
+
sync: z.number(),
|
|
207
|
+
count: z.number(),
|
|
208
|
+
data: z.array(orderHistoryParser)
|
|
209
|
+
})
|
|
210
|
+
export type GetTradeHistoryResponse = z.infer<typeof getTradeHistoryResponseParser>
|
|
211
|
+
|
|
197
212
|
/**
|
|
198
213
|
* SYNC
|
|
199
214
|
*/
|