@nadohq/client 0.15.0 → 0.18.0

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 (253) hide show
  1. package/dist/BaseSpotAPI-BeTjhXT_.d.cts +14 -0
  2. package/dist/BaseSpotAPI-BeTjhXT_.d.cts.map +1 -0
  3. package/dist/BaseSpotAPI-Ck64kyYt.d.ts +14 -0
  4. package/dist/BaseSpotAPI-Ck64kyYt.d.ts.map +1 -0
  5. package/dist/MarketExecuteAPI-BBp0Nn6N.d.cts +55 -0
  6. package/dist/MarketExecuteAPI-BBp0Nn6N.d.cts.map +1 -0
  7. package/dist/MarketExecuteAPI-_S9-rNsv.d.ts +55 -0
  8. package/dist/MarketExecuteAPI-_S9-rNsv.d.ts.map +1 -0
  9. package/dist/MarketQueryAPI-Dhb8hWiD.d.cts +118 -0
  10. package/dist/MarketQueryAPI-Dhb8hWiD.d.cts.map +1 -0
  11. package/dist/MarketQueryAPI-Dz8FrVPK.d.ts +118 -0
  12. package/dist/MarketQueryAPI-Dz8FrVPK.d.ts.map +1 -0
  13. package/dist/PerpExecuteAPI-C0APgWq4.d.cts +7 -0
  14. package/dist/PerpExecuteAPI-C0APgWq4.d.cts.map +1 -0
  15. package/dist/PerpExecuteAPI-DPNJdARF.d.ts +7 -0
  16. package/dist/PerpExecuteAPI-DPNJdARF.d.ts.map +1 -0
  17. package/dist/PerpQueryAPI-RGhdNhoJ.d.cts +19 -0
  18. package/dist/PerpQueryAPI-RGhdNhoJ.d.cts.map +1 -0
  19. package/dist/PerpQueryAPI-tJbMmCcO.d.ts +19 -0
  20. package/dist/PerpQueryAPI-tJbMmCcO.d.ts.map +1 -0
  21. package/dist/SpotExecuteAPI-UWnX_Hm4.d.ts +22 -0
  22. package/dist/SpotExecuteAPI-UWnX_Hm4.d.ts.map +1 -0
  23. package/dist/SpotExecuteAPI-b07ixUz2.d.cts +22 -0
  24. package/dist/SpotExecuteAPI-b07ixUz2.d.cts.map +1 -0
  25. package/dist/SpotQueryAPI-CfZcvt4p.d.ts +36 -0
  26. package/dist/SpotQueryAPI-CfZcvt4p.d.ts.map +1 -0
  27. package/dist/SpotQueryAPI-DS85MzQB.d.cts +36 -0
  28. package/dist/SpotQueryAPI-DS85MzQB.d.cts.map +1 -0
  29. package/dist/SubaccountExecuteAPI-DhHBzzdk.d.cts +21 -0
  30. package/dist/SubaccountExecuteAPI-DhHBzzdk.d.cts.map +1 -0
  31. package/dist/SubaccountExecuteAPI-KApMbONz.d.ts +21 -0
  32. package/dist/SubaccountExecuteAPI-KApMbONz.d.ts.map +1 -0
  33. package/dist/SubaccountQueryAPI-C9h3epmM.d.cts +40 -0
  34. package/dist/SubaccountQueryAPI-C9h3epmM.d.cts.map +1 -0
  35. package/dist/SubaccountQueryAPI-DnLcgfiM.d.ts +40 -0
  36. package/dist/SubaccountQueryAPI-DnLcgfiM.d.ts.map +1 -0
  37. package/dist/WebSocketExecuteAPI-7gLrCoXN.d.cts +44 -0
  38. package/dist/WebSocketExecuteAPI-7gLrCoXN.d.cts.map +1 -0
  39. package/dist/WebSocketExecuteAPI-DHhKag16.d.ts +44 -0
  40. package/dist/WebSocketExecuteAPI-DHhKag16.d.ts.map +1 -0
  41. package/dist/WebSocketQueryAPI-B9vBQo5q.d.ts +20 -0
  42. package/dist/WebSocketQueryAPI-B9vBQo5q.d.ts.map +1 -0
  43. package/dist/WebSocketQueryAPI-BMLp4dCH.d.cts +20 -0
  44. package/dist/WebSocketQueryAPI-BMLp4dCH.d.cts.map +1 -0
  45. package/dist/WebSocketSubscriptionAPI-bApRHac8.d.cts +34 -0
  46. package/dist/WebSocketSubscriptionAPI-bApRHac8.d.cts.map +1 -0
  47. package/dist/WebSocketSubscriptionAPI-qUFRFcRI.d.ts +34 -0
  48. package/dist/WebSocketSubscriptionAPI-qUFRFcRI.d.ts.map +1 -0
  49. package/dist/apis/base.cjs +30 -60
  50. package/dist/apis/base.cjs.map +1 -1
  51. package/dist/apis/base.d.cts +2 -22
  52. package/dist/apis/base.d.ts +2 -22
  53. package/dist/apis/base.js +28 -34
  54. package/dist/apis/base.js.map +1 -1
  55. package/dist/apis/market/MarketExecuteAPI.cjs +164 -190
  56. package/dist/apis/market/MarketExecuteAPI.cjs.map +1 -1
  57. package/dist/apis/market/MarketExecuteAPI.d.cts +2 -61
  58. package/dist/apis/market/MarketExecuteAPI.d.ts +2 -61
  59. package/dist/apis/market/MarketExecuteAPI.js +162 -164
  60. package/dist/apis/market/MarketExecuteAPI.js.map +1 -1
  61. package/dist/apis/market/MarketQueryAPI.cjs +157 -181
  62. package/dist/apis/market/MarketQueryAPI.cjs.map +1 -1
  63. package/dist/apis/market/MarketQueryAPI.d.cts +2 -124
  64. package/dist/apis/market/MarketQueryAPI.d.ts +2 -124
  65. package/dist/apis/market/MarketQueryAPI.js +155 -155
  66. package/dist/apis/market/MarketQueryAPI.js.map +1 -1
  67. package/dist/apis/market/index.cjs +8 -36
  68. package/dist/apis/market/index.cjs.map +1 -1
  69. package/dist/apis/market/index.d.cts +3 -19
  70. package/dist/apis/market/index.d.ts +3 -19
  71. package/dist/apis/market/index.js +6 -8
  72. package/dist/apis/market/index.js.map +1 -1
  73. package/dist/apis/market/types.cjs +0 -19
  74. package/dist/apis/market/types.d.cts +2 -41
  75. package/dist/apis/market/types.d.ts +2 -41
  76. package/dist/apis/market/types.js +1 -1
  77. package/dist/apis/perp/PerpExecuteAPI.cjs +6 -31
  78. package/dist/apis/perp/PerpExecuteAPI.cjs.map +1 -1
  79. package/dist/apis/perp/PerpExecuteAPI.d.cts +2 -12
  80. package/dist/apis/perp/PerpExecuteAPI.d.ts +2 -12
  81. package/dist/apis/perp/PerpExecuteAPI.js +5 -6
  82. package/dist/apis/perp/PerpExecuteAPI.js.map +1 -1
  83. package/dist/apis/perp/PerpQueryAPI.cjs +20 -44
  84. package/dist/apis/perp/PerpQueryAPI.cjs.map +1 -1
  85. package/dist/apis/perp/PerpQueryAPI.d.cts +2 -23
  86. package/dist/apis/perp/PerpQueryAPI.d.ts +2 -23
  87. package/dist/apis/perp/PerpQueryAPI.js +18 -18
  88. package/dist/apis/perp/PerpQueryAPI.js.map +1 -1
  89. package/dist/apis/perp/index.cjs +8 -33
  90. package/dist/apis/perp/index.cjs.map +1 -1
  91. package/dist/apis/perp/index.d.cts +2 -16
  92. package/dist/apis/perp/index.d.ts +2 -16
  93. package/dist/apis/perp/index.js +6 -7
  94. package/dist/apis/perp/index.js.map +1 -1
  95. package/dist/apis/spot/BaseSpotAPI.cjs +21 -51
  96. package/dist/apis/spot/BaseSpotAPI.cjs.map +1 -1
  97. package/dist/apis/spot/BaseSpotAPI.d.cts +2 -18
  98. package/dist/apis/spot/BaseSpotAPI.d.ts +2 -18
  99. package/dist/apis/spot/BaseSpotAPI.js +19 -28
  100. package/dist/apis/spot/BaseSpotAPI.js.map +1 -1
  101. package/dist/apis/spot/SpotExecuteAPI.cjs +72 -104
  102. package/dist/apis/spot/SpotExecuteAPI.cjs.map +1 -1
  103. package/dist/apis/spot/SpotExecuteAPI.d.cts +2 -27
  104. package/dist/apis/spot/SpotExecuteAPI.d.ts +2 -27
  105. package/dist/apis/spot/SpotExecuteAPI.js +70 -85
  106. package/dist/apis/spot/SpotExecuteAPI.js.map +1 -1
  107. package/dist/apis/spot/SpotQueryAPI.cjs +34 -71
  108. package/dist/apis/spot/SpotQueryAPI.cjs.map +1 -1
  109. package/dist/apis/spot/SpotQueryAPI.d.cts +2 -35
  110. package/dist/apis/spot/SpotQueryAPI.d.ts +2 -35
  111. package/dist/apis/spot/SpotQueryAPI.js +32 -45
  112. package/dist/apis/spot/SpotQueryAPI.js.map +1 -1
  113. package/dist/apis/spot/index.cjs +11 -36
  114. package/dist/apis/spot/index.cjs.map +1 -1
  115. package/dist/apis/spot/index.d.cts +3 -23
  116. package/dist/apis/spot/index.d.ts +3 -23
  117. package/dist/apis/spot/index.js +9 -8
  118. package/dist/apis/spot/index.js.map +1 -1
  119. package/dist/apis/spot/types.cjs +0 -19
  120. package/dist/apis/spot/types.d.cts +2 -27
  121. package/dist/apis/spot/types.d.ts +2 -27
  122. package/dist/apis/spot/types.js +1 -1
  123. package/dist/apis/subaccount/SubaccountExecuteAPI.cjs +32 -56
  124. package/dist/apis/subaccount/SubaccountExecuteAPI.cjs.map +1 -1
  125. package/dist/apis/subaccount/SubaccountExecuteAPI.d.cts +2 -26
  126. package/dist/apis/subaccount/SubaccountExecuteAPI.d.ts +2 -26
  127. package/dist/apis/subaccount/SubaccountExecuteAPI.js +30 -30
  128. package/dist/apis/subaccount/SubaccountExecuteAPI.js.map +1 -1
  129. package/dist/apis/subaccount/SubaccountQueryAPI.cjs +48 -72
  130. package/dist/apis/subaccount/SubaccountQueryAPI.cjs.map +1 -1
  131. package/dist/apis/subaccount/SubaccountQueryAPI.d.cts +2 -44
  132. package/dist/apis/subaccount/SubaccountQueryAPI.d.ts +2 -44
  133. package/dist/apis/subaccount/SubaccountQueryAPI.js +46 -46
  134. package/dist/apis/subaccount/SubaccountQueryAPI.js.map +1 -1
  135. package/dist/apis/subaccount/index.cjs +32 -64
  136. package/dist/apis/subaccount/index.cjs.map +1 -1
  137. package/dist/apis/subaccount/index.d.cts +3 -27
  138. package/dist/apis/subaccount/index.d.ts +3 -27
  139. package/dist/apis/subaccount/index.js +30 -39
  140. package/dist/apis/subaccount/index.js.map +1 -1
  141. package/dist/apis/subaccount/types.cjs +0 -19
  142. package/dist/apis/subaccount/types.d.cts +2 -9
  143. package/dist/apis/subaccount/types.d.ts +2 -9
  144. package/dist/apis/subaccount/types.js +1 -1
  145. package/dist/apis/types.cjs +0 -19
  146. package/dist/apis/types.d.cts +2 -9
  147. package/dist/apis/types.d.ts +2 -9
  148. package/dist/apis/types.js +1 -1
  149. package/dist/apis/ws/WebSocketExecuteAPI.cjs +42 -70
  150. package/dist/apis/ws/WebSocketExecuteAPI.cjs.map +1 -1
  151. package/dist/apis/ws/WebSocketExecuteAPI.d.cts +2 -48
  152. package/dist/apis/ws/WebSocketExecuteAPI.d.ts +2 -48
  153. package/dist/apis/ws/WebSocketExecuteAPI.js +40 -44
  154. package/dist/apis/ws/WebSocketExecuteAPI.js.map +1 -1
  155. package/dist/apis/ws/WebSocketQueryAPI.cjs +19 -39
  156. package/dist/apis/ws/WebSocketQueryAPI.cjs.map +1 -1
  157. package/dist/apis/ws/WebSocketQueryAPI.d.cts +2 -23
  158. package/dist/apis/ws/WebSocketQueryAPI.d.ts +2 -23
  159. package/dist/apis/ws/WebSocketQueryAPI.js +17 -13
  160. package/dist/apis/ws/WebSocketQueryAPI.js.map +1 -1
  161. package/dist/apis/ws/WebSocketSubscriptionAPI.cjs +40 -58
  162. package/dist/apis/ws/WebSocketSubscriptionAPI.cjs.map +1 -1
  163. package/dist/apis/ws/WebSocketSubscriptionAPI.d.cts +2 -37
  164. package/dist/apis/ws/WebSocketSubscriptionAPI.d.ts +2 -37
  165. package/dist/apis/ws/WebSocketSubscriptionAPI.js +38 -32
  166. package/dist/apis/ws/WebSocketSubscriptionAPI.js.map +1 -1
  167. package/dist/apis/ws/index.cjs +18 -39
  168. package/dist/apis/ws/index.cjs.map +1 -1
  169. package/dist/apis/ws/index.d.cts +2 -22
  170. package/dist/apis/ws/index.d.ts +2 -22
  171. package/dist/apis/ws/index.js +13 -10
  172. package/dist/apis/ws/index.js.map +1 -1
  173. package/dist/base-B92wTsrc.d.ts +20 -0
  174. package/dist/base-B92wTsrc.d.ts.map +1 -0
  175. package/dist/base-BYkH_-5-.d.cts +20 -0
  176. package/dist/base-BYkH_-5-.d.cts.map +1 -0
  177. package/dist/client.cjs +53 -77
  178. package/dist/client.cjs.map +1 -1
  179. package/dist/client.d.cts +28 -49
  180. package/dist/client.d.cts.map +1 -0
  181. package/dist/client.d.ts +28 -49
  182. package/dist/client.d.ts.map +1 -0
  183. package/dist/client.js +46 -46
  184. package/dist/client.js.map +1 -1
  185. package/dist/context-YHVv2kD4.d.cts +44 -0
  186. package/dist/context-YHVv2kD4.d.cts.map +1 -0
  187. package/dist/context-YfcGQ0Sr.d.ts +44 -0
  188. package/dist/context-YfcGQ0Sr.d.ts.map +1 -0
  189. package/dist/context.cjs +92 -122
  190. package/dist/context.cjs.map +1 -1
  191. package/dist/context.d.cts +2 -42
  192. package/dist/context.d.ts +2 -42
  193. package/dist/context.js +90 -105
  194. package/dist/context.js.map +1 -1
  195. package/dist/createNadoClient.cjs +15 -32
  196. package/dist/createNadoClient.cjs.map +1 -1
  197. package/dist/createNadoClient.d.cts +5 -32
  198. package/dist/createNadoClient.d.cts.map +1 -0
  199. package/dist/createNadoClient.d.ts +5 -32
  200. package/dist/createNadoClient.d.ts.map +1 -0
  201. package/dist/createNadoClient.js +13 -8
  202. package/dist/createNadoClient.js.map +1 -1
  203. package/dist/index-BFQPcj2w.d.cts +9 -0
  204. package/dist/index-BFQPcj2w.d.cts.map +1 -0
  205. package/dist/index-CSG04f_b.d.cts +12 -0
  206. package/dist/index-CSG04f_b.d.cts.map +1 -0
  207. package/dist/index-Cc2RdeRK.d.cts +19 -0
  208. package/dist/index-Cc2RdeRK.d.cts.map +1 -0
  209. package/dist/index-DIX4yJe-.d.ts +9 -0
  210. package/dist/index-DIX4yJe-.d.ts.map +1 -0
  211. package/dist/index-DVJ1Mu6s.d.ts +9 -0
  212. package/dist/index-DVJ1Mu6s.d.ts.map +1 -0
  213. package/dist/index-DkTJs2nZ.d.cts +9 -0
  214. package/dist/index-DkTJs2nZ.d.cts.map +1 -0
  215. package/dist/index-Dw9iFeeU.d.ts +19 -0
  216. package/dist/index-Dw9iFeeU.d.ts.map +1 -0
  217. package/dist/index-Mhjd1FK8.d.ts +12 -0
  218. package/dist/index-Mhjd1FK8.d.ts.map +1 -0
  219. package/dist/index-RtQYDuRY.d.ts +19 -0
  220. package/dist/index-RtQYDuRY.d.ts.map +1 -0
  221. package/dist/index-jTtf55U_.d.cts +19 -0
  222. package/dist/index-jTtf55U_.d.cts.map +1 -0
  223. package/dist/index.cjs +50 -44
  224. package/dist/index.d.cts +15 -32
  225. package/dist/index.d.ts +15 -32
  226. package/dist/index.js +9 -10
  227. package/dist/types-B-tOIIKl.d.ts +29 -0
  228. package/dist/types-B-tOIIKl.d.ts.map +1 -0
  229. package/dist/types-B6oFoDTo.d.ts +11 -0
  230. package/dist/types-B6oFoDTo.d.ts.map +1 -0
  231. package/dist/types-BFFzjzRy.d.ts +43 -0
  232. package/dist/types-BFFzjzRy.d.ts.map +1 -0
  233. package/dist/types-BWRdhQd_.d.cts +11 -0
  234. package/dist/types-BWRdhQd_.d.cts.map +1 -0
  235. package/dist/types-C5DKLOen.d.ts +11 -0
  236. package/dist/types-C5DKLOen.d.ts.map +1 -0
  237. package/dist/types-CCj4QJO8.d.cts +29 -0
  238. package/dist/types-CCj4QJO8.d.cts.map +1 -0
  239. package/dist/types-D27__G6_.d.cts +11 -0
  240. package/dist/types-D27__G6_.d.cts.map +1 -0
  241. package/dist/types-YBdM1sun.d.cts +43 -0
  242. package/dist/types-YBdM1sun.d.cts.map +1 -0
  243. package/package.json +11 -11
  244. package/dist/apis/market/types.cjs.map +0 -1
  245. package/dist/apis/market/types.js.map +0 -1
  246. package/dist/apis/spot/types.cjs.map +0 -1
  247. package/dist/apis/spot/types.js.map +0 -1
  248. package/dist/apis/subaccount/types.cjs.map +0 -1
  249. package/dist/apis/subaccount/types.js.map +0 -1
  250. package/dist/apis/types.cjs.map +0 -1
  251. package/dist/apis/types.js.map +0 -1
  252. package/dist/index.cjs.map +0 -1
  253. package/dist/index.js.map +0 -1
