@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.
- package/dist/BaseSpotAPI-BeTjhXT_.d.cts +14 -0
- package/dist/BaseSpotAPI-BeTjhXT_.d.cts.map +1 -0
- package/dist/BaseSpotAPI-Ck64kyYt.d.ts +14 -0
- package/dist/BaseSpotAPI-Ck64kyYt.d.ts.map +1 -0
- package/dist/MarketExecuteAPI-BBp0Nn6N.d.cts +55 -0
- package/dist/MarketExecuteAPI-BBp0Nn6N.d.cts.map +1 -0
- package/dist/MarketExecuteAPI-_S9-rNsv.d.ts +55 -0
- package/dist/MarketExecuteAPI-_S9-rNsv.d.ts.map +1 -0
- package/dist/MarketQueryAPI-Dhb8hWiD.d.cts +118 -0
- package/dist/MarketQueryAPI-Dhb8hWiD.d.cts.map +1 -0
- package/dist/MarketQueryAPI-Dz8FrVPK.d.ts +118 -0
- package/dist/MarketQueryAPI-Dz8FrVPK.d.ts.map +1 -0
- package/dist/PerpExecuteAPI-C0APgWq4.d.cts +7 -0
- package/dist/PerpExecuteAPI-C0APgWq4.d.cts.map +1 -0
- package/dist/PerpExecuteAPI-DPNJdARF.d.ts +7 -0
- package/dist/PerpExecuteAPI-DPNJdARF.d.ts.map +1 -0
- package/dist/PerpQueryAPI-RGhdNhoJ.d.cts +19 -0
- package/dist/PerpQueryAPI-RGhdNhoJ.d.cts.map +1 -0
- package/dist/PerpQueryAPI-tJbMmCcO.d.ts +19 -0
- package/dist/PerpQueryAPI-tJbMmCcO.d.ts.map +1 -0
- package/dist/SpotExecuteAPI-UWnX_Hm4.d.ts +22 -0
- package/dist/SpotExecuteAPI-UWnX_Hm4.d.ts.map +1 -0
- package/dist/SpotExecuteAPI-b07ixUz2.d.cts +22 -0
- package/dist/SpotExecuteAPI-b07ixUz2.d.cts.map +1 -0
- package/dist/SpotQueryAPI-CfZcvt4p.d.ts +36 -0
- package/dist/SpotQueryAPI-CfZcvt4p.d.ts.map +1 -0
- package/dist/SpotQueryAPI-DS85MzQB.d.cts +36 -0
- package/dist/SpotQueryAPI-DS85MzQB.d.cts.map +1 -0
- package/dist/SubaccountExecuteAPI-DhHBzzdk.d.cts +21 -0
- package/dist/SubaccountExecuteAPI-DhHBzzdk.d.cts.map +1 -0
- package/dist/SubaccountExecuteAPI-KApMbONz.d.ts +21 -0
- package/dist/SubaccountExecuteAPI-KApMbONz.d.ts.map +1 -0
- package/dist/SubaccountQueryAPI-C9h3epmM.d.cts +40 -0
- package/dist/SubaccountQueryAPI-C9h3epmM.d.cts.map +1 -0
- package/dist/SubaccountQueryAPI-DnLcgfiM.d.ts +40 -0
- package/dist/SubaccountQueryAPI-DnLcgfiM.d.ts.map +1 -0
- package/dist/WebSocketExecuteAPI-7gLrCoXN.d.cts +44 -0
- package/dist/WebSocketExecuteAPI-7gLrCoXN.d.cts.map +1 -0
- package/dist/WebSocketExecuteAPI-DHhKag16.d.ts +44 -0
- package/dist/WebSocketExecuteAPI-DHhKag16.d.ts.map +1 -0
- package/dist/WebSocketQueryAPI-B9vBQo5q.d.ts +20 -0
- package/dist/WebSocketQueryAPI-B9vBQo5q.d.ts.map +1 -0
- package/dist/WebSocketQueryAPI-BMLp4dCH.d.cts +20 -0
- package/dist/WebSocketQueryAPI-BMLp4dCH.d.cts.map +1 -0
- package/dist/WebSocketSubscriptionAPI-bApRHac8.d.cts +34 -0
- package/dist/WebSocketSubscriptionAPI-bApRHac8.d.cts.map +1 -0
- package/dist/WebSocketSubscriptionAPI-qUFRFcRI.d.ts +34 -0
- package/dist/WebSocketSubscriptionAPI-qUFRFcRI.d.ts.map +1 -0
- package/dist/apis/base.cjs +30 -60
- package/dist/apis/base.cjs.map +1 -1
- package/dist/apis/base.d.cts +2 -22
- package/dist/apis/base.d.ts +2 -22
- package/dist/apis/base.js +28 -34
- package/dist/apis/base.js.map +1 -1
- package/dist/apis/market/MarketExecuteAPI.cjs +164 -190
- package/dist/apis/market/MarketExecuteAPI.cjs.map +1 -1
- package/dist/apis/market/MarketExecuteAPI.d.cts +2 -61
- package/dist/apis/market/MarketExecuteAPI.d.ts +2 -61
- package/dist/apis/market/MarketExecuteAPI.js +162 -164
- package/dist/apis/market/MarketExecuteAPI.js.map +1 -1
- package/dist/apis/market/MarketQueryAPI.cjs +157 -181
- package/dist/apis/market/MarketQueryAPI.cjs.map +1 -1
- package/dist/apis/market/MarketQueryAPI.d.cts +2 -124
- package/dist/apis/market/MarketQueryAPI.d.ts +2 -124
- package/dist/apis/market/MarketQueryAPI.js +155 -155
- package/dist/apis/market/MarketQueryAPI.js.map +1 -1
- package/dist/apis/market/index.cjs +8 -36
- package/dist/apis/market/index.cjs.map +1 -1
- package/dist/apis/market/index.d.cts +3 -19
- package/dist/apis/market/index.d.ts +3 -19
- package/dist/apis/market/index.js +6 -8
- package/dist/apis/market/index.js.map +1 -1
- package/dist/apis/market/types.cjs +0 -19
- package/dist/apis/market/types.d.cts +2 -41
- package/dist/apis/market/types.d.ts +2 -41
- package/dist/apis/market/types.js +1 -1
- package/dist/apis/perp/PerpExecuteAPI.cjs +6 -31
- package/dist/apis/perp/PerpExecuteAPI.cjs.map +1 -1
- package/dist/apis/perp/PerpExecuteAPI.d.cts +2 -12
- package/dist/apis/perp/PerpExecuteAPI.d.ts +2 -12
- package/dist/apis/perp/PerpExecuteAPI.js +5 -6
- package/dist/apis/perp/PerpExecuteAPI.js.map +1 -1
- package/dist/apis/perp/PerpQueryAPI.cjs +20 -44
- package/dist/apis/perp/PerpQueryAPI.cjs.map +1 -1
- package/dist/apis/perp/PerpQueryAPI.d.cts +2 -23
- package/dist/apis/perp/PerpQueryAPI.d.ts +2 -23
- package/dist/apis/perp/PerpQueryAPI.js +18 -18
- package/dist/apis/perp/PerpQueryAPI.js.map +1 -1
- package/dist/apis/perp/index.cjs +8 -33
- package/dist/apis/perp/index.cjs.map +1 -1
- package/dist/apis/perp/index.d.cts +2 -16
- package/dist/apis/perp/index.d.ts +2 -16
- package/dist/apis/perp/index.js +6 -7
- package/dist/apis/perp/index.js.map +1 -1
- package/dist/apis/spot/BaseSpotAPI.cjs +21 -51
- package/dist/apis/spot/BaseSpotAPI.cjs.map +1 -1
- package/dist/apis/spot/BaseSpotAPI.d.cts +2 -18
- package/dist/apis/spot/BaseSpotAPI.d.ts +2 -18
- package/dist/apis/spot/BaseSpotAPI.js +19 -28
- package/dist/apis/spot/BaseSpotAPI.js.map +1 -1
- package/dist/apis/spot/SpotExecuteAPI.cjs +72 -104
- package/dist/apis/spot/SpotExecuteAPI.cjs.map +1 -1
- package/dist/apis/spot/SpotExecuteAPI.d.cts +2 -27
- package/dist/apis/spot/SpotExecuteAPI.d.ts +2 -27
- package/dist/apis/spot/SpotExecuteAPI.js +70 -85
- package/dist/apis/spot/SpotExecuteAPI.js.map +1 -1
- package/dist/apis/spot/SpotQueryAPI.cjs +34 -71
- package/dist/apis/spot/SpotQueryAPI.cjs.map +1 -1
- package/dist/apis/spot/SpotQueryAPI.d.cts +2 -35
- package/dist/apis/spot/SpotQueryAPI.d.ts +2 -35
- package/dist/apis/spot/SpotQueryAPI.js +32 -45
- package/dist/apis/spot/SpotQueryAPI.js.map +1 -1
- package/dist/apis/spot/index.cjs +11 -36
- package/dist/apis/spot/index.cjs.map +1 -1
- package/dist/apis/spot/index.d.cts +3 -23
- package/dist/apis/spot/index.d.ts +3 -23
- package/dist/apis/spot/index.js +9 -8
- package/dist/apis/spot/index.js.map +1 -1
- package/dist/apis/spot/types.cjs +0 -19
- package/dist/apis/spot/types.d.cts +2 -27
- package/dist/apis/spot/types.d.ts +2 -27
- package/dist/apis/spot/types.js +1 -1
- package/dist/apis/subaccount/SubaccountExecuteAPI.cjs +32 -56
- package/dist/apis/subaccount/SubaccountExecuteAPI.cjs.map +1 -1
- package/dist/apis/subaccount/SubaccountExecuteAPI.d.cts +2 -26
- package/dist/apis/subaccount/SubaccountExecuteAPI.d.ts +2 -26
- package/dist/apis/subaccount/SubaccountExecuteAPI.js +30 -30
- package/dist/apis/subaccount/SubaccountExecuteAPI.js.map +1 -1
- package/dist/apis/subaccount/SubaccountQueryAPI.cjs +48 -72
- package/dist/apis/subaccount/SubaccountQueryAPI.cjs.map +1 -1
- package/dist/apis/subaccount/SubaccountQueryAPI.d.cts +2 -44
- package/dist/apis/subaccount/SubaccountQueryAPI.d.ts +2 -44
- package/dist/apis/subaccount/SubaccountQueryAPI.js +46 -46
- package/dist/apis/subaccount/SubaccountQueryAPI.js.map +1 -1
- package/dist/apis/subaccount/index.cjs +32 -64
- package/dist/apis/subaccount/index.cjs.map +1 -1
- package/dist/apis/subaccount/index.d.cts +3 -27
- package/dist/apis/subaccount/index.d.ts +3 -27
- package/dist/apis/subaccount/index.js +30 -39
- package/dist/apis/subaccount/index.js.map +1 -1
- package/dist/apis/subaccount/types.cjs +0 -19
- package/dist/apis/subaccount/types.d.cts +2 -9
- package/dist/apis/subaccount/types.d.ts +2 -9
- package/dist/apis/subaccount/types.js +1 -1
- package/dist/apis/types.cjs +0 -19
- package/dist/apis/types.d.cts +2 -9
- package/dist/apis/types.d.ts +2 -9
- package/dist/apis/types.js +1 -1
- package/dist/apis/ws/WebSocketExecuteAPI.cjs +42 -70
- package/dist/apis/ws/WebSocketExecuteAPI.cjs.map +1 -1
- package/dist/apis/ws/WebSocketExecuteAPI.d.cts +2 -48
- package/dist/apis/ws/WebSocketExecuteAPI.d.ts +2 -48
- package/dist/apis/ws/WebSocketExecuteAPI.js +40 -44
- package/dist/apis/ws/WebSocketExecuteAPI.js.map +1 -1
- package/dist/apis/ws/WebSocketQueryAPI.cjs +19 -39
- package/dist/apis/ws/WebSocketQueryAPI.cjs.map +1 -1
- package/dist/apis/ws/WebSocketQueryAPI.d.cts +2 -23
- package/dist/apis/ws/WebSocketQueryAPI.d.ts +2 -23
- package/dist/apis/ws/WebSocketQueryAPI.js +17 -13
- package/dist/apis/ws/WebSocketQueryAPI.js.map +1 -1
- package/dist/apis/ws/WebSocketSubscriptionAPI.cjs +40 -58
- package/dist/apis/ws/WebSocketSubscriptionAPI.cjs.map +1 -1
- package/dist/apis/ws/WebSocketSubscriptionAPI.d.cts +2 -37
- package/dist/apis/ws/WebSocketSubscriptionAPI.d.ts +2 -37
- package/dist/apis/ws/WebSocketSubscriptionAPI.js +38 -32
- package/dist/apis/ws/WebSocketSubscriptionAPI.js.map +1 -1
- package/dist/apis/ws/index.cjs +18 -39
- package/dist/apis/ws/index.cjs.map +1 -1
- package/dist/apis/ws/index.d.cts +2 -22
- package/dist/apis/ws/index.d.ts +2 -22
- package/dist/apis/ws/index.js +13 -10
- package/dist/apis/ws/index.js.map +1 -1
- package/dist/base-B92wTsrc.d.ts +20 -0
- package/dist/base-B92wTsrc.d.ts.map +1 -0
- package/dist/base-BYkH_-5-.d.cts +20 -0
- package/dist/base-BYkH_-5-.d.cts.map +1 -0
- package/dist/client.cjs +53 -77
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +28 -49
- package/dist/client.d.cts.map +1 -0
- package/dist/client.d.ts +28 -49
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +46 -46
- package/dist/client.js.map +1 -1
- package/dist/context-YHVv2kD4.d.cts +44 -0
- package/dist/context-YHVv2kD4.d.cts.map +1 -0
- package/dist/context-YfcGQ0Sr.d.ts +44 -0
- package/dist/context-YfcGQ0Sr.d.ts.map +1 -0
- package/dist/context.cjs +92 -122
- package/dist/context.cjs.map +1 -1
- package/dist/context.d.cts +2 -42
- package/dist/context.d.ts +2 -42
- package/dist/context.js +90 -105
- package/dist/context.js.map +1 -1
- package/dist/createNadoClient.cjs +15 -32
- package/dist/createNadoClient.cjs.map +1 -1
- package/dist/createNadoClient.d.cts +5 -32
- package/dist/createNadoClient.d.cts.map +1 -0
- package/dist/createNadoClient.d.ts +5 -32
- package/dist/createNadoClient.d.ts.map +1 -0
- package/dist/createNadoClient.js +13 -8
- package/dist/createNadoClient.js.map +1 -1
- package/dist/index-BFQPcj2w.d.cts +9 -0
- package/dist/index-BFQPcj2w.d.cts.map +1 -0
- package/dist/index-CSG04f_b.d.cts +12 -0
- package/dist/index-CSG04f_b.d.cts.map +1 -0
- package/dist/index-Cc2RdeRK.d.cts +19 -0
- package/dist/index-Cc2RdeRK.d.cts.map +1 -0
- package/dist/index-DIX4yJe-.d.ts +9 -0
- package/dist/index-DIX4yJe-.d.ts.map +1 -0
- package/dist/index-DVJ1Mu6s.d.ts +9 -0
- package/dist/index-DVJ1Mu6s.d.ts.map +1 -0
- package/dist/index-DkTJs2nZ.d.cts +9 -0
- package/dist/index-DkTJs2nZ.d.cts.map +1 -0
- package/dist/index-Dw9iFeeU.d.ts +19 -0
- package/dist/index-Dw9iFeeU.d.ts.map +1 -0
- package/dist/index-Mhjd1FK8.d.ts +12 -0
- package/dist/index-Mhjd1FK8.d.ts.map +1 -0
- package/dist/index-RtQYDuRY.d.ts +19 -0
- package/dist/index-RtQYDuRY.d.ts.map +1 -0
- package/dist/index-jTtf55U_.d.cts +19 -0
- package/dist/index-jTtf55U_.d.cts.map +1 -0
- package/dist/index.cjs +50 -44
- package/dist/index.d.cts +15 -32
- package/dist/index.d.ts +15 -32
- package/dist/index.js +9 -10
- package/dist/types-B-tOIIKl.d.ts +29 -0
- package/dist/types-B-tOIIKl.d.ts.map +1 -0
- package/dist/types-B6oFoDTo.d.ts +11 -0
- package/dist/types-B6oFoDTo.d.ts.map +1 -0
- package/dist/types-BFFzjzRy.d.ts +43 -0
- package/dist/types-BFFzjzRy.d.ts.map +1 -0
- package/dist/types-BWRdhQd_.d.cts +11 -0
- package/dist/types-BWRdhQd_.d.cts.map +1 -0
- package/dist/types-C5DKLOen.d.ts +11 -0
- package/dist/types-C5DKLOen.d.ts.map +1 -0
- package/dist/types-CCj4QJO8.d.cts +29 -0
- package/dist/types-CCj4QJO8.d.cts.map +1 -0
- package/dist/types-D27__G6_.d.cts +11 -0
- package/dist/types-D27__G6_.d.cts.map +1 -0
- package/dist/types-YBdM1sun.d.cts +43 -0
- package/dist/types-YBdM1sun.d.cts.map +1 -0
- package/package.json +11 -11
- package/dist/apis/market/types.cjs.map +0 -1
- package/dist/apis/market/types.js.map +0 -1
- package/dist/apis/spot/types.cjs.map +0 -1
- package/dist/apis/spot/types.js.map +0 -1
- package/dist/apis/subaccount/types.cjs.map +0 -1
- package/dist/apis/subaccount/types.js.map +0 -1
- package/dist/apis/types.cjs.map +0 -1
- package/dist/apis/types.js.map +0 -1
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
|
@@ -1,184 +1,160 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
11
|
-
|
|
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":"
|
|
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
|
|
2
|
-
|
|
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
|
|
2
|
-
|
|
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 };
|