@pendle/sdk-boros 1.8.0 → 1.8.1
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/backend/index.d.ts +1 -0
- package/dist/backend/index.js +1 -0
- package/dist/backend/index.js.map +1 -1
- package/dist/backend/openApi/generated/OpenApiSdk.d.ts +1485 -0
- package/dist/backend/openApi/generated/OpenApiSdk.js +714 -0
- package/dist/backend/openApi/generated/OpenApiSdk.js.map +1 -0
- package/dist/backend/openApi/index.d.ts +1 -0
- package/dist/backend/openApi/index.js +18 -0
- package/dist/backend/openApi/index.js.map +1 -0
- package/dist/backend/openApi/module.d.ts +7 -0
- package/dist/backend/openApi/module.js +67 -0
- package/dist/backend/openApi/module.js.map +1 -0
- package/dist/backend/secrettune/module.d.ts +1 -0
- package/dist/backend/secrettune/module.js +4 -0
- package/dist/backend/secrettune/module.js.map +1 -1
- package/dist/entities/Calculator/exchangeFees.d.ts +3 -3
- package/dist/entities/Calculator/exchangeFees.js +21 -13
- package/dist/entities/Calculator/exchangeFees.js.map +1 -1
- package/dist/entities/Calculator/marginCalculator.d.ts +2 -2
- package/dist/entities/Calculator/marginCalculator.js.map +1 -1
- package/dist/entities/Calculator/strategyFinder.d.ts +2 -2
- package/dist/entities/Calculator/strategyFinder.js +15 -14
- package/dist/entities/Calculator/strategyFinder.js.map +1 -1
- package/dist/entities/Calculator/strategyUtils.d.ts +1 -1
- package/dist/entities/Calculator/strategyUtils.js +4 -4
- package/dist/entities/Calculator/strategyUtils.js.map +1 -1
- package/dist/entities/Calculator/types.d.ts +3 -3
- package/dist/entities/exchange/exchange.d.ts +30 -27
- package/dist/entities/exchange/exchange.js +212 -134
- package/dist/entities/exchange/exchange.js.map +1 -1
- package/dist/entities/token/Token.d.ts +3 -3
- package/dist/entities/token/Token.js +9 -3
- package/dist/entities/token/Token.js.map +1 -1
- package/package.json +2 -2
- package/CHANGELOG.md +0 -445
|
@@ -0,0 +1,714 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.Sdk = exports.HttpClient = exports.ContentType = exports.LightEventOrderType = void 0;
|
|
7
|
+
var LightEventOrderType;
|
|
8
|
+
(function (LightEventOrderType) {
|
|
9
|
+
LightEventOrderType["Limit"] = "Limit";
|
|
10
|
+
LightEventOrderType["Market"] = "Market";
|
|
11
|
+
LightEventOrderType["Conditional"] = "Conditional";
|
|
12
|
+
})(LightEventOrderType || (exports.LightEventOrderType = LightEventOrderType = {}));
|
|
13
|
+
const axios_1 = __importDefault(require("axios"));
|
|
14
|
+
var ContentType;
|
|
15
|
+
(function (ContentType) {
|
|
16
|
+
ContentType["Json"] = "application/json";
|
|
17
|
+
ContentType["JsonApi"] = "application/vnd.api+json";
|
|
18
|
+
ContentType["FormData"] = "multipart/form-data";
|
|
19
|
+
ContentType["UrlEncoded"] = "application/x-www-form-urlencoded";
|
|
20
|
+
ContentType["Text"] = "text/plain";
|
|
21
|
+
})(ContentType || (exports.ContentType = ContentType = {}));
|
|
22
|
+
class HttpClient {
|
|
23
|
+
instance;
|
|
24
|
+
securityData = null;
|
|
25
|
+
securityWorker;
|
|
26
|
+
secure;
|
|
27
|
+
format;
|
|
28
|
+
constructor({ securityWorker, secure, format, ...axiosConfig } = {}) {
|
|
29
|
+
this.instance = axios_1.default.create({
|
|
30
|
+
...axiosConfig,
|
|
31
|
+
baseURL: axiosConfig.baseURL || 'https://api-boros.pendle.finance/apis',
|
|
32
|
+
});
|
|
33
|
+
this.secure = secure;
|
|
34
|
+
this.format = format;
|
|
35
|
+
this.securityWorker = securityWorker;
|
|
36
|
+
}
|
|
37
|
+
setSecurityData = (data) => {
|
|
38
|
+
this.securityData = data;
|
|
39
|
+
};
|
|
40
|
+
mergeRequestParams(params1, params2) {
|
|
41
|
+
const method = params1.method || (params2 && params2.method);
|
|
42
|
+
return {
|
|
43
|
+
...this.instance.defaults,
|
|
44
|
+
...params1,
|
|
45
|
+
...(params2 || {}),
|
|
46
|
+
headers: {
|
|
47
|
+
...((method && this.instance.defaults.headers[method.toLowerCase()]) || {}),
|
|
48
|
+
...(params1.headers || {}),
|
|
49
|
+
...((params2 && params2.headers) || {}),
|
|
50
|
+
},
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
stringifyFormItem(formItem) {
|
|
54
|
+
if (typeof formItem === 'object' && formItem !== null) {
|
|
55
|
+
return JSON.stringify(formItem);
|
|
56
|
+
}
|
|
57
|
+
else {
|
|
58
|
+
return `${formItem}`;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
createFormData(input) {
|
|
62
|
+
if (input instanceof FormData) {
|
|
63
|
+
return input;
|
|
64
|
+
}
|
|
65
|
+
return Object.keys(input || {}).reduce((formData, key) => {
|
|
66
|
+
const property = input[key];
|
|
67
|
+
const propertyContent = property instanceof Array ? property : [property];
|
|
68
|
+
for (const formItem of propertyContent) {
|
|
69
|
+
const isFileType = formItem instanceof Blob || formItem instanceof File;
|
|
70
|
+
formData.append(key, isFileType ? formItem : this.stringifyFormItem(formItem));
|
|
71
|
+
}
|
|
72
|
+
return formData;
|
|
73
|
+
}, new FormData());
|
|
74
|
+
}
|
|
75
|
+
request = async ({ secure, path, type, query, format, body, ...params }) => {
|
|
76
|
+
const secureParams = ((typeof secure === 'boolean' ? secure : this.secure) &&
|
|
77
|
+
this.securityWorker &&
|
|
78
|
+
(await this.securityWorker(this.securityData))) ||
|
|
79
|
+
{};
|
|
80
|
+
const requestParams = this.mergeRequestParams(params, secureParams);
|
|
81
|
+
const responseFormat = format || this.format || undefined;
|
|
82
|
+
if (type === ContentType.FormData && body && body !== null && typeof body === 'object') {
|
|
83
|
+
body = this.createFormData(body);
|
|
84
|
+
}
|
|
85
|
+
if (type === ContentType.Text && body && body !== null && typeof body !== 'string') {
|
|
86
|
+
body = JSON.stringify(body);
|
|
87
|
+
}
|
|
88
|
+
return this.instance.request({
|
|
89
|
+
...requestParams,
|
|
90
|
+
headers: {
|
|
91
|
+
...(requestParams.headers || {}),
|
|
92
|
+
...(type ? { 'Content-Type': type } : {}),
|
|
93
|
+
},
|
|
94
|
+
params: query,
|
|
95
|
+
responseType: responseFormat,
|
|
96
|
+
data: body,
|
|
97
|
+
url: path,
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
exports.HttpClient = HttpClient;
|
|
102
|
+
class Sdk extends HttpClient {
|
|
103
|
+
amm = {
|
|
104
|
+
ammv2ControllerGetAmmStates: (query, params = {}) => this.request({
|
|
105
|
+
path: `/v1/amm/states`,
|
|
106
|
+
method: 'GET',
|
|
107
|
+
query: query,
|
|
108
|
+
format: 'json',
|
|
109
|
+
...params,
|
|
110
|
+
}),
|
|
111
|
+
};
|
|
112
|
+
assets = {
|
|
113
|
+
assetsControllerListAssets: (query, params = {}) => this.request({
|
|
114
|
+
path: `/v1/assets`,
|
|
115
|
+
method: 'GET',
|
|
116
|
+
query: query,
|
|
117
|
+
format: 'json',
|
|
118
|
+
...params,
|
|
119
|
+
}),
|
|
120
|
+
};
|
|
121
|
+
markets = {
|
|
122
|
+
marketsControllerListMarkets: (query, params = {}) => this.request({
|
|
123
|
+
path: `/v1/markets`,
|
|
124
|
+
method: 'GET',
|
|
125
|
+
query: query,
|
|
126
|
+
format: 'json',
|
|
127
|
+
...params,
|
|
128
|
+
}),
|
|
129
|
+
marketsControllerGetMarketsByIds: (query, params = {}) => this.request({
|
|
130
|
+
path: `/v1/markets/by-ids`,
|
|
131
|
+
method: 'GET',
|
|
132
|
+
query: query,
|
|
133
|
+
format: 'json',
|
|
134
|
+
...params,
|
|
135
|
+
}),
|
|
136
|
+
marketsControllerListMarketTrades: (query, params = {}) => this.request({
|
|
137
|
+
path: `/v1/markets/trades`,
|
|
138
|
+
method: 'GET',
|
|
139
|
+
query: query,
|
|
140
|
+
format: 'json',
|
|
141
|
+
...params,
|
|
142
|
+
}),
|
|
143
|
+
marketsControllerGetOrderBook: (query, params = {}) => this.request({
|
|
144
|
+
path: `/v1/markets/order-book`,
|
|
145
|
+
method: 'GET',
|
|
146
|
+
query: query,
|
|
147
|
+
format: 'json',
|
|
148
|
+
...params,
|
|
149
|
+
}),
|
|
150
|
+
marketsControllerGetOhlcv: (query, params = {}) => this.request({
|
|
151
|
+
path: `/v1/markets/ohlcv`,
|
|
152
|
+
method: 'GET',
|
|
153
|
+
query: query,
|
|
154
|
+
format: 'json',
|
|
155
|
+
...params,
|
|
156
|
+
}),
|
|
157
|
+
marketsControllerGetHistoricalUnderlyingApr: (query, params = {}) => this.request({
|
|
158
|
+
path: `/v1/markets/historical-underlying-apr`,
|
|
159
|
+
method: 'GET',
|
|
160
|
+
query: query,
|
|
161
|
+
format: 'json',
|
|
162
|
+
...params,
|
|
163
|
+
}),
|
|
164
|
+
};
|
|
165
|
+
indicators = {
|
|
166
|
+
indicatorsControllerGetIndicators: (query, params = {}) => this.request({
|
|
167
|
+
path: `/v1/indicators`,
|
|
168
|
+
method: 'GET',
|
|
169
|
+
query: query,
|
|
170
|
+
format: 'json',
|
|
171
|
+
...params,
|
|
172
|
+
}),
|
|
173
|
+
indicatorsControllerGetIndicatorsExport: (query, params = {}) => this.request({
|
|
174
|
+
path: `/v1/indicators/export`,
|
|
175
|
+
method: 'GET',
|
|
176
|
+
query: query,
|
|
177
|
+
...params,
|
|
178
|
+
}),
|
|
179
|
+
};
|
|
180
|
+
marketAccountUtilities = {
|
|
181
|
+
marketAccV2ControllerEncode: (query, params = {}) => this.request({
|
|
182
|
+
path: `/v1/market-acc/encode`,
|
|
183
|
+
method: 'GET',
|
|
184
|
+
query: query,
|
|
185
|
+
format: 'json',
|
|
186
|
+
...params,
|
|
187
|
+
}),
|
|
188
|
+
marketAccV2ControllerDecode: (query, params = {}) => this.request({
|
|
189
|
+
path: `/v1/market-acc/decode`,
|
|
190
|
+
method: 'GET',
|
|
191
|
+
query: query,
|
|
192
|
+
format: 'json',
|
|
193
|
+
...params,
|
|
194
|
+
}),
|
|
195
|
+
};
|
|
196
|
+
miscellaneous = {
|
|
197
|
+
ordersV2ControllerGetOrdersByPlacedTxHash: (query, params = {}) => this.request({
|
|
198
|
+
path: `/v1/orders/by-tx-hash`,
|
|
199
|
+
method: 'GET',
|
|
200
|
+
query: query,
|
|
201
|
+
format: 'json',
|
|
202
|
+
...params,
|
|
203
|
+
}),
|
|
204
|
+
fundingRateV2ControllerGetAllFundingRateSymbols: (params = {}) => this.request({
|
|
205
|
+
path: `/v1/funding-rate/all-funding-rate-symbols`,
|
|
206
|
+
method: 'GET',
|
|
207
|
+
format: 'json',
|
|
208
|
+
...params,
|
|
209
|
+
}),
|
|
210
|
+
fundingRateV2ControllerGetSettlementSummaryByMarket: (data, params = {}) => this.request({
|
|
211
|
+
path: `/v1/funding-rate/settlement-summary`,
|
|
212
|
+
method: 'POST',
|
|
213
|
+
body: data,
|
|
214
|
+
type: ContentType.Json,
|
|
215
|
+
format: 'json',
|
|
216
|
+
...params,
|
|
217
|
+
}),
|
|
218
|
+
eventsV2ControllerGetLiquidationEvents: (query, params = {}) => this.request({
|
|
219
|
+
path: `/v1/events/liquidation-events`,
|
|
220
|
+
method: 'GET',
|
|
221
|
+
query: query,
|
|
222
|
+
format: 'json',
|
|
223
|
+
...params,
|
|
224
|
+
}),
|
|
225
|
+
onChainEventsV2ControllerGetEvents: (query, params = {}) => this.request({
|
|
226
|
+
path: `/v1/on-chain-events`,
|
|
227
|
+
method: 'GET',
|
|
228
|
+
query: query,
|
|
229
|
+
format: 'json',
|
|
230
|
+
...params,
|
|
231
|
+
}),
|
|
232
|
+
incentivesControllerGetMakerIncentiveCampaign: (marketId, query, params = {}) => this.request({
|
|
233
|
+
path: `/v1/incentives/maker-incentives/campaigns/${marketId}`,
|
|
234
|
+
method: 'GET',
|
|
235
|
+
query: query,
|
|
236
|
+
format: 'json',
|
|
237
|
+
...params,
|
|
238
|
+
}),
|
|
239
|
+
incentivesControllerGetAmmIncentives: (query, params = {}) => this.request({
|
|
240
|
+
path: `/v1/incentives/amm-incentives`,
|
|
241
|
+
method: 'GET',
|
|
242
|
+
query: query,
|
|
243
|
+
format: 'json',
|
|
244
|
+
...params,
|
|
245
|
+
}),
|
|
246
|
+
makerVolumeControllerGetRollingVolume: (query, params = {}) => this.request({
|
|
247
|
+
path: `/v1/maker-volume/rolling`,
|
|
248
|
+
method: 'GET',
|
|
249
|
+
query: query,
|
|
250
|
+
format: 'json',
|
|
251
|
+
...params,
|
|
252
|
+
}),
|
|
253
|
+
tradeVolumeControllerGetRollingTradeVolume: (query, params = {}) => this.request({
|
|
254
|
+
path: `/v1/trade-volume/rolling`,
|
|
255
|
+
method: 'GET',
|
|
256
|
+
query: query,
|
|
257
|
+
format: 'json',
|
|
258
|
+
...params,
|
|
259
|
+
}),
|
|
260
|
+
strategiesV2ControllerFindStrategies: (params = {}) => this.request({
|
|
261
|
+
path: `/v1/strategies`,
|
|
262
|
+
method: 'GET',
|
|
263
|
+
format: 'json',
|
|
264
|
+
...params,
|
|
265
|
+
}),
|
|
266
|
+
gasPriceV2ControllerGetGasPriceInfo: (params = {}) => this.request({
|
|
267
|
+
path: `/v1/gas-price/current`,
|
|
268
|
+
method: 'GET',
|
|
269
|
+
format: 'json',
|
|
270
|
+
...params,
|
|
271
|
+
}),
|
|
272
|
+
leaderboardV2ControllerGetLeaderboard: (query, params = {}) => this.request({
|
|
273
|
+
path: `/v1/leaderboard`,
|
|
274
|
+
method: 'GET',
|
|
275
|
+
query: query,
|
|
276
|
+
format: 'json',
|
|
277
|
+
...params,
|
|
278
|
+
}),
|
|
279
|
+
leaderboardV2ControllerSearchUser: (query, params = {}) => this.request({
|
|
280
|
+
path: `/v1/leaderboard/search`,
|
|
281
|
+
method: 'GET',
|
|
282
|
+
query: query,
|
|
283
|
+
format: 'json',
|
|
284
|
+
...params,
|
|
285
|
+
}),
|
|
286
|
+
tvlV2ControllerGetTvl: (params = {}) => this.request({
|
|
287
|
+
path: `/v1/total-value-locked`,
|
|
288
|
+
method: 'GET',
|
|
289
|
+
format: 'json',
|
|
290
|
+
...params,
|
|
291
|
+
}),
|
|
292
|
+
};
|
|
293
|
+
calldataBuilderUserSigned = {
|
|
294
|
+
calldataBuilderUserControllerBuildDeposit: (data, params = {}) => this.request({
|
|
295
|
+
path: `/v1/calldata-builder/user/deposit`,
|
|
296
|
+
method: 'POST',
|
|
297
|
+
body: data,
|
|
298
|
+
type: ContentType.Json,
|
|
299
|
+
format: 'json',
|
|
300
|
+
...params,
|
|
301
|
+
}),
|
|
302
|
+
calldataBuilderUserControllerBuildRequestWithdrawal: (data, params = {}) => this.request({
|
|
303
|
+
path: `/v1/calldata-builder/user/request-withdrawal`,
|
|
304
|
+
method: 'POST',
|
|
305
|
+
body: data,
|
|
306
|
+
type: ContentType.Json,
|
|
307
|
+
format: 'json',
|
|
308
|
+
...params,
|
|
309
|
+
}),
|
|
310
|
+
calldataBuilderUserControllerBuildCancelWithdrawal: (data, params = {}) => this.request({
|
|
311
|
+
path: `/v1/calldata-builder/user/cancel-withdrawal`,
|
|
312
|
+
method: 'POST',
|
|
313
|
+
body: data,
|
|
314
|
+
type: ContentType.Json,
|
|
315
|
+
format: 'json',
|
|
316
|
+
...params,
|
|
317
|
+
}),
|
|
318
|
+
calldataBuilderUserControllerBuildApproveAgent: (data, params = {}) => this.request({
|
|
319
|
+
path: `/v1/calldata-builder/user/approve-agent`,
|
|
320
|
+
method: 'POST',
|
|
321
|
+
body: data,
|
|
322
|
+
type: ContentType.Json,
|
|
323
|
+
format: 'json',
|
|
324
|
+
...params,
|
|
325
|
+
}),
|
|
326
|
+
calldataBuilderUserControllerBuildRevokeAgent: (data, params = {}) => this.request({
|
|
327
|
+
path: `/v1/calldata-builder/user/revoke-agent`,
|
|
328
|
+
method: 'POST',
|
|
329
|
+
body: data,
|
|
330
|
+
type: ContentType.Json,
|
|
331
|
+
format: 'json',
|
|
332
|
+
...params,
|
|
333
|
+
}),
|
|
334
|
+
calldataBuilderUserControllerBuildVaultPayTreasury: (data, params = {}) => this.request({
|
|
335
|
+
path: `/v1/calldata-builder/user/vault-pay-treasury`,
|
|
336
|
+
method: 'POST',
|
|
337
|
+
body: data,
|
|
338
|
+
type: ContentType.Json,
|
|
339
|
+
format: 'json',
|
|
340
|
+
...params,
|
|
341
|
+
}),
|
|
342
|
+
};
|
|
343
|
+
calldataBuilderAgentExecutable = {
|
|
344
|
+
calldataBuilderAgentControllerBuildPlaceOrder: (data, params = {}) => this.request({
|
|
345
|
+
path: `/v1/calldata-builder/agent/place-order`,
|
|
346
|
+
method: 'POST',
|
|
347
|
+
body: data,
|
|
348
|
+
type: ContentType.Json,
|
|
349
|
+
format: 'json',
|
|
350
|
+
...params,
|
|
351
|
+
}),
|
|
352
|
+
calldataBuilderAgentControllerBuildPlaceOrders: (data, params = {}) => this.request({
|
|
353
|
+
path: `/v1/calldata-builder/agent/place-orders`,
|
|
354
|
+
method: 'POST',
|
|
355
|
+
body: data,
|
|
356
|
+
type: ContentType.Json,
|
|
357
|
+
format: 'json',
|
|
358
|
+
...params,
|
|
359
|
+
}),
|
|
360
|
+
calldataBuilderAgentControllerBuildCancelOrders: (data, params = {}) => this.request({
|
|
361
|
+
path: `/v1/calldata-builder/agent/cancel-orders`,
|
|
362
|
+
method: 'POST',
|
|
363
|
+
body: data,
|
|
364
|
+
type: ContentType.Json,
|
|
365
|
+
format: 'json',
|
|
366
|
+
...params,
|
|
367
|
+
}),
|
|
368
|
+
calldataBuilderAgentControllerBuildCashTransfer: (data, params = {}) => this.request({
|
|
369
|
+
path: `/v1/calldata-builder/agent/cash-transfer`,
|
|
370
|
+
method: 'POST',
|
|
371
|
+
body: data,
|
|
372
|
+
type: ContentType.Json,
|
|
373
|
+
format: 'json',
|
|
374
|
+
...params,
|
|
375
|
+
}),
|
|
376
|
+
calldataBuilderAgentControllerBuildEnterMarkets: (data, params = {}) => this.request({
|
|
377
|
+
path: `/v1/calldata-builder/agent/enter-markets`,
|
|
378
|
+
method: 'POST',
|
|
379
|
+
body: data,
|
|
380
|
+
type: ContentType.Json,
|
|
381
|
+
format: 'json',
|
|
382
|
+
...params,
|
|
383
|
+
}),
|
|
384
|
+
calldataBuilderAgentControllerBuildExitMarkets: (data, params = {}) => this.request({
|
|
385
|
+
path: `/v1/calldata-builder/agent/exit-markets`,
|
|
386
|
+
method: 'POST',
|
|
387
|
+
body: data,
|
|
388
|
+
type: ContentType.Json,
|
|
389
|
+
format: 'json',
|
|
390
|
+
...params,
|
|
391
|
+
}),
|
|
392
|
+
calldataBuilderAgentControllerBuildPayTreasury: (data, params = {}) => this.request({
|
|
393
|
+
path: `/v1/calldata-builder/agent/pay-treasury`,
|
|
394
|
+
method: 'POST',
|
|
395
|
+
body: data,
|
|
396
|
+
type: ContentType.Json,
|
|
397
|
+
format: 'json',
|
|
398
|
+
...params,
|
|
399
|
+
}),
|
|
400
|
+
calldataBuilderAgentControllerBuildAddLiquidityToAmm: (data, params = {}) => this.request({
|
|
401
|
+
path: `/v1/calldata-builder/agent/add-liquidity-to-amm`,
|
|
402
|
+
method: 'POST',
|
|
403
|
+
body: data,
|
|
404
|
+
type: ContentType.Json,
|
|
405
|
+
format: 'json',
|
|
406
|
+
...params,
|
|
407
|
+
}),
|
|
408
|
+
calldataBuilderAgentControllerBuildRemoveLiquidityFromAmm: (data, params = {}) => this.request({
|
|
409
|
+
path: `/v1/calldata-builder/agent/remove-liquidity-from-amm`,
|
|
410
|
+
method: 'POST',
|
|
411
|
+
body: data,
|
|
412
|
+
type: ContentType.Json,
|
|
413
|
+
format: 'json',
|
|
414
|
+
...params,
|
|
415
|
+
}),
|
|
416
|
+
};
|
|
417
|
+
simulations = {
|
|
418
|
+
simulationsControllerSimulateDeposit: (data, params = {}) => this.request({
|
|
419
|
+
path: `/v1/simulations/deposit`,
|
|
420
|
+
method: 'POST',
|
|
421
|
+
body: data,
|
|
422
|
+
type: ContentType.Json,
|
|
423
|
+
format: 'json',
|
|
424
|
+
...params,
|
|
425
|
+
}),
|
|
426
|
+
simulationsControllerSimulateRequestWithdrawal: (data, params = {}) => this.request({
|
|
427
|
+
path: `/v1/simulations/request-withdrawal`,
|
|
428
|
+
method: 'POST',
|
|
429
|
+
body: data,
|
|
430
|
+
type: ContentType.Json,
|
|
431
|
+
format: 'json',
|
|
432
|
+
...params,
|
|
433
|
+
}),
|
|
434
|
+
simulationsControllerSimulateCashTransfer: (data, params = {}) => this.request({
|
|
435
|
+
path: `/v1/simulations/cash-transfer`,
|
|
436
|
+
method: 'POST',
|
|
437
|
+
body: data,
|
|
438
|
+
type: ContentType.Json,
|
|
439
|
+
format: 'json',
|
|
440
|
+
...params,
|
|
441
|
+
}),
|
|
442
|
+
simulationsControllerSimulatePlaceOrder: (data, params = {}) => this.request({
|
|
443
|
+
path: `/v1/simulations/place-order`,
|
|
444
|
+
method: 'POST',
|
|
445
|
+
body: data,
|
|
446
|
+
type: ContentType.Json,
|
|
447
|
+
format: 'json',
|
|
448
|
+
...params,
|
|
449
|
+
}),
|
|
450
|
+
simulationsControllerSimulatePlaceOrderAnonymous: (data, params = {}) => this.request({
|
|
451
|
+
path: `/v1/simulations/place-order-anonymous`,
|
|
452
|
+
method: 'POST',
|
|
453
|
+
body: data,
|
|
454
|
+
type: ContentType.Json,
|
|
455
|
+
format: 'json',
|
|
456
|
+
...params,
|
|
457
|
+
}),
|
|
458
|
+
simulationsControllerSimulateAddLiquidityToAmm: (data, params = {}) => this.request({
|
|
459
|
+
path: `/v1/simulations/add-liquidity-to-amm`,
|
|
460
|
+
method: 'POST',
|
|
461
|
+
body: data,
|
|
462
|
+
type: ContentType.Json,
|
|
463
|
+
format: 'json',
|
|
464
|
+
...params,
|
|
465
|
+
}),
|
|
466
|
+
simulationsControllerSimulateRemoveLiquidityFromAmm: (data, params = {}) => this.request({
|
|
467
|
+
path: `/v1/simulations/remove-liquidity-from-amm`,
|
|
468
|
+
method: 'POST',
|
|
469
|
+
body: data,
|
|
470
|
+
type: ContentType.Json,
|
|
471
|
+
format: 'json',
|
|
472
|
+
...params,
|
|
473
|
+
}),
|
|
474
|
+
};
|
|
475
|
+
accounts = {
|
|
476
|
+
accountsV2ControllerGetUserAmmStates: (query, params = {}) => this.request({
|
|
477
|
+
path: `/v1/accounts/amm-states`,
|
|
478
|
+
method: 'GET',
|
|
479
|
+
query: query,
|
|
480
|
+
format: 'json',
|
|
481
|
+
...params,
|
|
482
|
+
}),
|
|
483
|
+
accountsV2ControllerGetAccountGasBalance: (query, params = {}) => this.request({
|
|
484
|
+
path: `/v1/accounts/gas-balance`,
|
|
485
|
+
method: 'GET',
|
|
486
|
+
query: query,
|
|
487
|
+
format: 'json',
|
|
488
|
+
...params,
|
|
489
|
+
}),
|
|
490
|
+
accountsV2ControllerGetGasConsumptionHistory: (query, params = {}) => this.request({
|
|
491
|
+
path: `/v1/accounts/gas-consumption-history`,
|
|
492
|
+
method: 'GET',
|
|
493
|
+
query: query,
|
|
494
|
+
format: 'json',
|
|
495
|
+
...params,
|
|
496
|
+
}),
|
|
497
|
+
accountsV2ControllerGetTransferLogs: (query, params = {}) => this.request({
|
|
498
|
+
path: `/v1/accounts/transfer-logs`,
|
|
499
|
+
method: 'GET',
|
|
500
|
+
query: query,
|
|
501
|
+
format: 'json',
|
|
502
|
+
...params,
|
|
503
|
+
}),
|
|
504
|
+
accountsV2ControllerGetOrders: (query, params = {}) => this.request({
|
|
505
|
+
path: `/v1/accounts/orders`,
|
|
506
|
+
method: 'GET',
|
|
507
|
+
query: query,
|
|
508
|
+
format: 'json',
|
|
509
|
+
...params,
|
|
510
|
+
}),
|
|
511
|
+
accountsV2ControllerGetOrdersByPlacedTime: (query, params = {}) => this.request({
|
|
512
|
+
path: `/v1/accounts/orders-by-placed-time`,
|
|
513
|
+
method: 'GET',
|
|
514
|
+
query: query,
|
|
515
|
+
format: 'json',
|
|
516
|
+
...params,
|
|
517
|
+
}),
|
|
518
|
+
accountsV2ControllerGetPositionUpdateEvents: (query, params = {}) => this.request({
|
|
519
|
+
path: `/v1/accounts/position-update-events`,
|
|
520
|
+
method: 'GET',
|
|
521
|
+
query: query,
|
|
522
|
+
format: 'json',
|
|
523
|
+
...params,
|
|
524
|
+
}),
|
|
525
|
+
accountsV2ControllerGetSettlementEvents: (query, params = {}) => this.request({
|
|
526
|
+
path: `/v1/accounts/settlement-events`,
|
|
527
|
+
method: 'GET',
|
|
528
|
+
query: query,
|
|
529
|
+
format: 'json',
|
|
530
|
+
...params,
|
|
531
|
+
}),
|
|
532
|
+
accountsV2ControllerGetMarketAccInfos: (data, params = {}) => this.request({
|
|
533
|
+
path: `/v1/accounts/market-acc-infos`,
|
|
534
|
+
method: 'POST',
|
|
535
|
+
body: data,
|
|
536
|
+
type: ContentType.Json,
|
|
537
|
+
format: 'json',
|
|
538
|
+
...params,
|
|
539
|
+
}),
|
|
540
|
+
accountsV2ControllerGetMarketAccInfosByRoot: (query, params = {}) => this.request({
|
|
541
|
+
path: `/v1/accounts/market-acc-infos-by-root`,
|
|
542
|
+
method: 'GET',
|
|
543
|
+
query: query,
|
|
544
|
+
format: 'json',
|
|
545
|
+
...params,
|
|
546
|
+
}),
|
|
547
|
+
accountsV2ControllerGetActivePositions: (query, params = {}) => this.request({
|
|
548
|
+
path: `/v1/accounts/active-positions`,
|
|
549
|
+
method: 'GET',
|
|
550
|
+
query: query,
|
|
551
|
+
format: 'json',
|
|
552
|
+
...params,
|
|
553
|
+
}),
|
|
554
|
+
accountsV2ControllerGetEnteredMarkets: (query, params = {}) => this.request({
|
|
555
|
+
path: `/v1/accounts/entered-markets`,
|
|
556
|
+
method: 'GET',
|
|
557
|
+
query: query,
|
|
558
|
+
format: 'json',
|
|
559
|
+
...params,
|
|
560
|
+
}),
|
|
561
|
+
accountsV2ControllerGetMarginConfig: (query, params = {}) => this.request({
|
|
562
|
+
path: `/v1/accounts/margin-config`,
|
|
563
|
+
method: 'GET',
|
|
564
|
+
query: query,
|
|
565
|
+
format: 'json',
|
|
566
|
+
...params,
|
|
567
|
+
}),
|
|
568
|
+
accountsV2ControllerGetLightEventFeed: (query, params = {}) => this.request({
|
|
569
|
+
path: `/v1/accounts/light-event-feed`,
|
|
570
|
+
method: 'GET',
|
|
571
|
+
query: query,
|
|
572
|
+
format: 'json',
|
|
573
|
+
...params,
|
|
574
|
+
}),
|
|
575
|
+
};
|
|
576
|
+
agents = {
|
|
577
|
+
agentsV2ControllerGetAgentExpiryTime: (query, params = {}) => this.request({
|
|
578
|
+
path: `/v1/agents/expiry-time`,
|
|
579
|
+
method: 'GET',
|
|
580
|
+
query: query,
|
|
581
|
+
format: 'json',
|
|
582
|
+
...params,
|
|
583
|
+
}),
|
|
584
|
+
};
|
|
585
|
+
sendTxs = {
|
|
586
|
+
sendTxsControllerBulkCalls: (data, params = {}) => this.request({
|
|
587
|
+
path: `/v1/send-txs/bulk-calls`,
|
|
588
|
+
method: 'POST',
|
|
589
|
+
body: data,
|
|
590
|
+
type: ContentType.Json,
|
|
591
|
+
format: 'json',
|
|
592
|
+
...params,
|
|
593
|
+
}),
|
|
594
|
+
sendTxsControllerApprove: (data, params = {}) => this.request({
|
|
595
|
+
path: `/v1/send-txs/approve`,
|
|
596
|
+
method: 'POST',
|
|
597
|
+
body: data,
|
|
598
|
+
type: ContentType.Json,
|
|
599
|
+
format: 'json',
|
|
600
|
+
...params,
|
|
601
|
+
}),
|
|
602
|
+
sendTxsControllerTrace: (data, params = {}) => this.request({
|
|
603
|
+
path: `/v1/send-txs/trace`,
|
|
604
|
+
method: 'POST',
|
|
605
|
+
body: data,
|
|
606
|
+
type: ContentType.Json,
|
|
607
|
+
format: 'json',
|
|
608
|
+
...params,
|
|
609
|
+
}),
|
|
610
|
+
sendTxsControllerTxStatus: (data, params = {}) => this.request({
|
|
611
|
+
path: `/v1/send-txs/tx-status`,
|
|
612
|
+
method: 'POST',
|
|
613
|
+
body: data,
|
|
614
|
+
type: ContentType.Json,
|
|
615
|
+
format: 'json',
|
|
616
|
+
...params,
|
|
617
|
+
}),
|
|
618
|
+
sendTxsControllerTxStatusWithEvents: (data, params = {}) => this.request({
|
|
619
|
+
path: `/v1/send-txs/tx-status-with-events`,
|
|
620
|
+
method: 'POST',
|
|
621
|
+
body: data,
|
|
622
|
+
type: ContentType.Json,
|
|
623
|
+
format: 'json',
|
|
624
|
+
...params,
|
|
625
|
+
}),
|
|
626
|
+
sendTxsControllerDedicatedBulkCalls: (data, params = {}) => this.request({
|
|
627
|
+
path: `/v1/send-txs/dedicated/bulk-calls`,
|
|
628
|
+
method: 'POST',
|
|
629
|
+
body: data,
|
|
630
|
+
type: ContentType.Json,
|
|
631
|
+
format: 'json',
|
|
632
|
+
...params,
|
|
633
|
+
}),
|
|
634
|
+
};
|
|
635
|
+
apiKeys = {
|
|
636
|
+
apiKeysControllerCreate: (data, params = {}) => this.request({
|
|
637
|
+
path: `/v1/api-keys`,
|
|
638
|
+
method: 'POST',
|
|
639
|
+
body: data,
|
|
640
|
+
type: ContentType.Json,
|
|
641
|
+
format: 'json',
|
|
642
|
+
...params,
|
|
643
|
+
}),
|
|
644
|
+
apiKeysControllerList: (query, params = {}) => this.request({
|
|
645
|
+
path: `/v1/api-keys`,
|
|
646
|
+
method: 'GET',
|
|
647
|
+
query: query,
|
|
648
|
+
format: 'json',
|
|
649
|
+
...params,
|
|
650
|
+
}),
|
|
651
|
+
apiKeysControllerUpdate: (data, params = {}) => this.request({
|
|
652
|
+
path: `/v1/api-keys/update`,
|
|
653
|
+
method: 'POST',
|
|
654
|
+
body: data,
|
|
655
|
+
type: ContentType.Json,
|
|
656
|
+
format: 'json',
|
|
657
|
+
...params,
|
|
658
|
+
}),
|
|
659
|
+
apiKeysControllerRevoke: (data, params = {}) => this.request({
|
|
660
|
+
path: `/v1/api-keys/revoke`,
|
|
661
|
+
method: 'POST',
|
|
662
|
+
body: data,
|
|
663
|
+
type: ContentType.Json,
|
|
664
|
+
...params,
|
|
665
|
+
}),
|
|
666
|
+
apiKeysMetaControllerDomain: (params = {}) => this.request({
|
|
667
|
+
path: `/v1/api-keys/eip712-domain`,
|
|
668
|
+
method: 'GET',
|
|
669
|
+
format: 'json',
|
|
670
|
+
...params,
|
|
671
|
+
}),
|
|
672
|
+
};
|
|
673
|
+
stopOrders = {
|
|
674
|
+
stopOrdersControllerGetStopOrders: (query, params = {}) => this.request({
|
|
675
|
+
path: `/v1/stop-orders`,
|
|
676
|
+
method: 'GET',
|
|
677
|
+
query: query,
|
|
678
|
+
format: 'json',
|
|
679
|
+
...params,
|
|
680
|
+
}),
|
|
681
|
+
stopOrdersControllerPrepareTpslStopOrder: (query, params = {}) => this.request({
|
|
682
|
+
path: `/v1/stop-orders/prepare`,
|
|
683
|
+
method: 'GET',
|
|
684
|
+
query: query,
|
|
685
|
+
format: 'json',
|
|
686
|
+
...params,
|
|
687
|
+
}),
|
|
688
|
+
stopOrdersControllerGetStopOrder: (query, params = {}) => this.request({
|
|
689
|
+
path: `/v1/stop-orders/detail`,
|
|
690
|
+
method: 'GET',
|
|
691
|
+
query: query,
|
|
692
|
+
format: 'json',
|
|
693
|
+
...params,
|
|
694
|
+
}),
|
|
695
|
+
stopOrdersControllerPlaceStopOrder: (data, params = {}) => this.request({
|
|
696
|
+
path: `/v1/stop-orders/place`,
|
|
697
|
+
method: 'POST',
|
|
698
|
+
body: data,
|
|
699
|
+
type: ContentType.Json,
|
|
700
|
+
format: 'json',
|
|
701
|
+
...params,
|
|
702
|
+
}),
|
|
703
|
+
stopOrdersControllerCancelStopOrders: (data, params = {}) => this.request({
|
|
704
|
+
path: `/v1/stop-orders/cancel`,
|
|
705
|
+
method: 'POST',
|
|
706
|
+
body: data,
|
|
707
|
+
type: ContentType.Json,
|
|
708
|
+
format: 'json',
|
|
709
|
+
...params,
|
|
710
|
+
}),
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
exports.Sdk = Sdk;
|
|
714
|
+
//# sourceMappingURL=OpenApiSdk.js.map
|