@@ -1,184 +1,160 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_apis_base = require("../base.cjs");
3
+ //#region src/apis/market/MarketQueryAPI.ts
4
+ var MarketQueryAPI = class extends require_apis_base.BaseNadoAPI {
5
+ /**
6
+ * Retrieves all market states from the offchain engine
7
+ */
8
+ async getAllMarkets() {
9
+ return this.context.engineClient.getAllMarkets();
10
+ }
11
+ /**
12
+ * Get all edge engine markets
13
+ */
14
+ async getEdgeAllMarkets() {
15
+ return this.context.engineClient.getEdgeAllMarkets();
16
+ }
17
+ /**
18
+ * Retrieves all spread health groups
19
+ */
20
+ async getHealthGroups() {
21
+ return this.context.engineClient.getHealthGroups();
22
+ }
23
+ /**
24
+ * Queries engine to determine if the order can be submitted within health requirements
25
+ */
26
+ async validateOrderParams(params) {
27
+ return this.context.engineClient.validateOrderParams(params);
28
+ }
29
+ /**
30
+ * Queries the offchain engine to retrieve status of any open orders for the given subaccount
31
+ * @param params
32
+ */
33
+ async getOpenSubaccountOrders(params) {
34
+ return this.context.engineClient.getSubaccountOrders(params);
35
+ }
36
+ /**
37
+ * Queries the offchain engine to retrieve status of any open orders for the given subaccount for multiple products
38
+ * @param params
39
+ */
40
+ async getOpenSubaccountMultiProductOrders(params) {
41
+ return this.context.engineClient.getSubaccountMultiProductOrders(params);
42
+ }
43
+ /**
44
+ * Queries the offchain trigger service to list trigger orders. Requires a signature
45
+ * @param params
46
+ */
47
+ async getTriggerOrders(params) {
48
+ return this.context.triggerClient.listOrders({
49
+ ...params,
50
+ chainId: this.getWalletClientChainIdIfNeeded(params),
51
+ verifyingAddr: params.verifyingAddr ?? this.getEndpointAddress()
52
+ });
53
+ }
54
+ /**
55
+ * Queries indexer to fetch historical orders
56
+ *
57
+ * @param params
58
+ */
59
+ async getHistoricalOrders(params) {
60
+ return this.context.indexerClient.getOrders(params);
61
+ }
62
+ /**
63
+ * Queries engine to determine maximum order size
64
+ * @param params
65
+ */
66
+ async getMaxOrderSize(params) {
67
+ return this.context.engineClient.getMaxOrderSize(params);
68
+ }
69
+ /**
70
+ * Retrieves liquidity per price tick from the engine. The engine will skip price levels that have no liquidity,
71
+ * so it is not guaranteed that the bids/asks are evenly spaced
72
+ */
73
+ async getMarketLiquidity(params) {
74
+ return this.context.engineClient.getMarketLiquidity(params);
75
+ }
76
+ /**
77
+ * Historical candlesticks from the indexer, use getLatestMarketPrice for the latest orderbook prices
78
+ *
79
+ * @param params
80
+ */
81
+ async getCandlesticks(params) {
82
+ return this.context.indexerClient.getCandlesticks(params);
83
+ }
84
+ /**
85
+ * Historical candlesticks from Edge, use getLatestMarketPrice for the latest orderbook prices
86
+ *
87
+ * @param params
88
+ */
89
+ async getEdgeCandlesticks(params) {
90
+ return this.context.indexerClient.getEdgeCandlesticks(params);
91
+ }
92
+ /**
93
+ * Retrieves the latest off-chain orderbook price from the engine
94
+ *
95
+ * @param params
96
+ */
97
+ async getLatestMarketPrice(params) {
98
+ return this.context.engineClient.getMarketPrice(params);
99
+ }
100
+ /**
101
+ * Retrieves the latest off-chain orderbook price from the engine for multiple markets
102
+ *
103
+ * @param params
104
+ */
105
+ async getLatestMarketPrices(params) {
106
+ return this.context.engineClient.getMarketPrices(params);
107
+ }
108
+ /**
109
+ * Retrieves the latest funding rate for a perp product
110
+ *
111
+ * @param params
112
+ */
113
+ async getFundingRate(params) {
114
+ return this.context.indexerClient.getFundingRate(params);
115
+ }
116
+ /**
117
+ * Retrieves the latest funding rate for multiple perp products
118
+ *
119
+ * @param params
120
+ */
121
+ async getMultiProductFundingRates(params) {
122
+ return this.context.indexerClient.getMultiProductFundingRates(params);
123
+ }
124
+ /**
125
+ * Retrieves the historical snapshots for a product from the indexer
126
+ *
127
+ * @param params
128
+ */
129
+ async getProductSnapshots(params) {
130
+ return this.context.indexerClient.getProductSnapshots(params);
131
+ }
132
+ /**
133
+ * Retrieves the historical snapshots for a market from the indexer
134
+ *
135
+ * @param params
136
+ */
137
+ async getMarketSnapshots(params) {
138
+ return this.context.indexerClient.getMarketSnapshots(params);
139
+ }
140
+ /**
141
+ * Retrieves the historical snapshots for a market from Edge
142
+ *
143
+ * @param params
144
+ */
145
+ async getEdgeMarketSnapshots(params) {
146
+ return this.context.indexerClient.getEdgeMarketSnapshots(params);
147
+ }
148
+ /**
149
+ * Retrieves the historical snapshots for multiple products from the indexer
150
+ *
151
+ * @param params
152
+ */
153
+ async getMultiProductSnapshots(params) {
154
+ return this.context.indexerClient.getMultiProductSnapshots(params);
155
+ }
9
156
  };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
157
+ //#endregion
158
+ exports.MarketQueryAPI = MarketQueryAPI;
19
159
 
20
- // src/apis/market/MarketQueryAPI.ts
21
- var MarketQueryAPI_exports = {};
22
- __export(MarketQueryAPI_exports, {
23
- MarketQueryAPI: () => MarketQueryAPI
24
- });
25
- module.exports = __toCommonJS(MarketQueryAPI_exports);
26
- var import_base = require("../base.cjs");
27
- var MarketQueryAPI = class extends import_base.BaseNadoAPI {
28
- /**
29
- * Retrieves all market states from the offchain engine
30
- */
31
- async getAllMarkets() {
32
- return this.context.engineClient.getAllMarkets();
33
- }
34
- /**
35
- * Get all edge engine markets
36
- */
37
- async getEdgeAllMarkets() {
38
- return this.context.engineClient.getEdgeAllMarkets();
39
- }
40
- /**
41
- * Retrieves all spread health groups
42
- */
43
- async getHealthGroups() {
44
- return this.context.engineClient.getHealthGroups();
45
- }
46
- /**
47
- * Queries engine to determine if the order can be submitted within health requirements
48
- */
49
- async validateOrderParams(params) {
50
- return this.context.engineClient.validateOrderParams(params);
51
- }
52
- /**
53
- * Queries the offchain engine to retrieve status of any open orders for the given subaccount
54
- * @param params
55
- */
56
- async getOpenSubaccountOrders(params) {
57
- return this.context.engineClient.getSubaccountOrders(params);
58
- }
59
- /**
60
- * Queries the offchain engine to retrieve status of any open orders for the given subaccount for multiple products
61
- * @param params
62
- */
63
- async getOpenSubaccountMultiProductOrders(params) {
64
- return this.context.engineClient.getSubaccountMultiProductOrders(params);
65
- }
66
- /**
67
- * Queries the offchain trigger service to list trigger orders. Requires a signature
68
- * @param params
69
- */
70
- async getTriggerOrders(params) {
71
- return this.context.triggerClient.listOrders({
72
- ...params,
73
- chainId: this.getWalletClientChainIdIfNeeded(params),
74
- verifyingAddr: params.verifyingAddr ?? this.getEndpointAddress()
75
- });
76
- }
77
- /**
78
- * Queries indexer to fetch historical orders
79
- *
80
- * @param params
81
- */
82
- async getHistoricalOrders(params) {
83
- return this.context.indexerClient.getOrders(params);
84
- }
85
- /**
86
- * Queries engine to determine maximum order size
87
- * @param params
88
- */
89
- async getMaxOrderSize(params) {
90
- return this.context.engineClient.getMaxOrderSize(params);
91
- }
92
- /**
93
- * Retrieves liquidity per price tick from the engine. The engine will skip price levels that have no liquidity,
94
- * so it is not guaranteed that the bids/asks are evenly spaced
95
- */
96
- async getMarketLiquidity(params) {
97
- return this.context.engineClient.getMarketLiquidity(params);
98
- }
99
- /**
100
- * Historical candlesticks from the indexer, use getLatestMarketPrice for the latest orderbook prices
101
- *
102
- * @param params
103
- */
104
- async getCandlesticks(params) {
105
- return this.context.indexerClient.getCandlesticks(params);
106
- }
107
- /**
108
- * Historical candlesticks from Edge, use getLatestMarketPrice for the latest orderbook prices
109
- *
110
- * @param params
111
- */
112
- async getEdgeCandlesticks(params) {
113
- return this.context.indexerClient.getEdgeCandlesticks(params);
114
- }
115
- /**
116
- * Retrieves the latest off-chain orderbook price from the engine
117
- *
118
- * @param params
119
- */
120
- async getLatestMarketPrice(params) {
121
- return this.context.engineClient.getMarketPrice(params);
122
- }
123
- /**
124
- * Retrieves the latest off-chain orderbook price from the engine for multiple markets
125
- *
126
- * @param params
127
- */
128
- async getLatestMarketPrices(params) {
129
- return this.context.engineClient.getMarketPrices(params);
130
- }
131
- /**
132
- * Retrieves the latest funding rate for a perp product
133
- *
134
- * @param params
135
- */
136
- async getFundingRate(params) {
137
- return this.context.indexerClient.getFundingRate(params);
138
- }
139
- /**
140
- * Retrieves the latest funding rate for multiple perp products
141
- *
142
- * @param params
143
- */
144
- async getMultiProductFundingRates(params) {
145
- return this.context.indexerClient.getMultiProductFundingRates(params);
146
- }
147
- /**
148
- * Retrieves the historical snapshots for a product from the indexer
149
- *
150
- * @param params
151
- */
152
- async getProductSnapshots(params) {
153
- return this.context.indexerClient.getProductSnapshots(params);
154
- }
155
- /**
156
- * Retrieves the historical snapshots for a market from the indexer
157
- *
158
- * @param params
159
- */
160
- async getMarketSnapshots(params) {
161
- return this.context.indexerClient.getMarketSnapshots(params);
162
- }
163
- /**
164
- * Retrieves the historical snapshots for a market from Edge
165
- *
166
- * @param params
167
- */
168
- async getEdgeMarketSnapshots(params) {
169
- return this.context.indexerClient.getEdgeMarketSnapshots(params);
170
- }
171
- /**
172
- * Retrieves the historical snapshots for multiple products from the indexer
173
- *
174
- * @param params
175
- */
176
- async getMultiProductSnapshots(params) {
177
- return this.context.indexerClient.getMultiProductSnapshots(params);
178
- }
179
- };
180
- // Annotate the CommonJS export names for ESM import in node:
181
- 0 && (module.exports = {
182
- MarketQueryAPI
183
- });
184
160
  //# sourceMappingURL=MarketQueryAPI.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/apis/market/MarketQueryAPI.ts"],"sourcesContent":["import {\n GetEngineAllMarketsResponse,\n GetEngineMarketLiquidityParams,\n GetEngineMarketPriceParams,\n GetEngineMarketPricesParams,\n GetEngineMaxOrderSizeParams,\n GetEngineSubaccountOrdersParams,\n GetEngineSubaccountProductOrdersParams,\n ValidateEngineOrderParams,\n} from '@nadohq/engine-client';\nimport {\n GetIndexerCandlesticksParams,\n GetIndexerEdgeCandlesticksParams,\n GetIndexerEdgeMarketSnapshotsParams,\n GetIndexerFundingRateParams,\n GetIndexerMarketSnapshotsParams,\n GetIndexerMultiProductFundingRatesParams,\n GetIndexerMultiProductSnapshotsParams,\n GetIndexerOrdersParams,\n GetIndexerOrdersResponse,\n GetIndexerProductSnapshotsParams,\n} from '@nadohq/indexer-client';\nimport { BaseNadoAPI } from '../base';\nimport { GetTriggerOrdersParams } from './types';\n\nexport class MarketQueryAPI extends BaseNadoAPI {\n /**\n * Retrieves all market states from the offchain engine\n */\n async getAllMarkets(): Promise<GetEngineAllMarketsResponse> {\n return this.context.engineClient.getAllMarkets();\n }\n\n /**\n * Get all edge engine markets\n */\n async getEdgeAllMarkets(): Promise<\n Record<number, GetEngineAllMarketsResponse>\n > {\n return this.context.engineClient.getEdgeAllMarkets();\n }\n\n /**\n * Retrieves all spread health groups\n */\n async getHealthGroups() {\n return this.context.engineClient.getHealthGroups();\n }\n\n /**\n * Queries engine to determine if the order can be submitted within health requirements\n */\n async validateOrderParams(params: ValidateEngineOrderParams) {\n return this.context.engineClient.validateOrderParams(params);\n }\n\n /**\n * Queries the offchain engine to retrieve status of any open orders for the given subaccount\n * @param params\n */\n async getOpenSubaccountOrders(params: GetEngineSubaccountOrdersParams) {\n return this.context.engineClient.getSubaccountOrders(params);\n }\n\n /**\n * Queries the offchain engine to retrieve status of any open orders for the given subaccount for multiple products\n * @param params\n */\n async getOpenSubaccountMultiProductOrders(\n params: GetEngineSubaccountProductOrdersParams,\n ) {\n return this.context.engineClient.getSubaccountMultiProductOrders(params);\n }\n\n /**\n * Queries the offchain trigger service to list trigger orders. Requires a signature\n * @param params\n */\n async getTriggerOrders(params: GetTriggerOrdersParams) {\n return this.context.triggerClient.listOrders({\n ...params,\n chainId: this.getWalletClientChainIdIfNeeded(params),\n verifyingAddr: params.verifyingAddr ?? this.getEndpointAddress(),\n });\n }\n\n /**\n * Queries indexer to fetch historical orders\n *\n * @param params\n */\n async getHistoricalOrders(\n params: GetIndexerOrdersParams,\n ): Promise<GetIndexerOrdersResponse> {\n return this.context.indexerClient.getOrders(params);\n }\n\n /**\n * Queries engine to determine maximum order size\n * @param params\n */\n async getMaxOrderSize(params: GetEngineMaxOrderSizeParams) {\n return this.context.engineClient.getMaxOrderSize(params);\n }\n\n /**\n * Retrieves liquidity per price tick from the engine. The engine will skip price levels that have no liquidity,\n * so it is not guaranteed that the bids/asks are evenly spaced\n */\n async getMarketLiquidity(params: GetEngineMarketLiquidityParams) {\n return this.context.engineClient.getMarketLiquidity(params);\n }\n\n /**\n * Historical candlesticks from the indexer, use getLatestMarketPrice for the latest orderbook prices\n *\n * @param params\n */\n async getCandlesticks(params: GetIndexerCandlesticksParams) {\n return this.context.indexerClient.getCandlesticks(params);\n }\n\n /**\n * Historical candlesticks from Edge, use getLatestMarketPrice for the latest orderbook prices\n *\n * @param params\n */\n async getEdgeCandlesticks(params: GetIndexerEdgeCandlesticksParams) {\n return this.context.indexerClient.getEdgeCandlesticks(params);\n }\n\n /**\n * Retrieves the latest off-chain orderbook price from the engine\n *\n * @param params\n */\n async getLatestMarketPrice(params: GetEngineMarketPriceParams) {\n return this.context.engineClient.getMarketPrice(params);\n }\n\n /**\n * Retrieves the latest off-chain orderbook price from the engine for multiple markets\n *\n * @param params\n */\n async getLatestMarketPrices(params: GetEngineMarketPricesParams) {\n return this.context.engineClient.getMarketPrices(params);\n }\n\n /**\n * Retrieves the latest funding rate for a perp product\n *\n * @param params\n */\n async getFundingRate(params: GetIndexerFundingRateParams) {\n return this.context.indexerClient.getFundingRate(params);\n }\n\n /**\n * Retrieves the latest funding rate for multiple perp products\n *\n * @param params\n */\n async getMultiProductFundingRates(\n params: GetIndexerMultiProductFundingRatesParams,\n ) {\n return this.context.indexerClient.getMultiProductFundingRates(params);\n }\n\n /**\n * Retrieves the historical snapshots for a product from the indexer\n *\n * @param params\n */\n async getProductSnapshots(params: GetIndexerProductSnapshotsParams) {\n return this.context.indexerClient.getProductSnapshots(params);\n }\n\n /**\n * Retrieves the historical snapshots for a market from the indexer\n *\n * @param params\n */\n async getMarketSnapshots(params: GetIndexerMarketSnapshotsParams) {\n return this.context.indexerClient.getMarketSnapshots(params);\n }\n\n /**\n * Retrieves the historical snapshots for a market from Edge\n *\n * @param params\n */\n async getEdgeMarketSnapshots(params: GetIndexerEdgeMarketSnapshotsParams) {\n return this.context.indexerClient.getEdgeMarketSnapshots(params);\n }\n\n /**\n * Retrieves the historical snapshots for multiple products from the indexer\n *\n * @param params\n */\n async getMultiProductSnapshots(\n params: GetIndexerMultiProductSnapshotsParams,\n ) {\n return this.context.indexerClient.getMultiProductSnapshots(params);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsBA,kBAA4B;AAGrB,IAAM,iBAAN,cAA6B,wBAAY;AAAA;AAAA;AAAA;AAAA,EAI9C,MAAM,gBAAsD;AAC1D,WAAO,KAAK,QAAQ,aAAa,cAAc;AAAA,EACjD;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,oBAEJ;AACA,WAAO,KAAK,QAAQ,aAAa,kBAAkB;AAAA,EACrD;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,kBAAkB;AACtB,WAAO,KAAK,QAAQ,aAAa,gBAAgB;AAAA,EACnD;AAAA;AAAA;AAAA;AAAA,EAKA,MAAM,oBAAoB,QAAmC;AAC3D,WAAO,KAAK,QAAQ,aAAa,oBAAoB,MAAM;AAAA,EAC7D;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,wBAAwB,QAAyC;AACrE,WAAO,KAAK,QAAQ,aAAa,oBAAoB,MAAM;AAAA,EAC7D;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,oCACJ,QACA;AACA,WAAO,KAAK,QAAQ,aAAa,gCAAgC,MAAM;AAAA,EACzE;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,iBAAiB,QAAgC;AACrD,WAAO,KAAK,QAAQ,cAAc,WAAW;AAAA,MAC3C,GAAG;AAAA,MACH,SAAS,KAAK,+BAA+B,MAAM;AAAA,MACnD,eAAe,OAAO,iBAAiB,KAAK,mBAAmB;AAAA,IACjE,CAAC;AAAA,EACH;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,oBACJ,QACmC;AACnC,WAAO,KAAK,QAAQ,cAAc,UAAU,MAAM;AAAA,EACpD;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,gBAAgB,QAAqC;AACzD,WAAO,KAAK,QAAQ,aAAa,gBAAgB,MAAM;AAAA,EACzD;AAAA;AAAA;AAAA;AAAA;AAAA,EAMA,MAAM,mBAAmB,QAAwC;AAC/D,WAAO,KAAK,QAAQ,aAAa,mBAAmB,MAAM;AAAA,EAC5D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,gBAAgB,QAAsC;AAC1D,WAAO,KAAK,QAAQ,cAAc,gBAAgB,MAAM;AAAA,EAC1D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,oBAAoB,QAA0C;AAClE,WAAO,KAAK,QAAQ,cAAc,oBAAoB,MAAM;AAAA,EAC9D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,qBAAqB,QAAoC;AAC7D,WAAO,KAAK,QAAQ,aAAa,eAAe,MAAM;AAAA,EACxD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,sBAAsB,QAAqC;AAC/D,WAAO,KAAK,QAAQ,aAAa,gBAAgB,MAAM;AAAA,EACzD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,eAAe,QAAqC;AACxD,WAAO,KAAK,QAAQ,cAAc,eAAe,MAAM;AAAA,EACzD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,4BACJ,QACA;AACA,WAAO,KAAK,QAAQ,cAAc,4BAA4B,MAAM;AAAA,EACtE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,oBAAoB,QAA0C;AAClE,WAAO,KAAK,QAAQ,cAAc,oBAAoB,MAAM;AAAA,EAC9D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,mBAAmB,QAAyC;AAChE,WAAO,KAAK,QAAQ,cAAc,mBAAmB,MAAM;AAAA,EAC7D;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,uBAAuB,QAA6C;AACxE,WAAO,KAAK,QAAQ,cAAc,uBAAuB,MAAM;AAAA,EACjE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,MAAM,yBACJ,QACA;AACA,WAAO,KAAK,QAAQ,cAAc,yBAAyB,MAAM;AAAA,EACnE;AACF;","names":[]}
1
+ {"version":3,"file":"MarketQueryAPI.cjs","names":["BaseNadoAPI"],"sources":["../../../src/apis/market/MarketQueryAPI.ts"],"sourcesContent":["import {\n GetEngineAllMarketsResponse,\n GetEngineMarketLiquidityParams,\n GetEngineMarketPriceParams,\n GetEngineMarketPricesParams,\n GetEngineMaxOrderSizeParams,\n GetEngineSubaccountOrdersParams,\n GetEngineSubaccountProductOrdersParams,\n ValidateEngineOrderParams,\n} from '@nadohq/engine-client';\nimport {\n GetIndexerCandlesticksParams,\n GetIndexerEdgeCandlesticksParams,\n GetIndexerEdgeMarketSnapshotsParams,\n GetIndexerFundingRateParams,\n GetIndexerMarketSnapshotsParams,\n GetIndexerMultiProductFundingRatesParams,\n GetIndexerMultiProductSnapshotsParams,\n GetIndexerOrdersParams,\n GetIndexerOrdersResponse,\n GetIndexerProductSnapshotsParams,\n} from '@nadohq/indexer-client';\nimport { BaseNadoAPI } from '../base';\nimport { GetTriggerOrdersParams } from './types';\n\nexport class MarketQueryAPI extends BaseNadoAPI {\n /**\n * Retrieves all market states from the offchain engine\n */\n async getAllMarkets(): Promise<GetEngineAllMarketsResponse> {\n return this.context.engineClient.getAllMarkets();\n }\n\n /**\n * Get all edge engine markets\n */\n async getEdgeAllMarkets(): Promise<\n Record<number, GetEngineAllMarketsResponse>\n > {\n return this.context.engineClient.getEdgeAllMarkets();\n }\n\n /**\n * Retrieves all spread health groups\n */\n async getHealthGroups() {\n return this.context.engineClient.getHealthGroups();\n }\n\n /**\n * Queries engine to determine if the order can be submitted within health requirements\n */\n async validateOrderParams(params: ValidateEngineOrderParams) {\n return this.context.engineClient.validateOrderParams(params);\n }\n\n /**\n * Queries the offchain engine to retrieve status of any open orders for the given subaccount\n * @param params\n */\n async getOpenSubaccountOrders(params: GetEngineSubaccountOrdersParams) {\n return this.context.engineClient.getSubaccountOrders(params);\n }\n\n /**\n * Queries the offchain engine to retrieve status of any open orders for the given subaccount for multiple products\n * @param params\n */\n async getOpenSubaccountMultiProductOrders(\n params: GetEngineSubaccountProductOrdersParams,\n ) {\n return this.context.engineClient.getSubaccountMultiProductOrders(params);\n }\n\n /**\n * Queries the offchain trigger service to list trigger orders. Requires a signature\n * @param params\n */\n async getTriggerOrders(params: GetTriggerOrdersParams) {\n return this.context.triggerClient.listOrders({\n ...params,\n chainId: this.getWalletClientChainIdIfNeeded(params),\n verifyingAddr: params.verifyingAddr ?? this.getEndpointAddress(),\n });\n }\n\n /**\n * Queries indexer to fetch historical orders\n *\n * @param params\n */\n async getHistoricalOrders(\n params: GetIndexerOrdersParams,\n ): Promise<GetIndexerOrdersResponse> {\n return this.context.indexerClient.getOrders(params);\n }\n\n /**\n * Queries engine to determine maximum order size\n * @param params\n */\n async getMaxOrderSize(params: GetEngineMaxOrderSizeParams) {\n return this.context.engineClient.getMaxOrderSize(params);\n }\n\n /**\n * Retrieves liquidity per price tick from the engine. The engine will skip price levels that have no liquidity,\n * so it is not guaranteed that the bids/asks are evenly spaced\n */\n async getMarketLiquidity(params: GetEngineMarketLiquidityParams) {\n return this.context.engineClient.getMarketLiquidity(params);\n }\n\n /**\n * Historical candlesticks from the indexer, use getLatestMarketPrice for the latest orderbook prices\n *\n * @param params\n */\n async getCandlesticks(params: GetIndexerCandlesticksParams) {\n return this.context.indexerClient.getCandlesticks(params);\n }\n\n /**\n * Historical candlesticks from Edge, use getLatestMarketPrice for the latest orderbook prices\n *\n * @param params\n */\n async getEdgeCandlesticks(params: GetIndexerEdgeCandlesticksParams) {\n return this.context.indexerClient.getEdgeCandlesticks(params);\n }\n\n /**\n * Retrieves the latest off-chain orderbook price from the engine\n *\n * @param params\n */\n async getLatestMarketPrice(params: GetEngineMarketPriceParams) {\n return this.context.engineClient.getMarketPrice(params);\n }\n\n /**\n * Retrieves the latest off-chain orderbook price from the engine for multiple markets\n *\n * @param params\n */\n async getLatestMarketPrices(params: GetEngineMarketPricesParams) {\n return this.context.engineClient.getMarketPrices(params);\n }\n\n /**\n * Retrieves the latest funding rate for a perp product\n *\n * @param params\n */\n async getFundingRate(params: GetIndexerFundingRateParams) {\n return this.context.indexerClient.getFundingRate(params);\n }\n\n /**\n * Retrieves the latest funding rate for multiple perp products\n *\n * @param params\n */\n async getMultiProductFundingRates(\n params: GetIndexerMultiProductFundingRatesParams,\n ) {\n return this.context.indexerClient.getMultiProductFundingRates(params);\n }\n\n /**\n * Retrieves the historical snapshots for a product from the indexer\n *\n * @param params\n */\n async getProductSnapshots(params: GetIndexerProductSnapshotsParams) {\n return this.context.indexerClient.getProductSnapshots(params);\n }\n\n /**\n * Retrieves the historical snapshots for a market from the indexer\n *\n * @param params\n */\n async getMarketSnapshots(params: GetIndexerMarketSnapshotsParams) {\n return this.context.indexerClient.getMarketSnapshots(params);\n }\n\n /**\n * Retrieves the historical snapshots for a market from Edge\n *\n * @param params\n */\n async getEdgeMarketSnapshots(params: GetIndexerEdgeMarketSnapshotsParams) {\n return this.context.indexerClient.getEdgeMarketSnapshots(params);\n }\n\n /**\n * Retrieves the historical snapshots for multiple products from the indexer\n *\n * @param params\n */\n async getMultiProductSnapshots(\n params: GetIndexerMultiProductSnapshotsParams,\n ) {\n return this.context.indexerClient.getMultiProductSnapshots(params);\n }\n}\n"],"mappings":";;;AAyBA,IAAa,iBAAb,cAAoCA,kBAAAA,YAAY;;;;CAI9C,MAAM,gBAAsD;EAC1D,OAAO,KAAK,QAAQ,aAAa,cAAc;CACjD;;;;CAKA,MAAM,oBAEJ;EACA,OAAO,KAAK,QAAQ,aAAa,kBAAkB;CACrD;;;;CAKA,MAAM,kBAAkB;EACtB,OAAO,KAAK,QAAQ,aAAa,gBAAgB;CACnD;;;;CAKA,MAAM,oBAAoB,QAAmC;EAC3D,OAAO,KAAK,QAAQ,aAAa,oBAAoB,MAAM;CAC7D;;;;;CAMA,MAAM,wBAAwB,QAAyC;EACrE,OAAO,KAAK,QAAQ,aAAa,oBAAoB,MAAM;CAC7D;;;;;CAMA,MAAM,oCACJ,QACA;EACA,OAAO,KAAK,QAAQ,aAAa,gCAAgC,MAAM;CACzE;;;;;CAMA,MAAM,iBAAiB,QAAgC;EACrD,OAAO,KAAK,QAAQ,cAAc,WAAW;GAC3C,GAAG;GACH,SAAS,KAAK,+BAA+B,MAAM;GACnD,eAAe,OAAO,iBAAiB,KAAK,mBAAmB;EACjE,CAAC;CACH;;;;;;CAOA,MAAM,oBACJ,QACmC;EACnC,OAAO,KAAK,QAAQ,cAAc,UAAU,MAAM;CACpD;;;;;CAMA,MAAM,gBAAgB,QAAqC;EACzD,OAAO,KAAK,QAAQ,aAAa,gBAAgB,MAAM;CACzD;;;;;CAMA,MAAM,mBAAmB,QAAwC;EAC/D,OAAO,KAAK,QAAQ,aAAa,mBAAmB,MAAM;CAC5D;;;;;;CAOA,MAAM,gBAAgB,QAAsC;EAC1D,OAAO,KAAK,QAAQ,cAAc,gBAAgB,MAAM;CAC1D;;;;;;CAOA,MAAM,oBAAoB,QAA0C;EAClE,OAAO,KAAK,QAAQ,cAAc,oBAAoB,MAAM;CAC9D;;;;;;CAOA,MAAM,qBAAqB,QAAoC;EAC7D,OAAO,KAAK,QAAQ,aAAa,eAAe,MAAM;CACxD;;;;;;CAOA,MAAM,sBAAsB,QAAqC;EAC/D,OAAO,KAAK,QAAQ,aAAa,gBAAgB,MAAM;CACzD;;;;;;CAOA,MAAM,eAAe,QAAqC;EACxD,OAAO,KAAK,QAAQ,cAAc,eAAe,MAAM;CACzD;;;;;;CAOA,MAAM,4BACJ,QACA;EACA,OAAO,KAAK,QAAQ,cAAc,4BAA4B,MAAM;CACtE;;;;;;CAOA,MAAM,oBAAoB,QAA0C;EAClE,OAAO,KAAK,QAAQ,cAAc,oBAAoB,MAAM;CAC9D;;;;;;CAOA,MAAM,mBAAmB,QAAyC;EAChE,OAAO,KAAK,QAAQ,cAAc,mBAAmB,MAAM;CAC7D;;;;;;CAOA,MAAM,uBAAuB,QAA6C;EACxE,OAAO,KAAK,QAAQ,cAAc,uBAAuB,MAAM;CACjE;;;;;;CAOA,MAAM,yBACJ,QACA;EACA,OAAO,KAAK,QAAQ,cAAc,yBAAyB,MAAM;CACnE;AACF"}
@@ -1,124 +1,2 @@
1
- import * as _nadohq_indexer_client from '@nadohq/indexer-client';
2
- import { GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerCandlesticksParams, GetIndexerEdgeCandlesticksParams, GetIndexerFundingRateParams, GetIndexerMultiProductFundingRatesParams, GetIndexerProductSnapshotsParams, GetIndexerMarketSnapshotsParams, GetIndexerEdgeMarketSnapshotsParams, GetIndexerMultiProductSnapshotsParams } from '@nadohq/indexer-client';
3
- import * as BigNumber from 'bignumber.js';
4
- import * as _nadohq_trigger_client from '@nadohq/trigger-client';
5
- import * as _nadohq_engine_client from '@nadohq/engine-client';
6
- import { GetEngineAllMarketsResponse, ValidateEngineOrderParams, GetEngineSubaccountOrdersParams, GetEngineSubaccountProductOrdersParams, GetEngineMaxOrderSizeParams, GetEngineMarketLiquidityParams, GetEngineMarketPriceParams, GetEngineMarketPricesParams } from '@nadohq/engine-client';
7
- import { BaseNadoAPI } from '../base.cjs';
8
- import { GetTriggerOrdersParams } from './types.cjs';
9
- import '@nadohq/shared';
10
- import '../../context.cjs';
11
- import 'viem';
12
- import '../types.cjs';
13
-
14
- declare class MarketQueryAPI extends BaseNadoAPI {
15
- /**
16
- * Retrieves all market states from the offchain engine
17
- */
18
- getAllMarkets(): Promise<GetEngineAllMarketsResponse>;
19
- /**
20
- * Get all edge engine markets
21
- */
22
- getEdgeAllMarkets(): Promise<Record<number, GetEngineAllMarketsResponse>>;
23
- /**
24
- * Retrieves all spread health groups
25
- */
26
- getHealthGroups(): Promise<_nadohq_engine_client.GetEngineHealthGroupsResponse>;
27
- /**
28
- * Queries engine to determine if the order can be submitted within health requirements
29
- */
30
- validateOrderParams(params: ValidateEngineOrderParams): Promise<_nadohq_engine_client.ValidateEngineOrderResponse>;
31
- /**
32
- * Queries the offchain engine to retrieve status of any open orders for the given subaccount
33
- * @param params
34
- */
35
- getOpenSubaccountOrders(params: GetEngineSubaccountOrdersParams): Promise<_nadohq_engine_client.EngineSubaccountOrders>;
36
- /**
37
- * Queries the offchain engine to retrieve status of any open orders for the given subaccount for multiple products
38
- * @param params
39
- */
40
- getOpenSubaccountMultiProductOrders(params: GetEngineSubaccountProductOrdersParams): Promise<_nadohq_engine_client.GetEngineSubaccountProductOrdersResponse>;
41
- /**
42
- * Queries the offchain trigger service to list trigger orders. Requires a signature
43
- * @param params
44
- */
45
- getTriggerOrders(params: GetTriggerOrdersParams): Promise<_nadohq_trigger_client.TriggerListOrdersResponse>;
46
- /**
47
- * Queries indexer to fetch historical orders
48
- *
49
- * @param params
50
- */
51
- getHistoricalOrders(params: GetIndexerOrdersParams): Promise<GetIndexerOrdersResponse>;
52
- /**
53
- * Queries engine to determine maximum order size
54
- * @param params
55
- */
56
- getMaxOrderSize(params: GetEngineMaxOrderSizeParams): Promise<BigNumber.BigNumber>;
57
- /**
58
- * Retrieves liquidity per price tick from the engine. The engine will skip price levels that have no liquidity,
59
- * so it is not guaranteed that the bids/asks are evenly spaced
60
- */
61
- getMarketLiquidity(params: GetEngineMarketLiquidityParams): Promise<_nadohq_engine_client.GetEngineMarketLiquidityResponse>;
62
- /**
63
- * Historical candlesticks from the indexer, use getLatestMarketPrice for the latest orderbook prices
64
- *
65
- * @param params
66
- */
67
- getCandlesticks(params: GetIndexerCandlesticksParams): Promise<_nadohq_indexer_client.GetIndexerCandlesticksResponse>;
68
- /**
69
- * Historical candlesticks from Edge, use getLatestMarketPrice for the latest orderbook prices
70
- *
71
- * @param params
72
- */
73
- getEdgeCandlesticks(params: GetIndexerEdgeCandlesticksParams): Promise<_nadohq_indexer_client.GetIndexerCandlesticksResponse>;
74
- /**
75
- * Retrieves the latest off-chain orderbook price from the engine
76
- *
77
- * @param params
78
- */
79
- getLatestMarketPrice(params: GetEngineMarketPriceParams): Promise<_nadohq_engine_client.EngineMarketPrice>;
80
- /**
81
- * Retrieves the latest off-chain orderbook price from the engine for multiple markets
82
- *
83
- * @param params
84
- */
85
- getLatestMarketPrices(params: GetEngineMarketPricesParams): Promise<_nadohq_engine_client.GetEngineMarketPricesResponse>;
86
- /**
87
- * Retrieves the latest funding rate for a perp product
88
- *
89
- * @param params
90
- */
91
- getFundingRate(params: GetIndexerFundingRateParams): Promise<_nadohq_indexer_client.IndexerFundingRate>;
92
- /**
93
- * Retrieves the latest funding rate for multiple perp products
94
- *
95
- * @param params
96
- */
97
- getMultiProductFundingRates(params: GetIndexerMultiProductFundingRatesParams): Promise<_nadohq_indexer_client.GetIndexerMultiProductFundingRatesResponse>;
98
- /**
99
- * Retrieves the historical snapshots for a product from the indexer
100
- *
101
- * @param params
102
- */
103
- getProductSnapshots(params: GetIndexerProductSnapshotsParams): Promise<_nadohq_indexer_client.GetIndexerProductSnapshotsResponse>;
104
- /**
105
- * Retrieves the historical snapshots for a market from the indexer
106
- *
107
- * @param params
108
- */
109
- getMarketSnapshots(params: GetIndexerMarketSnapshotsParams): Promise<_nadohq_indexer_client.GetIndexerMarketSnapshotsResponse>;
110
- /**
111
- * Retrieves the historical snapshots for a market from Edge
112
- *
113
- * @param params
114
- */
115
- getEdgeMarketSnapshots(params: GetIndexerEdgeMarketSnapshotsParams): Promise<_nadohq_indexer_client.GetIndexerEdgeMarketSnapshotResponse>;
116
- /**
117
- * Retrieves the historical snapshots for multiple products from the indexer
118
- *
119
- * @param params
120
- */
121
- getMultiProductSnapshots(params: GetIndexerMultiProductSnapshotsParams): Promise<_nadohq_indexer_client.GetIndexerMultiProductSnapshotsResponse>;
122
- }
123
-
124
- export { MarketQueryAPI };
1
+ import { t as MarketQueryAPI } from "../../MarketQueryAPI-Dhb8hWiD.cjs";
2
+ export { MarketQueryAPI };
@@ -1,124 +1,2 @@
1
- import * as _nadohq_indexer_client from '@nadohq/indexer-client';
2
- import { GetIndexerOrdersParams, GetIndexerOrdersResponse, GetIndexerCandlesticksParams, GetIndexerEdgeCandlesticksParams, GetIndexerFundingRateParams, GetIndexerMultiProductFundingRatesParams, GetIndexerProductSnapshotsParams, GetIndexerMarketSnapshotsParams, GetIndexerEdgeMarketSnapshotsParams, GetIndexerMultiProductSnapshotsParams } from '@nadohq/indexer-client';
3
- import * as BigNumber from 'bignumber.js';
4
- import * as _nadohq_trigger_client from '@nadohq/trigger-client';
5
- import * as _nadohq_engine_client from '@nadohq/engine-client';
6
- import { GetEngineAllMarketsResponse, ValidateEngineOrderParams, GetEngineSubaccountOrdersParams, GetEngineSubaccountProductOrdersParams, GetEngineMaxOrderSizeParams, GetEngineMarketLiquidityParams, GetEngineMarketPriceParams, GetEngineMarketPricesParams } from '@nadohq/engine-client';
7
- import { BaseNadoAPI } from '../base.js';
8
- import { GetTriggerOrdersParams } from './types.js';
9
- import '@nadohq/shared';
10
- import '../../context.js';
11
- import 'viem';
12
- import '../types.js';
13
-
14
- declare class MarketQueryAPI extends BaseNadoAPI {
15
- /**
16
- * Retrieves all market states from the offchain engine
17
- */
18
- getAllMarkets(): Promise<GetEngineAllMarketsResponse>;
19
- /**
20
- * Get all edge engine markets
21
- */
22
- getEdgeAllMarkets(): Promise<Record<number, GetEngineAllMarketsResponse>>;
23
- /**
24
- * Retrieves all spread health groups
25
- */
26
- getHealthGroups(): Promise<_nadohq_engine_client.GetEngineHealthGroupsResponse>;
27
- /**
28
- * Queries engine to determine if the order can be submitted within health requirements
29
- */
30
- validateOrderParams(params: ValidateEngineOrderParams): Promise<_nadohq_engine_client.ValidateEngineOrderResponse>;
31
- /**
32
- * Queries the offchain engine to retrieve status of any open orders for the given subaccount
33
- * @param params
34
- */
35
- getOpenSubaccountOrders(params: GetEngineSubaccountOrdersParams): Promise<_nadohq_engine_client.EngineSubaccountOrders>;
36
- /**
37
- * Queries the offchain engine to retrieve status of any open orders for the given subaccount for multiple products
38
- * @param params
39
- */
40
- getOpenSubaccountMultiProductOrders(params: GetEngineSubaccountProductOrdersParams): Promise<_nadohq_engine_client.GetEngineSubaccountProductOrdersResponse>;
41
- /**
42
- * Queries the offchain trigger service to list trigger orders. Requires a signature
43
- * @param params
44
- */
45
- getTriggerOrders(params: GetTriggerOrdersParams): Promise<_nadohq_trigger_client.TriggerListOrdersResponse>;
46
- /**
47
- * Queries indexer to fetch historical orders
48
- *
49
- * @param params
50
- */
51
- getHistoricalOrders(params: GetIndexerOrdersParams): Promise<GetIndexerOrdersResponse>;
52
- /**
53
- * Queries engine to determine maximum order size
54
- * @param params
55
- */
56
- getMaxOrderSize(params: GetEngineMaxOrderSizeParams): Promise<BigNumber.BigNumber>;
57
- /**
58
- * Retrieves liquidity per price tick from the engine. The engine will skip price levels that have no liquidity,
59
- * so it is not guaranteed that the bids/asks are evenly spaced
60
- */
61
- getMarketLiquidity(params: GetEngineMarketLiquidityParams): Promise<_nadohq_engine_client.GetEngineMarketLiquidityResponse>;
62
- /**
63
- * Historical candlesticks from the indexer, use getLatestMarketPrice for the latest orderbook prices
64
- *
65
- * @param params
66
- */
67
- getCandlesticks(params: GetIndexerCandlesticksParams): Promise<_nadohq_indexer_client.GetIndexerCandlesticksResponse>;
68
- /**
69
- * Historical candlesticks from Edge, use getLatestMarketPrice for the latest orderbook prices
70
- *
71
- * @param params
72
- */
73
- getEdgeCandlesticks(params: GetIndexerEdgeCandlesticksParams): Promise<_nadohq_indexer_client.GetIndexerCandlesticksResponse>;
74
- /**
75
- * Retrieves the latest off-chain orderbook price from the engine
76
- *
77
- * @param params
78
- */
79
- getLatestMarketPrice(params: GetEngineMarketPriceParams): Promise<_nadohq_engine_client.EngineMarketPrice>;
80
- /**
81
- * Retrieves the latest off-chain orderbook price from the engine for multiple markets
82
- *
83
- * @param params
84
- */
85
- getLatestMarketPrices(params: GetEngineMarketPricesParams): Promise<_nadohq_engine_client.GetEngineMarketPricesResponse>;
86
- /**
87
- * Retrieves the latest funding rate for a perp product
88
- *
89
- * @param params
90
- */
91
- getFundingRate(params: GetIndexerFundingRateParams): Promise<_nadohq_indexer_client.IndexerFundingRate>;
92
- /**
93
- * Retrieves the latest funding rate for multiple perp products
94
- *
95
- * @param params
96
- */
97
- getMultiProductFundingRates(params: GetIndexerMultiProductFundingRatesParams): Promise<_nadohq_indexer_client.GetIndexerMultiProductFundingRatesResponse>;
98
- /**
99
- * Retrieves the historical snapshots for a product from the indexer
100
- *
101
- * @param params
102
- */
103
- getProductSnapshots(params: GetIndexerProductSnapshotsParams): Promise<_nadohq_indexer_client.GetIndexerProductSnapshotsResponse>;
104
- /**
105
- * Retrieves the historical snapshots for a market from the indexer
106
- *
107
- * @param params
108
- */
109
- getMarketSnapshots(params: GetIndexerMarketSnapshotsParams): Promise<_nadohq_indexer_client.GetIndexerMarketSnapshotsResponse>;
110
- /**
111
- * Retrieves the historical snapshots for a market from Edge
112
- *
113
- * @param params
114
- */
115
- getEdgeMarketSnapshots(params: GetIndexerEdgeMarketSnapshotsParams): Promise<_nadohq_indexer_client.GetIndexerEdgeMarketSnapshotResponse>;
116
- /**
117
- * Retrieves the historical snapshots for multiple products from the indexer
118
- *
119
- * @param params
120
- */
121
- getMultiProductSnapshots(params: GetIndexerMultiProductSnapshotsParams): Promise<_nadohq_indexer_client.GetIndexerMultiProductSnapshotsResponse>;
122
- }
123
-
124
- export { MarketQueryAPI };
1
+ import { t as MarketQueryAPI } from "../../MarketQueryAPI-Dz8FrVPK.js";
2
+ export { MarketQueryAPI };