@binance/simple-earn 8.0.0 → 9.0.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/index.d.mts +2327 -1102
- package/dist/index.d.ts +2327 -1102
- package/dist/index.js +882 -142
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +873 -130
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -20,39 +20,602 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
20
20
|
// src/index.ts
|
|
21
21
|
var index_exports = {};
|
|
22
22
|
__export(index_exports, {
|
|
23
|
-
BadRequestError: () =>
|
|
24
|
-
ConnectorClientError: () =>
|
|
25
|
-
ForbiddenError: () =>
|
|
26
|
-
NetworkError: () =>
|
|
27
|
-
NotFoundError: () =>
|
|
28
|
-
RateLimitBanError: () =>
|
|
29
|
-
RequiredError: () =>
|
|
30
|
-
SIMPLE_EARN_REST_API_PROD_URL: () =>
|
|
31
|
-
ServerError: () =>
|
|
23
|
+
BadRequestError: () => import_common6.BadRequestError,
|
|
24
|
+
ConnectorClientError: () => import_common6.ConnectorClientError,
|
|
25
|
+
ForbiddenError: () => import_common6.ForbiddenError,
|
|
26
|
+
NetworkError: () => import_common6.NetworkError,
|
|
27
|
+
NotFoundError: () => import_common6.NotFoundError,
|
|
28
|
+
RateLimitBanError: () => import_common6.RateLimitBanError,
|
|
29
|
+
RequiredError: () => import_common6.RequiredError,
|
|
30
|
+
SIMPLE_EARN_REST_API_PROD_URL: () => import_common6.SIMPLE_EARN_REST_API_PROD_URL,
|
|
31
|
+
ServerError: () => import_common6.ServerError,
|
|
32
32
|
SimpleEarn: () => SimpleEarn,
|
|
33
33
|
SimpleEarnRestAPI: () => rest_api_exports,
|
|
34
|
-
TooManyRequestsError: () =>
|
|
35
|
-
UnauthorizedError: () =>
|
|
34
|
+
TooManyRequestsError: () => import_common6.TooManyRequestsError,
|
|
35
|
+
UnauthorizedError: () => import_common6.UnauthorizedError
|
|
36
36
|
});
|
|
37
37
|
module.exports = __toCommonJS(index_exports);
|
|
38
38
|
|
|
39
39
|
// src/simple-earn.ts
|
|
40
|
-
var
|
|
40
|
+
var import_common5 = require("@binance/common");
|
|
41
41
|
|
|
42
42
|
// package.json
|
|
43
43
|
var name = "@binance/simple-earn";
|
|
44
|
-
var version = "
|
|
44
|
+
var version = "9.0.0";
|
|
45
45
|
|
|
46
46
|
// src/rest-api/index.ts
|
|
47
47
|
var rest_api_exports = {};
|
|
48
48
|
__export(rest_api_exports, {
|
|
49
|
+
BfusdApi: () => BfusdApi,
|
|
49
50
|
FlexibleLockedApi: () => FlexibleLockedApi,
|
|
50
51
|
RestAPI: () => RestAPI,
|
|
51
52
|
RwusdApi: () => RwusdApi
|
|
52
53
|
});
|
|
53
54
|
|
|
55
|
+
// src/rest-api/modules/bfusd-api.ts
|
|
56
|
+
var import_common = require("@binance/common");
|
|
57
|
+
var BfusdApiAxiosParamCreator = function(configuration) {
|
|
58
|
+
return {
|
|
59
|
+
/**
|
|
60
|
+
* Get BFUSD account information.
|
|
61
|
+
*
|
|
62
|
+
* Weight: 150
|
|
63
|
+
*
|
|
64
|
+
* @summary Get BFUSD Account (USER_DATA)
|
|
65
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
66
|
+
*
|
|
67
|
+
* @throws {RequiredError}
|
|
68
|
+
*/
|
|
69
|
+
getBfusdAccount: async (recvWindow) => {
|
|
70
|
+
const localVarQueryParameter = {};
|
|
71
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
72
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
73
|
+
}
|
|
74
|
+
let _timeUnit;
|
|
75
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
76
|
+
return {
|
|
77
|
+
endpoint: "/sapi/v1/bfusd/account",
|
|
78
|
+
method: "GET",
|
|
79
|
+
params: localVarQueryParameter,
|
|
80
|
+
timeUnit: _timeUnit
|
|
81
|
+
};
|
|
82
|
+
},
|
|
83
|
+
/**
|
|
84
|
+
* Get BFUSD quota details including fast redemption quota and standard redemption quota.
|
|
85
|
+
*
|
|
86
|
+
* Weight: 150
|
|
87
|
+
*
|
|
88
|
+
* @summary Get BFUSD Quota Details (USER_DATA)
|
|
89
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
90
|
+
*
|
|
91
|
+
* @throws {RequiredError}
|
|
92
|
+
*/
|
|
93
|
+
getBfusdQuotaDetails: async (recvWindow) => {
|
|
94
|
+
const localVarQueryParameter = {};
|
|
95
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
96
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
97
|
+
}
|
|
98
|
+
let _timeUnit;
|
|
99
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
100
|
+
return {
|
|
101
|
+
endpoint: "/sapi/v1/bfusd/quota",
|
|
102
|
+
method: "GET",
|
|
103
|
+
params: localVarQueryParameter,
|
|
104
|
+
timeUnit: _timeUnit
|
|
105
|
+
};
|
|
106
|
+
},
|
|
107
|
+
/**
|
|
108
|
+
* Get BFUSD rate history sorted by descending order.
|
|
109
|
+
*
|
|
110
|
+
* The time between `startTime` and `endTime` cannot be longer than 6 months.
|
|
111
|
+
* If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
|
|
112
|
+
* If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned.
|
|
113
|
+
* If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned.
|
|
114
|
+
*
|
|
115
|
+
* Weight: 150
|
|
116
|
+
*
|
|
117
|
+
* @summary Get BFUSD Rate History (USER_DATA)
|
|
118
|
+
* @param {number} [startTime]
|
|
119
|
+
* @param {number} [endTime]
|
|
120
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
121
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
122
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
123
|
+
*
|
|
124
|
+
* @throws {RequiredError}
|
|
125
|
+
*/
|
|
126
|
+
getBfusdRateHistory: async (startTime, endTime, current, size, recvWindow) => {
|
|
127
|
+
const localVarQueryParameter = {};
|
|
128
|
+
if (startTime !== void 0 && startTime !== null) {
|
|
129
|
+
localVarQueryParameter["startTime"] = startTime;
|
|
130
|
+
}
|
|
131
|
+
if (endTime !== void 0 && endTime !== null) {
|
|
132
|
+
localVarQueryParameter["endTime"] = endTime;
|
|
133
|
+
}
|
|
134
|
+
if (current !== void 0 && current !== null) {
|
|
135
|
+
localVarQueryParameter["current"] = current;
|
|
136
|
+
}
|
|
137
|
+
if (size !== void 0 && size !== null) {
|
|
138
|
+
localVarQueryParameter["size"] = size;
|
|
139
|
+
}
|
|
140
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
141
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
142
|
+
}
|
|
143
|
+
let _timeUnit;
|
|
144
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
145
|
+
return {
|
|
146
|
+
endpoint: "/sapi/v1/bfusd/history/rateHistory",
|
|
147
|
+
method: "GET",
|
|
148
|
+
params: localVarQueryParameter,
|
|
149
|
+
timeUnit: _timeUnit
|
|
150
|
+
};
|
|
151
|
+
},
|
|
152
|
+
/**
|
|
153
|
+
* Get BFUSD redemption history.
|
|
154
|
+
*
|
|
155
|
+
* The time between `startTime` and `endTime` cannot be longer than 6 months.
|
|
156
|
+
* If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
|
|
157
|
+
* If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned.
|
|
158
|
+
* If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned.
|
|
159
|
+
*
|
|
160
|
+
* Weight: 150
|
|
161
|
+
*
|
|
162
|
+
* @summary Get BFUSD Redemption History (USER_DATA)
|
|
163
|
+
* @param {number} [startTime]
|
|
164
|
+
* @param {number} [endTime]
|
|
165
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
166
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
167
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
168
|
+
*
|
|
169
|
+
* @throws {RequiredError}
|
|
170
|
+
*/
|
|
171
|
+
getBfusdRedemptionHistory: async (startTime, endTime, current, size, recvWindow) => {
|
|
172
|
+
const localVarQueryParameter = {};
|
|
173
|
+
if (startTime !== void 0 && startTime !== null) {
|
|
174
|
+
localVarQueryParameter["startTime"] = startTime;
|
|
175
|
+
}
|
|
176
|
+
if (endTime !== void 0 && endTime !== null) {
|
|
177
|
+
localVarQueryParameter["endTime"] = endTime;
|
|
178
|
+
}
|
|
179
|
+
if (current !== void 0 && current !== null) {
|
|
180
|
+
localVarQueryParameter["current"] = current;
|
|
181
|
+
}
|
|
182
|
+
if (size !== void 0 && size !== null) {
|
|
183
|
+
localVarQueryParameter["size"] = size;
|
|
184
|
+
}
|
|
185
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
186
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
187
|
+
}
|
|
188
|
+
let _timeUnit;
|
|
189
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
190
|
+
return {
|
|
191
|
+
endpoint: "/sapi/v1/bfusd/history/redemptionHistory",
|
|
192
|
+
method: "GET",
|
|
193
|
+
params: localVarQueryParameter,
|
|
194
|
+
timeUnit: _timeUnit
|
|
195
|
+
};
|
|
196
|
+
},
|
|
197
|
+
/**
|
|
198
|
+
* Get BFUSD rewards history.
|
|
199
|
+
*
|
|
200
|
+
* The time between `startTime` and `endTime` cannot be longer than 6 months.
|
|
201
|
+
* If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
|
|
202
|
+
* If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned.
|
|
203
|
+
* If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned.
|
|
204
|
+
*
|
|
205
|
+
* Weight: 150
|
|
206
|
+
*
|
|
207
|
+
* @summary Get BFUSD Rewards History (USER_DATA)
|
|
208
|
+
* @param {number} [startTime]
|
|
209
|
+
* @param {number} [endTime]
|
|
210
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
211
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
212
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
213
|
+
*
|
|
214
|
+
* @throws {RequiredError}
|
|
215
|
+
*/
|
|
216
|
+
getBfusdRewardsHistory: async (startTime, endTime, current, size, recvWindow) => {
|
|
217
|
+
const localVarQueryParameter = {};
|
|
218
|
+
if (startTime !== void 0 && startTime !== null) {
|
|
219
|
+
localVarQueryParameter["startTime"] = startTime;
|
|
220
|
+
}
|
|
221
|
+
if (endTime !== void 0 && endTime !== null) {
|
|
222
|
+
localVarQueryParameter["endTime"] = endTime;
|
|
223
|
+
}
|
|
224
|
+
if (current !== void 0 && current !== null) {
|
|
225
|
+
localVarQueryParameter["current"] = current;
|
|
226
|
+
}
|
|
227
|
+
if (size !== void 0 && size !== null) {
|
|
228
|
+
localVarQueryParameter["size"] = size;
|
|
229
|
+
}
|
|
230
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
231
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
232
|
+
}
|
|
233
|
+
let _timeUnit;
|
|
234
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
235
|
+
return {
|
|
236
|
+
endpoint: "/sapi/v1/bfusd/history/rewardsHistory",
|
|
237
|
+
method: "GET",
|
|
238
|
+
params: localVarQueryParameter,
|
|
239
|
+
timeUnit: _timeUnit
|
|
240
|
+
};
|
|
241
|
+
},
|
|
242
|
+
/**
|
|
243
|
+
* Get BFUSD subscription history
|
|
244
|
+
*
|
|
245
|
+
* The time between `startTime` and `endTime` cannot be longer than 6 months.
|
|
246
|
+
* If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
|
|
247
|
+
* If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned.
|
|
248
|
+
* If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time advanced by one month, and data between `startTime` and `endTime` will be returned.
|
|
249
|
+
*
|
|
250
|
+
* Weight: 150
|
|
251
|
+
*
|
|
252
|
+
* @summary Get BFUSD subscription history(USER_DATA)
|
|
253
|
+
* @param {string} [asset] USDC or USDT
|
|
254
|
+
* @param {number} [startTime]
|
|
255
|
+
* @param {number} [endTime]
|
|
256
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
257
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
258
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
259
|
+
*
|
|
260
|
+
* @throws {RequiredError}
|
|
261
|
+
*/
|
|
262
|
+
getBfusdSubscriptionHistory: async (asset, startTime, endTime, current, size, recvWindow) => {
|
|
263
|
+
const localVarQueryParameter = {};
|
|
264
|
+
if (asset !== void 0 && asset !== null) {
|
|
265
|
+
localVarQueryParameter["asset"] = asset;
|
|
266
|
+
}
|
|
267
|
+
if (startTime !== void 0 && startTime !== null) {
|
|
268
|
+
localVarQueryParameter["startTime"] = startTime;
|
|
269
|
+
}
|
|
270
|
+
if (endTime !== void 0 && endTime !== null) {
|
|
271
|
+
localVarQueryParameter["endTime"] = endTime;
|
|
272
|
+
}
|
|
273
|
+
if (current !== void 0 && current !== null) {
|
|
274
|
+
localVarQueryParameter["current"] = current;
|
|
275
|
+
}
|
|
276
|
+
if (size !== void 0 && size !== null) {
|
|
277
|
+
localVarQueryParameter["size"] = size;
|
|
278
|
+
}
|
|
279
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
280
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
281
|
+
}
|
|
282
|
+
let _timeUnit;
|
|
283
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
284
|
+
return {
|
|
285
|
+
endpoint: "/sapi/v1/bfusd/history/subscriptionHistory",
|
|
286
|
+
method: "GET",
|
|
287
|
+
params: localVarQueryParameter,
|
|
288
|
+
timeUnit: _timeUnit
|
|
289
|
+
};
|
|
290
|
+
},
|
|
291
|
+
/**
|
|
292
|
+
* Redeem BFUSD to USDT
|
|
293
|
+
*
|
|
294
|
+
* You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
|
|
295
|
+
*
|
|
296
|
+
* Weight: 150
|
|
297
|
+
*
|
|
298
|
+
* @summary Redeem BFUSD(TRADE)
|
|
299
|
+
* @param {number} amount Amount
|
|
300
|
+
* @param {string} type FAST or STANDARD, defaults to STANDARD
|
|
301
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
302
|
+
*
|
|
303
|
+
* @throws {RequiredError}
|
|
304
|
+
*/
|
|
305
|
+
redeemBfusd: async (amount, type, recvWindow) => {
|
|
306
|
+
(0, import_common.assertParamExists)("redeemBfusd", "amount", amount);
|
|
307
|
+
(0, import_common.assertParamExists)("redeemBfusd", "type", type);
|
|
308
|
+
const localVarQueryParameter = {};
|
|
309
|
+
if (amount !== void 0 && amount !== null) {
|
|
310
|
+
localVarQueryParameter["amount"] = amount;
|
|
311
|
+
}
|
|
312
|
+
if (type !== void 0 && type !== null) {
|
|
313
|
+
localVarQueryParameter["type"] = type;
|
|
314
|
+
}
|
|
315
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
316
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
317
|
+
}
|
|
318
|
+
let _timeUnit;
|
|
319
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
320
|
+
return {
|
|
321
|
+
endpoint: "/sapi/v1/bfusd/redeem",
|
|
322
|
+
method: "POST",
|
|
323
|
+
params: localVarQueryParameter,
|
|
324
|
+
timeUnit: _timeUnit
|
|
325
|
+
};
|
|
326
|
+
},
|
|
327
|
+
/**
|
|
328
|
+
* Subscribe BFUSD
|
|
329
|
+
*
|
|
330
|
+
* You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
|
|
331
|
+
*
|
|
332
|
+
* Weight: 150
|
|
333
|
+
*
|
|
334
|
+
* @summary Subscribe BFUSD(TRADE)
|
|
335
|
+
* @param {string} asset USDT or USDC (whichever is eligible)
|
|
336
|
+
* @param {number} amount Amount
|
|
337
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
338
|
+
*
|
|
339
|
+
* @throws {RequiredError}
|
|
340
|
+
*/
|
|
341
|
+
subscribeBfusd: async (asset, amount, recvWindow) => {
|
|
342
|
+
(0, import_common.assertParamExists)("subscribeBfusd", "asset", asset);
|
|
343
|
+
(0, import_common.assertParamExists)("subscribeBfusd", "amount", amount);
|
|
344
|
+
const localVarQueryParameter = {};
|
|
345
|
+
if (asset !== void 0 && asset !== null) {
|
|
346
|
+
localVarQueryParameter["asset"] = asset;
|
|
347
|
+
}
|
|
348
|
+
if (amount !== void 0 && amount !== null) {
|
|
349
|
+
localVarQueryParameter["amount"] = amount;
|
|
350
|
+
}
|
|
351
|
+
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
352
|
+
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
353
|
+
}
|
|
354
|
+
let _timeUnit;
|
|
355
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
356
|
+
return {
|
|
357
|
+
endpoint: "/sapi/v1/bfusd/subscribe",
|
|
358
|
+
method: "POST",
|
|
359
|
+
params: localVarQueryParameter,
|
|
360
|
+
timeUnit: _timeUnit
|
|
361
|
+
};
|
|
362
|
+
}
|
|
363
|
+
};
|
|
364
|
+
};
|
|
365
|
+
var BfusdApi = class {
|
|
366
|
+
constructor(configuration) {
|
|
367
|
+
this.configuration = configuration;
|
|
368
|
+
this.localVarAxiosParamCreator = BfusdApiAxiosParamCreator(configuration);
|
|
369
|
+
}
|
|
370
|
+
/**
|
|
371
|
+
* Get BFUSD account information.
|
|
372
|
+
*
|
|
373
|
+
* Weight: 150
|
|
374
|
+
*
|
|
375
|
+
* @summary Get BFUSD Account (USER_DATA)
|
|
376
|
+
* @param {GetBfusdAccountRequest} requestParameters Request parameters.
|
|
377
|
+
* @returns {Promise<RestApiResponse<GetBfusdAccountResponse>>}
|
|
378
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
379
|
+
* @memberof BfusdApi
|
|
380
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/account/ Binance API Documentation}
|
|
381
|
+
*/
|
|
382
|
+
async getBfusdAccount(requestParameters = {}) {
|
|
383
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getBfusdAccount(
|
|
384
|
+
requestParameters?.recvWindow
|
|
385
|
+
);
|
|
386
|
+
return (0, import_common.sendRequest)(
|
|
387
|
+
this.configuration,
|
|
388
|
+
localVarAxiosArgs.endpoint,
|
|
389
|
+
localVarAxiosArgs.method,
|
|
390
|
+
localVarAxiosArgs.params,
|
|
391
|
+
localVarAxiosArgs?.timeUnit,
|
|
392
|
+
{ isSigned: true }
|
|
393
|
+
);
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Get BFUSD quota details including fast redemption quota and standard redemption quota.
|
|
397
|
+
*
|
|
398
|
+
* Weight: 150
|
|
399
|
+
*
|
|
400
|
+
* @summary Get BFUSD Quota Details (USER_DATA)
|
|
401
|
+
* @param {GetBfusdQuotaDetailsRequest} requestParameters Request parameters.
|
|
402
|
+
* @returns {Promise<RestApiResponse<GetBfusdQuotaDetailsResponse>>}
|
|
403
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
404
|
+
* @memberof BfusdApi
|
|
405
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/account/Get-BFUSD-Quota-Details Binance API Documentation}
|
|
406
|
+
*/
|
|
407
|
+
async getBfusdQuotaDetails(requestParameters = {}) {
|
|
408
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getBfusdQuotaDetails(
|
|
409
|
+
requestParameters?.recvWindow
|
|
410
|
+
);
|
|
411
|
+
return (0, import_common.sendRequest)(
|
|
412
|
+
this.configuration,
|
|
413
|
+
localVarAxiosArgs.endpoint,
|
|
414
|
+
localVarAxiosArgs.method,
|
|
415
|
+
localVarAxiosArgs.params,
|
|
416
|
+
localVarAxiosArgs?.timeUnit,
|
|
417
|
+
{ isSigned: true }
|
|
418
|
+
);
|
|
419
|
+
}
|
|
420
|
+
/**
|
|
421
|
+
* Get BFUSD rate history sorted by descending order.
|
|
422
|
+
*
|
|
423
|
+
* The time between `startTime` and `endTime` cannot be longer than 6 months.
|
|
424
|
+
* If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
|
|
425
|
+
* If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned.
|
|
426
|
+
* If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned.
|
|
427
|
+
*
|
|
428
|
+
* Weight: 150
|
|
429
|
+
*
|
|
430
|
+
* @summary Get BFUSD Rate History (USER_DATA)
|
|
431
|
+
* @param {GetBfusdRateHistoryRequest} requestParameters Request parameters.
|
|
432
|
+
* @returns {Promise<RestApiResponse<GetBfusdRateHistoryResponse>>}
|
|
433
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
434
|
+
* @memberof BfusdApi
|
|
435
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/history/Get-BFUSD-Rate-History Binance API Documentation}
|
|
436
|
+
*/
|
|
437
|
+
async getBfusdRateHistory(requestParameters = {}) {
|
|
438
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getBfusdRateHistory(
|
|
439
|
+
requestParameters?.startTime,
|
|
440
|
+
requestParameters?.endTime,
|
|
441
|
+
requestParameters?.current,
|
|
442
|
+
requestParameters?.size,
|
|
443
|
+
requestParameters?.recvWindow
|
|
444
|
+
);
|
|
445
|
+
return (0, import_common.sendRequest)(
|
|
446
|
+
this.configuration,
|
|
447
|
+
localVarAxiosArgs.endpoint,
|
|
448
|
+
localVarAxiosArgs.method,
|
|
449
|
+
localVarAxiosArgs.params,
|
|
450
|
+
localVarAxiosArgs?.timeUnit,
|
|
451
|
+
{ isSigned: true }
|
|
452
|
+
);
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Get BFUSD redemption history.
|
|
456
|
+
*
|
|
457
|
+
* The time between `startTime` and `endTime` cannot be longer than 6 months.
|
|
458
|
+
* If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
|
|
459
|
+
* If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned.
|
|
460
|
+
* If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned.
|
|
461
|
+
*
|
|
462
|
+
* Weight: 150
|
|
463
|
+
*
|
|
464
|
+
* @summary Get BFUSD Redemption History (USER_DATA)
|
|
465
|
+
* @param {GetBfusdRedemptionHistoryRequest} requestParameters Request parameters.
|
|
466
|
+
* @returns {Promise<RestApiResponse<GetBfusdRedemptionHistoryResponse>>}
|
|
467
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
468
|
+
* @memberof BfusdApi
|
|
469
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/history/Get-BFUSD-Redemption-History Binance API Documentation}
|
|
470
|
+
*/
|
|
471
|
+
async getBfusdRedemptionHistory(requestParameters = {}) {
|
|
472
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getBfusdRedemptionHistory(
|
|
473
|
+
requestParameters?.startTime,
|
|
474
|
+
requestParameters?.endTime,
|
|
475
|
+
requestParameters?.current,
|
|
476
|
+
requestParameters?.size,
|
|
477
|
+
requestParameters?.recvWindow
|
|
478
|
+
);
|
|
479
|
+
return (0, import_common.sendRequest)(
|
|
480
|
+
this.configuration,
|
|
481
|
+
localVarAxiosArgs.endpoint,
|
|
482
|
+
localVarAxiosArgs.method,
|
|
483
|
+
localVarAxiosArgs.params,
|
|
484
|
+
localVarAxiosArgs?.timeUnit,
|
|
485
|
+
{ isSigned: true }
|
|
486
|
+
);
|
|
487
|
+
}
|
|
488
|
+
/**
|
|
489
|
+
* Get BFUSD rewards history.
|
|
490
|
+
*
|
|
491
|
+
* The time between `startTime` and `endTime` cannot be longer than 6 months.
|
|
492
|
+
* If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
|
|
493
|
+
* If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned.
|
|
494
|
+
* If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned.
|
|
495
|
+
*
|
|
496
|
+
* Weight: 150
|
|
497
|
+
*
|
|
498
|
+
* @summary Get BFUSD Rewards History (USER_DATA)
|
|
499
|
+
* @param {GetBfusdRewardsHistoryRequest} requestParameters Request parameters.
|
|
500
|
+
* @returns {Promise<RestApiResponse<GetBfusdRewardsHistoryResponse>>}
|
|
501
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
502
|
+
* @memberof BfusdApi
|
|
503
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/history/Get-BFUSD-Rewards-History Binance API Documentation}
|
|
504
|
+
*/
|
|
505
|
+
async getBfusdRewardsHistory(requestParameters = {}) {
|
|
506
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getBfusdRewardsHistory(
|
|
507
|
+
requestParameters?.startTime,
|
|
508
|
+
requestParameters?.endTime,
|
|
509
|
+
requestParameters?.current,
|
|
510
|
+
requestParameters?.size,
|
|
511
|
+
requestParameters?.recvWindow
|
|
512
|
+
);
|
|
513
|
+
return (0, import_common.sendRequest)(
|
|
514
|
+
this.configuration,
|
|
515
|
+
localVarAxiosArgs.endpoint,
|
|
516
|
+
localVarAxiosArgs.method,
|
|
517
|
+
localVarAxiosArgs.params,
|
|
518
|
+
localVarAxiosArgs?.timeUnit,
|
|
519
|
+
{ isSigned: true }
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
/**
|
|
523
|
+
* Get BFUSD subscription history
|
|
524
|
+
*
|
|
525
|
+
* The time between `startTime` and `endTime` cannot be longer than 6 months.
|
|
526
|
+
* If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
|
|
527
|
+
* If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned.
|
|
528
|
+
* If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time advanced by one month, and data between `startTime` and `endTime` will be returned.
|
|
529
|
+
*
|
|
530
|
+
* Weight: 150
|
|
531
|
+
*
|
|
532
|
+
* @summary Get BFUSD subscription history(USER_DATA)
|
|
533
|
+
* @param {GetBfusdSubscriptionHistoryRequest} requestParameters Request parameters.
|
|
534
|
+
* @returns {Promise<RestApiResponse<GetBfusdSubscriptionHistoryResponse>>}
|
|
535
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
536
|
+
* @memberof BfusdApi
|
|
537
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/history/Get-BFUSD-subscription-history Binance API Documentation}
|
|
538
|
+
*/
|
|
539
|
+
async getBfusdSubscriptionHistory(requestParameters = {}) {
|
|
540
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getBfusdSubscriptionHistory(
|
|
541
|
+
requestParameters?.asset,
|
|
542
|
+
requestParameters?.startTime,
|
|
543
|
+
requestParameters?.endTime,
|
|
544
|
+
requestParameters?.current,
|
|
545
|
+
requestParameters?.size,
|
|
546
|
+
requestParameters?.recvWindow
|
|
547
|
+
);
|
|
548
|
+
return (0, import_common.sendRequest)(
|
|
549
|
+
this.configuration,
|
|
550
|
+
localVarAxiosArgs.endpoint,
|
|
551
|
+
localVarAxiosArgs.method,
|
|
552
|
+
localVarAxiosArgs.params,
|
|
553
|
+
localVarAxiosArgs?.timeUnit,
|
|
554
|
+
{ isSigned: true }
|
|
555
|
+
);
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* Redeem BFUSD to USDT
|
|
559
|
+
*
|
|
560
|
+
* You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
|
|
561
|
+
*
|
|
562
|
+
* Weight: 150
|
|
563
|
+
*
|
|
564
|
+
* @summary Redeem BFUSD(TRADE)
|
|
565
|
+
* @param {RedeemBfusdRequest} requestParameters Request parameters.
|
|
566
|
+
* @returns {Promise<RestApiResponse<RedeemBfusdResponse>>}
|
|
567
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
568
|
+
* @memberof BfusdApi
|
|
569
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/earn/Redeem-BFUSD Binance API Documentation}
|
|
570
|
+
*/
|
|
571
|
+
async redeemBfusd(requestParameters) {
|
|
572
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.redeemBfusd(
|
|
573
|
+
requestParameters?.amount,
|
|
574
|
+
requestParameters?.type,
|
|
575
|
+
requestParameters?.recvWindow
|
|
576
|
+
);
|
|
577
|
+
return (0, import_common.sendRequest)(
|
|
578
|
+
this.configuration,
|
|
579
|
+
localVarAxiosArgs.endpoint,
|
|
580
|
+
localVarAxiosArgs.method,
|
|
581
|
+
localVarAxiosArgs.params,
|
|
582
|
+
localVarAxiosArgs?.timeUnit,
|
|
583
|
+
{ isSigned: true }
|
|
584
|
+
);
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Subscribe BFUSD
|
|
588
|
+
*
|
|
589
|
+
* You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
|
|
590
|
+
*
|
|
591
|
+
* Weight: 150
|
|
592
|
+
*
|
|
593
|
+
* @summary Subscribe BFUSD(TRADE)
|
|
594
|
+
* @param {SubscribeBfusdRequest} requestParameters Request parameters.
|
|
595
|
+
* @returns {Promise<RestApiResponse<SubscribeBfusdResponse>>}
|
|
596
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
597
|
+
* @memberof BfusdApi
|
|
598
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/earn/Subscribe-BFUSD Binance API Documentation}
|
|
599
|
+
*/
|
|
600
|
+
async subscribeBfusd(requestParameters) {
|
|
601
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.subscribeBfusd(
|
|
602
|
+
requestParameters?.asset,
|
|
603
|
+
requestParameters?.amount,
|
|
604
|
+
requestParameters?.recvWindow
|
|
605
|
+
);
|
|
606
|
+
return (0, import_common.sendRequest)(
|
|
607
|
+
this.configuration,
|
|
608
|
+
localVarAxiosArgs.endpoint,
|
|
609
|
+
localVarAxiosArgs.method,
|
|
610
|
+
localVarAxiosArgs.params,
|
|
611
|
+
localVarAxiosArgs?.timeUnit,
|
|
612
|
+
{ isSigned: true }
|
|
613
|
+
);
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
|
|
54
617
|
// src/rest-api/modules/flexible-locked-api.ts
|
|
55
|
-
var
|
|
618
|
+
var import_common2 = require("@binance/common");
|
|
56
619
|
var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
57
620
|
return {
|
|
58
621
|
/**
|
|
@@ -69,9 +632,9 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
69
632
|
* @param {string} [productId]
|
|
70
633
|
* @param {number} [startTime]
|
|
71
634
|
* @param {number} [endTime]
|
|
72
|
-
* @param {number} [current] Currently querying
|
|
73
|
-
* @param {number} [size] Default:10, Max:100
|
|
74
|
-
* @param {number} [recvWindow]
|
|
635
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
636
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
637
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
75
638
|
*
|
|
76
639
|
* @throws {RequiredError}
|
|
77
640
|
*/
|
|
@@ -111,12 +674,12 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
111
674
|
*
|
|
112
675
|
* @summary Get Flexible Personal Left Quota(USER_DATA)
|
|
113
676
|
* @param {string} productId
|
|
114
|
-
* @param {number} [recvWindow]
|
|
677
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
115
678
|
*
|
|
116
679
|
* @throws {RequiredError}
|
|
117
680
|
*/
|
|
118
681
|
getFlexiblePersonalLeftQuota: async (productId, recvWindow) => {
|
|
119
|
-
(0,
|
|
682
|
+
(0, import_common2.assertParamExists)("getFlexiblePersonalLeftQuota", "productId", productId);
|
|
120
683
|
const localVarQueryParameter = {};
|
|
121
684
|
if (productId !== void 0 && productId !== null) {
|
|
122
685
|
localVarQueryParameter["productId"] = productId;
|
|
@@ -141,9 +704,9 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
141
704
|
* @summary Get Flexible Product Position(USER_DATA)
|
|
142
705
|
* @param {string} [asset] USDC or USDT
|
|
143
706
|
* @param {string} [productId]
|
|
144
|
-
* @param {number} [current] Currently querying
|
|
145
|
-
* @param {number} [size] Default:10, Max:100
|
|
146
|
-
* @param {number} [recvWindow]
|
|
707
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
708
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
709
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
147
710
|
*
|
|
148
711
|
* @throws {RequiredError}
|
|
149
712
|
*/
|
|
@@ -189,9 +752,9 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
189
752
|
* @param {string} [asset] USDC or USDT
|
|
190
753
|
* @param {number} [startTime]
|
|
191
754
|
* @param {number} [endTime]
|
|
192
|
-
* @param {number} [current] Currently querying
|
|
193
|
-
* @param {number} [size] Default:10, Max:100
|
|
194
|
-
* @param {number} [recvWindow]
|
|
755
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
756
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
757
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
195
758
|
*
|
|
196
759
|
* @throws {RequiredError}
|
|
197
760
|
*/
|
|
@@ -246,14 +809,14 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
246
809
|
* @param {string} [asset] USDC or USDT
|
|
247
810
|
* @param {number} [startTime]
|
|
248
811
|
* @param {number} [endTime]
|
|
249
|
-
* @param {number} [current] Currently querying
|
|
250
|
-
* @param {number} [size] Default:10, Max:100
|
|
251
|
-
* @param {number} [recvWindow]
|
|
812
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
813
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
814
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
252
815
|
*
|
|
253
816
|
* @throws {RequiredError}
|
|
254
817
|
*/
|
|
255
818
|
getFlexibleRewardsHistory: async (type, productId, asset, startTime, endTime, current, size, recvWindow) => {
|
|
256
|
-
(0,
|
|
819
|
+
(0, import_common2.assertParamExists)("getFlexibleRewardsHistory", "type", type);
|
|
257
820
|
const localVarQueryParameter = {};
|
|
258
821
|
if (productId !== void 0 && productId !== null) {
|
|
259
822
|
localVarQueryParameter["productId"] = productId;
|
|
@@ -296,13 +859,13 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
296
859
|
* @summary Get Flexible Subscription Preview(USER_DATA)
|
|
297
860
|
* @param {string} productId
|
|
298
861
|
* @param {number} amount Amount
|
|
299
|
-
* @param {number} [recvWindow]
|
|
862
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
300
863
|
*
|
|
301
864
|
* @throws {RequiredError}
|
|
302
865
|
*/
|
|
303
866
|
getFlexibleSubscriptionPreview: async (productId, amount, recvWindow) => {
|
|
304
|
-
(0,
|
|
305
|
-
(0,
|
|
867
|
+
(0, import_common2.assertParamExists)("getFlexibleSubscriptionPreview", "productId", productId);
|
|
868
|
+
(0, import_common2.assertParamExists)("getFlexibleSubscriptionPreview", "amount", amount);
|
|
306
869
|
const localVarQueryParameter = {};
|
|
307
870
|
if (productId !== void 0 && productId !== null) {
|
|
308
871
|
localVarQueryParameter["productId"] = productId;
|
|
@@ -338,9 +901,9 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
338
901
|
* @param {string} [asset] USDC or USDT
|
|
339
902
|
* @param {number} [startTime]
|
|
340
903
|
* @param {number} [endTime]
|
|
341
|
-
* @param {number} [current] Currently querying
|
|
342
|
-
* @param {number} [size] Default:10, Max:100
|
|
343
|
-
* @param {number} [recvWindow]
|
|
904
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
905
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
906
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
344
907
|
*
|
|
345
908
|
* @throws {RequiredError}
|
|
346
909
|
*/
|
|
@@ -386,12 +949,12 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
386
949
|
*
|
|
387
950
|
* @summary Get Locked Personal Left Quota(USER_DATA)
|
|
388
951
|
* @param {string} projectId
|
|
389
|
-
* @param {number} [recvWindow]
|
|
952
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
390
953
|
*
|
|
391
954
|
* @throws {RequiredError}
|
|
392
955
|
*/
|
|
393
956
|
getLockedPersonalLeftQuota: async (projectId, recvWindow) => {
|
|
394
|
-
(0,
|
|
957
|
+
(0, import_common2.assertParamExists)("getLockedPersonalLeftQuota", "projectId", projectId);
|
|
395
958
|
const localVarQueryParameter = {};
|
|
396
959
|
if (projectId !== void 0 && projectId !== null) {
|
|
397
960
|
localVarQueryParameter["projectId"] = projectId;
|
|
@@ -417,9 +980,9 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
417
980
|
* @param {string} [asset] USDC or USDT
|
|
418
981
|
* @param {number} [positionId]
|
|
419
982
|
* @param {string} [projectId]
|
|
420
|
-
* @param {number} [current] Currently querying
|
|
421
|
-
* @param {number} [size] Default:10, Max:100
|
|
422
|
-
* @param {number} [recvWindow]
|
|
983
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
984
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
985
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
423
986
|
*
|
|
424
987
|
* @throws {RequiredError}
|
|
425
988
|
*/
|
|
@@ -468,9 +1031,9 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
468
1031
|
* @param {string} [asset] USDC or USDT
|
|
469
1032
|
* @param {number} [startTime]
|
|
470
1033
|
* @param {number} [endTime]
|
|
471
|
-
* @param {number} [current] Currently querying
|
|
472
|
-
* @param {number} [size] Default:10, Max:100
|
|
473
|
-
* @param {number} [recvWindow]
|
|
1034
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
1035
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
1036
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
474
1037
|
*
|
|
475
1038
|
* @throws {RequiredError}
|
|
476
1039
|
*/
|
|
@@ -524,9 +1087,9 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
524
1087
|
* @param {string} [asset] USDC or USDT
|
|
525
1088
|
* @param {number} [startTime]
|
|
526
1089
|
* @param {number} [endTime]
|
|
527
|
-
* @param {number} [current] Currently querying
|
|
528
|
-
* @param {number} [size] Default:10, Max:100
|
|
529
|
-
* @param {number} [recvWindow]
|
|
1090
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
1091
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
1092
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
530
1093
|
*
|
|
531
1094
|
* @throws {RequiredError}
|
|
532
1095
|
*/
|
|
@@ -571,13 +1134,13 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
571
1134
|
* @param {string} projectId
|
|
572
1135
|
* @param {number} amount Amount
|
|
573
1136
|
* @param {boolean} [autoSubscribe] true or false, default true.
|
|
574
|
-
* @param {number} [recvWindow]
|
|
1137
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
575
1138
|
*
|
|
576
1139
|
* @throws {RequiredError}
|
|
577
1140
|
*/
|
|
578
1141
|
getLockedSubscriptionPreview: async (projectId, amount, autoSubscribe, recvWindow) => {
|
|
579
|
-
(0,
|
|
580
|
-
(0,
|
|
1142
|
+
(0, import_common2.assertParamExists)("getLockedSubscriptionPreview", "projectId", projectId);
|
|
1143
|
+
(0, import_common2.assertParamExists)("getLockedSubscriptionPreview", "amount", amount);
|
|
581
1144
|
const localVarQueryParameter = {};
|
|
582
1145
|
if (projectId !== void 0 && projectId !== null) {
|
|
583
1146
|
localVarQueryParameter["projectId"] = projectId;
|
|
@@ -615,9 +1178,9 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
615
1178
|
* @param {string} [asset] USDC or USDT
|
|
616
1179
|
* @param {number} [startTime]
|
|
617
1180
|
* @param {number} [endTime]
|
|
618
|
-
* @param {number} [current] Currently querying
|
|
619
|
-
* @param {number} [size] Default:10, Max:100
|
|
620
|
-
* @param {number} [recvWindow]
|
|
1181
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
1182
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
1183
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
621
1184
|
*
|
|
622
1185
|
* @throws {RequiredError}
|
|
623
1186
|
*/
|
|
@@ -668,14 +1231,14 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
668
1231
|
* @param {string} [aprPeriod] "DAY","YEAR",default"DAY"
|
|
669
1232
|
* @param {number} [startTime]
|
|
670
1233
|
* @param {number} [endTime]
|
|
671
|
-
* @param {number} [current] Currently querying
|
|
672
|
-
* @param {number} [size] Default:10, Max:100
|
|
673
|
-
* @param {number} [recvWindow]
|
|
1234
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
1235
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
1236
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
674
1237
|
*
|
|
675
1238
|
* @throws {RequiredError}
|
|
676
1239
|
*/
|
|
677
1240
|
getRateHistory: async (productId, aprPeriod, startTime, endTime, current, size, recvWindow) => {
|
|
678
|
-
(0,
|
|
1241
|
+
(0, import_common2.assertParamExists)("getRateHistory", "productId", productId);
|
|
679
1242
|
const localVarQueryParameter = {};
|
|
680
1243
|
if (productId !== void 0 && productId !== null) {
|
|
681
1244
|
localVarQueryParameter["productId"] = productId;
|
|
@@ -714,9 +1277,9 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
714
1277
|
*
|
|
715
1278
|
* @summary Get Simple Earn Flexible Product List(USER_DATA)
|
|
716
1279
|
* @param {string} [asset] USDC or USDT
|
|
717
|
-
* @param {number} [current] Currently querying
|
|
718
|
-
* @param {number} [size] Default:10, Max:100
|
|
719
|
-
* @param {number} [recvWindow]
|
|
1280
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
1281
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
1282
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
720
1283
|
*
|
|
721
1284
|
* @throws {RequiredError}
|
|
722
1285
|
*/
|
|
@@ -752,9 +1315,9 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
752
1315
|
*
|
|
753
1316
|
* @summary Get Simple Earn Locked Product List(USER_DATA)
|
|
754
1317
|
* @param {string} [asset] USDC or USDT
|
|
755
|
-
* @param {number} [current] Currently querying
|
|
756
|
-
* @param {number} [size] Default:10, Max:100
|
|
757
|
-
* @param {number} [recvWindow]
|
|
1318
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
1319
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
1320
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
758
1321
|
*
|
|
759
1322
|
* @throws {RequiredError}
|
|
760
1323
|
*/
|
|
@@ -793,12 +1356,12 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
793
1356
|
* @param {boolean} [redeemAll] true or false, default to false
|
|
794
1357
|
* @param {number} [amount] if redeemAll is false, amount is mandatory
|
|
795
1358
|
* @param {string} [destAccount] `SPOT`,`FUND`, default `SPOT`
|
|
796
|
-
* @param {number} [recvWindow]
|
|
1359
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
797
1360
|
*
|
|
798
1361
|
* @throws {RequiredError}
|
|
799
1362
|
*/
|
|
800
1363
|
redeemFlexibleProduct: async (productId, redeemAll, amount, destAccount, recvWindow) => {
|
|
801
|
-
(0,
|
|
1364
|
+
(0, import_common2.assertParamExists)("redeemFlexibleProduct", "productId", productId);
|
|
802
1365
|
const localVarQueryParameter = {};
|
|
803
1366
|
if (productId !== void 0 && productId !== null) {
|
|
804
1367
|
localVarQueryParameter["productId"] = productId;
|
|
@@ -833,12 +1396,12 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
833
1396
|
*
|
|
834
1397
|
* @summary Redeem Locked Product(TRADE)
|
|
835
1398
|
* @param {string} positionId
|
|
836
|
-
* @param {number} [recvWindow]
|
|
1399
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
837
1400
|
*
|
|
838
1401
|
* @throws {RequiredError}
|
|
839
1402
|
*/
|
|
840
1403
|
redeemLockedProduct: async (positionId, recvWindow) => {
|
|
841
|
-
(0,
|
|
1404
|
+
(0, import_common2.assertParamExists)("redeemLockedProduct", "positionId", positionId);
|
|
842
1405
|
const localVarQueryParameter = {};
|
|
843
1406
|
if (positionId !== void 0 && positionId !== null) {
|
|
844
1407
|
localVarQueryParameter["positionId"] = positionId;
|
|
@@ -863,13 +1426,13 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
863
1426
|
* @summary Set Flexible Auto Subscribe(USER_DATA)
|
|
864
1427
|
* @param {string} productId
|
|
865
1428
|
* @param {boolean} autoSubscribe true or false
|
|
866
|
-
* @param {number} [recvWindow]
|
|
1429
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
867
1430
|
*
|
|
868
1431
|
* @throws {RequiredError}
|
|
869
1432
|
*/
|
|
870
1433
|
setFlexibleAutoSubscribe: async (productId, autoSubscribe, recvWindow) => {
|
|
871
|
-
(0,
|
|
872
|
-
(0,
|
|
1434
|
+
(0, import_common2.assertParamExists)("setFlexibleAutoSubscribe", "productId", productId);
|
|
1435
|
+
(0, import_common2.assertParamExists)("setFlexibleAutoSubscribe", "autoSubscribe", autoSubscribe);
|
|
873
1436
|
const localVarQueryParameter = {};
|
|
874
1437
|
if (productId !== void 0 && productId !== null) {
|
|
875
1438
|
localVarQueryParameter["productId"] = productId;
|
|
@@ -897,13 +1460,13 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
897
1460
|
* @summary Set Locked Auto Subscribe(USER_DATA)
|
|
898
1461
|
* @param {string} positionId
|
|
899
1462
|
* @param {boolean} autoSubscribe true or false
|
|
900
|
-
* @param {number} [recvWindow]
|
|
1463
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
901
1464
|
*
|
|
902
1465
|
* @throws {RequiredError}
|
|
903
1466
|
*/
|
|
904
1467
|
setLockedAutoSubscribe: async (positionId, autoSubscribe, recvWindow) => {
|
|
905
|
-
(0,
|
|
906
|
-
(0,
|
|
1468
|
+
(0, import_common2.assertParamExists)("setLockedAutoSubscribe", "positionId", positionId);
|
|
1469
|
+
(0, import_common2.assertParamExists)("setLockedAutoSubscribe", "autoSubscribe", autoSubscribe);
|
|
907
1470
|
const localVarQueryParameter = {};
|
|
908
1471
|
if (positionId !== void 0 && positionId !== null) {
|
|
909
1472
|
localVarQueryParameter["positionId"] = positionId;
|
|
@@ -931,13 +1494,13 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
931
1494
|
* @summary Set Locked Product Redeem Option(USER_DATA)
|
|
932
1495
|
* @param {string} positionId
|
|
933
1496
|
* @param {string} redeemTo `SPOT`,'FLEXIBLE'
|
|
934
|
-
* @param {number} [recvWindow]
|
|
1497
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
935
1498
|
*
|
|
936
1499
|
* @throws {RequiredError}
|
|
937
1500
|
*/
|
|
938
1501
|
setLockedProductRedeemOption: async (positionId, redeemTo, recvWindow) => {
|
|
939
|
-
(0,
|
|
940
|
-
(0,
|
|
1502
|
+
(0, import_common2.assertParamExists)("setLockedProductRedeemOption", "positionId", positionId);
|
|
1503
|
+
(0, import_common2.assertParamExists)("setLockedProductRedeemOption", "redeemTo", redeemTo);
|
|
941
1504
|
const localVarQueryParameter = {};
|
|
942
1505
|
if (positionId !== void 0 && positionId !== null) {
|
|
943
1506
|
localVarQueryParameter["positionId"] = positionId;
|
|
@@ -963,7 +1526,7 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
963
1526
|
* Weight: 150
|
|
964
1527
|
*
|
|
965
1528
|
* @summary Simple Account(USER_DATA)
|
|
966
|
-
* @param {number} [recvWindow]
|
|
1529
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
967
1530
|
*
|
|
968
1531
|
* @throws {RequiredError}
|
|
969
1532
|
*/
|
|
@@ -993,13 +1556,13 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
993
1556
|
* @param {number} amount Amount
|
|
994
1557
|
* @param {boolean} [autoSubscribe] true or false, default true.
|
|
995
1558
|
* @param {string} [sourceAccount] `SPOT`,`FUND`,`ALL`, default `SPOT`
|
|
996
|
-
* @param {number} [recvWindow]
|
|
1559
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
997
1560
|
*
|
|
998
1561
|
* @throws {RequiredError}
|
|
999
1562
|
*/
|
|
1000
1563
|
subscribeFlexibleProduct: async (productId, amount, autoSubscribe, sourceAccount, recvWindow) => {
|
|
1001
|
-
(0,
|
|
1002
|
-
(0,
|
|
1564
|
+
(0, import_common2.assertParamExists)("subscribeFlexibleProduct", "productId", productId);
|
|
1565
|
+
(0, import_common2.assertParamExists)("subscribeFlexibleProduct", "amount", amount);
|
|
1003
1566
|
const localVarQueryParameter = {};
|
|
1004
1567
|
if (productId !== void 0 && productId !== null) {
|
|
1005
1568
|
localVarQueryParameter["productId"] = productId;
|
|
@@ -1038,13 +1601,13 @@ var FlexibleLockedApiAxiosParamCreator = function(configuration) {
|
|
|
1038
1601
|
* @param {boolean} [autoSubscribe] true or false, default true.
|
|
1039
1602
|
* @param {string} [sourceAccount] `SPOT`,`FUND`,`ALL`, default `SPOT`
|
|
1040
1603
|
* @param {string} [redeemTo] `SPOT`,`FLEXIBLE`, default `FLEXIBLE`
|
|
1041
|
-
* @param {number} [recvWindow]
|
|
1604
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
1042
1605
|
*
|
|
1043
1606
|
* @throws {RequiredError}
|
|
1044
1607
|
*/
|
|
1045
1608
|
subscribeLockedProduct: async (projectId, amount, autoSubscribe, sourceAccount, redeemTo, recvWindow) => {
|
|
1046
|
-
(0,
|
|
1047
|
-
(0,
|
|
1609
|
+
(0, import_common2.assertParamExists)("subscribeLockedProduct", "projectId", projectId);
|
|
1610
|
+
(0, import_common2.assertParamExists)("subscribeLockedProduct", "amount", amount);
|
|
1048
1611
|
const localVarQueryParameter = {};
|
|
1049
1612
|
if (projectId !== void 0 && projectId !== null) {
|
|
1050
1613
|
localVarQueryParameter["projectId"] = projectId;
|
|
@@ -1106,7 +1669,7 @@ var FlexibleLockedApi = class {
|
|
|
1106
1669
|
requestParameters?.size,
|
|
1107
1670
|
requestParameters?.recvWindow
|
|
1108
1671
|
);
|
|
1109
|
-
return (0,
|
|
1672
|
+
return (0, import_common2.sendRequest)(
|
|
1110
1673
|
this.configuration,
|
|
1111
1674
|
localVarAxiosArgs.endpoint,
|
|
1112
1675
|
localVarAxiosArgs.method,
|
|
@@ -1132,7 +1695,7 @@ var FlexibleLockedApi = class {
|
|
|
1132
1695
|
requestParameters?.productId,
|
|
1133
1696
|
requestParameters?.recvWindow
|
|
1134
1697
|
);
|
|
1135
|
-
return (0,
|
|
1698
|
+
return (0, import_common2.sendRequest)(
|
|
1136
1699
|
this.configuration,
|
|
1137
1700
|
localVarAxiosArgs.endpoint,
|
|
1138
1701
|
localVarAxiosArgs.method,
|
|
@@ -1161,7 +1724,7 @@ var FlexibleLockedApi = class {
|
|
|
1161
1724
|
requestParameters?.size,
|
|
1162
1725
|
requestParameters?.recvWindow
|
|
1163
1726
|
);
|
|
1164
|
-
return (0,
|
|
1727
|
+
return (0, import_common2.sendRequest)(
|
|
1165
1728
|
this.configuration,
|
|
1166
1729
|
localVarAxiosArgs.endpoint,
|
|
1167
1730
|
localVarAxiosArgs.method,
|
|
@@ -1198,7 +1761,7 @@ var FlexibleLockedApi = class {
|
|
|
1198
1761
|
requestParameters?.size,
|
|
1199
1762
|
requestParameters?.recvWindow
|
|
1200
1763
|
);
|
|
1201
|
-
return (0,
|
|
1764
|
+
return (0, import_common2.sendRequest)(
|
|
1202
1765
|
this.configuration,
|
|
1203
1766
|
localVarAxiosArgs.endpoint,
|
|
1204
1767
|
localVarAxiosArgs.method,
|
|
@@ -1235,7 +1798,7 @@ var FlexibleLockedApi = class {
|
|
|
1235
1798
|
requestParameters?.size,
|
|
1236
1799
|
requestParameters?.recvWindow
|
|
1237
1800
|
);
|
|
1238
|
-
return (0,
|
|
1801
|
+
return (0, import_common2.sendRequest)(
|
|
1239
1802
|
this.configuration,
|
|
1240
1803
|
localVarAxiosArgs.endpoint,
|
|
1241
1804
|
localVarAxiosArgs.method,
|
|
@@ -1262,7 +1825,7 @@ var FlexibleLockedApi = class {
|
|
|
1262
1825
|
requestParameters?.amount,
|
|
1263
1826
|
requestParameters?.recvWindow
|
|
1264
1827
|
);
|
|
1265
|
-
return (0,
|
|
1828
|
+
return (0, import_common2.sendRequest)(
|
|
1266
1829
|
this.configuration,
|
|
1267
1830
|
localVarAxiosArgs.endpoint,
|
|
1268
1831
|
localVarAxiosArgs.method,
|
|
@@ -1299,7 +1862,7 @@ var FlexibleLockedApi = class {
|
|
|
1299
1862
|
requestParameters?.size,
|
|
1300
1863
|
requestParameters?.recvWindow
|
|
1301
1864
|
);
|
|
1302
|
-
return (0,
|
|
1865
|
+
return (0, import_common2.sendRequest)(
|
|
1303
1866
|
this.configuration,
|
|
1304
1867
|
localVarAxiosArgs.endpoint,
|
|
1305
1868
|
localVarAxiosArgs.method,
|
|
@@ -1325,7 +1888,7 @@ var FlexibleLockedApi = class {
|
|
|
1325
1888
|
requestParameters?.projectId,
|
|
1326
1889
|
requestParameters?.recvWindow
|
|
1327
1890
|
);
|
|
1328
|
-
return (0,
|
|
1891
|
+
return (0, import_common2.sendRequest)(
|
|
1329
1892
|
this.configuration,
|
|
1330
1893
|
localVarAxiosArgs.endpoint,
|
|
1331
1894
|
localVarAxiosArgs.method,
|
|
@@ -1355,7 +1918,7 @@ var FlexibleLockedApi = class {
|
|
|
1355
1918
|
requestParameters?.size,
|
|
1356
1919
|
requestParameters?.recvWindow
|
|
1357
1920
|
);
|
|
1358
|
-
return (0,
|
|
1921
|
+
return (0, import_common2.sendRequest)(
|
|
1359
1922
|
this.configuration,
|
|
1360
1923
|
localVarAxiosArgs.endpoint,
|
|
1361
1924
|
localVarAxiosArgs.method,
|
|
@@ -1392,7 +1955,7 @@ var FlexibleLockedApi = class {
|
|
|
1392
1955
|
requestParameters?.size,
|
|
1393
1956
|
requestParameters?.recvWindow
|
|
1394
1957
|
);
|
|
1395
|
-
return (0,
|
|
1958
|
+
return (0, import_common2.sendRequest)(
|
|
1396
1959
|
this.configuration,
|
|
1397
1960
|
localVarAxiosArgs.endpoint,
|
|
1398
1961
|
localVarAxiosArgs.method,
|
|
@@ -1428,7 +1991,7 @@ var FlexibleLockedApi = class {
|
|
|
1428
1991
|
requestParameters?.size,
|
|
1429
1992
|
requestParameters?.recvWindow
|
|
1430
1993
|
);
|
|
1431
|
-
return (0,
|
|
1994
|
+
return (0, import_common2.sendRequest)(
|
|
1432
1995
|
this.configuration,
|
|
1433
1996
|
localVarAxiosArgs.endpoint,
|
|
1434
1997
|
localVarAxiosArgs.method,
|
|
@@ -1456,7 +2019,7 @@ var FlexibleLockedApi = class {
|
|
|
1456
2019
|
requestParameters?.autoSubscribe,
|
|
1457
2020
|
requestParameters?.recvWindow
|
|
1458
2021
|
);
|
|
1459
|
-
return (0,
|
|
2022
|
+
return (0, import_common2.sendRequest)(
|
|
1460
2023
|
this.configuration,
|
|
1461
2024
|
localVarAxiosArgs.endpoint,
|
|
1462
2025
|
localVarAxiosArgs.method,
|
|
@@ -1492,7 +2055,7 @@ var FlexibleLockedApi = class {
|
|
|
1492
2055
|
requestParameters?.size,
|
|
1493
2056
|
requestParameters?.recvWindow
|
|
1494
2057
|
);
|
|
1495
|
-
return (0,
|
|
2058
|
+
return (0, import_common2.sendRequest)(
|
|
1496
2059
|
this.configuration,
|
|
1497
2060
|
localVarAxiosArgs.endpoint,
|
|
1498
2061
|
localVarAxiosArgs.method,
|
|
@@ -1528,7 +2091,7 @@ var FlexibleLockedApi = class {
|
|
|
1528
2091
|
requestParameters?.size,
|
|
1529
2092
|
requestParameters?.recvWindow
|
|
1530
2093
|
);
|
|
1531
|
-
return (0,
|
|
2094
|
+
return (0, import_common2.sendRequest)(
|
|
1532
2095
|
this.configuration,
|
|
1533
2096
|
localVarAxiosArgs.endpoint,
|
|
1534
2097
|
localVarAxiosArgs.method,
|
|
@@ -1556,7 +2119,7 @@ var FlexibleLockedApi = class {
|
|
|
1556
2119
|
requestParameters?.size,
|
|
1557
2120
|
requestParameters?.recvWindow
|
|
1558
2121
|
);
|
|
1559
|
-
return (0,
|
|
2122
|
+
return (0, import_common2.sendRequest)(
|
|
1560
2123
|
this.configuration,
|
|
1561
2124
|
localVarAxiosArgs.endpoint,
|
|
1562
2125
|
localVarAxiosArgs.method,
|
|
@@ -1586,7 +2149,7 @@ var FlexibleLockedApi = class {
|
|
|
1586
2149
|
requestParameters?.size,
|
|
1587
2150
|
requestParameters?.recvWindow
|
|
1588
2151
|
);
|
|
1589
|
-
return (0,
|
|
2152
|
+
return (0, import_common2.sendRequest)(
|
|
1590
2153
|
this.configuration,
|
|
1591
2154
|
localVarAxiosArgs.endpoint,
|
|
1592
2155
|
localVarAxiosArgs.method,
|
|
@@ -1617,7 +2180,7 @@ var FlexibleLockedApi = class {
|
|
|
1617
2180
|
requestParameters?.destAccount,
|
|
1618
2181
|
requestParameters?.recvWindow
|
|
1619
2182
|
);
|
|
1620
|
-
return (0,
|
|
2183
|
+
return (0, import_common2.sendRequest)(
|
|
1621
2184
|
this.configuration,
|
|
1622
2185
|
localVarAxiosArgs.endpoint,
|
|
1623
2186
|
localVarAxiosArgs.method,
|
|
@@ -1645,7 +2208,7 @@ var FlexibleLockedApi = class {
|
|
|
1645
2208
|
requestParameters?.positionId,
|
|
1646
2209
|
requestParameters?.recvWindow
|
|
1647
2210
|
);
|
|
1648
|
-
return (0,
|
|
2211
|
+
return (0, import_common2.sendRequest)(
|
|
1649
2212
|
this.configuration,
|
|
1650
2213
|
localVarAxiosArgs.endpoint,
|
|
1651
2214
|
localVarAxiosArgs.method,
|
|
@@ -1672,7 +2235,7 @@ var FlexibleLockedApi = class {
|
|
|
1672
2235
|
requestParameters?.autoSubscribe,
|
|
1673
2236
|
requestParameters?.recvWindow
|
|
1674
2237
|
);
|
|
1675
|
-
return (0,
|
|
2238
|
+
return (0, import_common2.sendRequest)(
|
|
1676
2239
|
this.configuration,
|
|
1677
2240
|
localVarAxiosArgs.endpoint,
|
|
1678
2241
|
localVarAxiosArgs.method,
|
|
@@ -1699,7 +2262,7 @@ var FlexibleLockedApi = class {
|
|
|
1699
2262
|
requestParameters?.autoSubscribe,
|
|
1700
2263
|
requestParameters?.recvWindow
|
|
1701
2264
|
);
|
|
1702
|
-
return (0,
|
|
2265
|
+
return (0, import_common2.sendRequest)(
|
|
1703
2266
|
this.configuration,
|
|
1704
2267
|
localVarAxiosArgs.endpoint,
|
|
1705
2268
|
localVarAxiosArgs.method,
|
|
@@ -1726,7 +2289,7 @@ var FlexibleLockedApi = class {
|
|
|
1726
2289
|
requestParameters?.redeemTo,
|
|
1727
2290
|
requestParameters?.recvWindow
|
|
1728
2291
|
);
|
|
1729
|
-
return (0,
|
|
2292
|
+
return (0, import_common2.sendRequest)(
|
|
1730
2293
|
this.configuration,
|
|
1731
2294
|
localVarAxiosArgs.endpoint,
|
|
1732
2295
|
localVarAxiosArgs.method,
|
|
@@ -1751,7 +2314,7 @@ var FlexibleLockedApi = class {
|
|
|
1751
2314
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.simpleAccount(
|
|
1752
2315
|
requestParameters?.recvWindow
|
|
1753
2316
|
);
|
|
1754
|
-
return (0,
|
|
2317
|
+
return (0, import_common2.sendRequest)(
|
|
1755
2318
|
this.configuration,
|
|
1756
2319
|
localVarAxiosArgs.endpoint,
|
|
1757
2320
|
localVarAxiosArgs.method,
|
|
@@ -1782,7 +2345,7 @@ var FlexibleLockedApi = class {
|
|
|
1782
2345
|
requestParameters?.sourceAccount,
|
|
1783
2346
|
requestParameters?.recvWindow
|
|
1784
2347
|
);
|
|
1785
|
-
return (0,
|
|
2348
|
+
return (0, import_common2.sendRequest)(
|
|
1786
2349
|
this.configuration,
|
|
1787
2350
|
localVarAxiosArgs.endpoint,
|
|
1788
2351
|
localVarAxiosArgs.method,
|
|
@@ -1814,7 +2377,7 @@ var FlexibleLockedApi = class {
|
|
|
1814
2377
|
requestParameters?.redeemTo,
|
|
1815
2378
|
requestParameters?.recvWindow
|
|
1816
2379
|
);
|
|
1817
|
-
return (0,
|
|
2380
|
+
return (0, import_common2.sendRequest)(
|
|
1818
2381
|
this.configuration,
|
|
1819
2382
|
localVarAxiosArgs.endpoint,
|
|
1820
2383
|
localVarAxiosArgs.method,
|
|
@@ -1826,7 +2389,7 @@ var FlexibleLockedApi = class {
|
|
|
1826
2389
|
};
|
|
1827
2390
|
|
|
1828
2391
|
// src/rest-api/modules/rwusd-api.ts
|
|
1829
|
-
var
|
|
2392
|
+
var import_common3 = require("@binance/common");
|
|
1830
2393
|
var RwusdApiAxiosParamCreator = function(configuration) {
|
|
1831
2394
|
return {
|
|
1832
2395
|
/**
|
|
@@ -1835,7 +2398,7 @@ var RwusdApiAxiosParamCreator = function(configuration) {
|
|
|
1835
2398
|
* Weight: 150
|
|
1836
2399
|
*
|
|
1837
2400
|
* @summary Get RWUSD Account (USER_DATA)
|
|
1838
|
-
* @param {number} [recvWindow]
|
|
2401
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
1839
2402
|
*
|
|
1840
2403
|
* @throws {RequiredError}
|
|
1841
2404
|
*/
|
|
@@ -1859,7 +2422,7 @@ var RwusdApiAxiosParamCreator = function(configuration) {
|
|
|
1859
2422
|
* Weight: 150
|
|
1860
2423
|
*
|
|
1861
2424
|
* @summary Get RWUSD Quota Details (USER_DATA)
|
|
1862
|
-
* @param {number} [recvWindow]
|
|
2425
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
1863
2426
|
*
|
|
1864
2427
|
* @throws {RequiredError}
|
|
1865
2428
|
*/
|
|
@@ -1890,9 +2453,9 @@ var RwusdApiAxiosParamCreator = function(configuration) {
|
|
|
1890
2453
|
* @summary Get RWUSD Rate History (USER_DATA)
|
|
1891
2454
|
* @param {number} [startTime]
|
|
1892
2455
|
* @param {number} [endTime]
|
|
1893
|
-
* @param {number} [current] Currently querying
|
|
1894
|
-
* @param {number} [size] Default:10, Max:100
|
|
1895
|
-
* @param {number} [recvWindow]
|
|
2456
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
2457
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
2458
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
1896
2459
|
*
|
|
1897
2460
|
* @throws {RequiredError}
|
|
1898
2461
|
*/
|
|
@@ -1935,9 +2498,9 @@ var RwusdApiAxiosParamCreator = function(configuration) {
|
|
|
1935
2498
|
* @summary Get RWUSD Redemption History (USER_DATA)
|
|
1936
2499
|
* @param {number} [startTime]
|
|
1937
2500
|
* @param {number} [endTime]
|
|
1938
|
-
* @param {number} [current] Currently querying
|
|
1939
|
-
* @param {number} [size] Default:10, Max:100
|
|
1940
|
-
* @param {number} [recvWindow]
|
|
2501
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
2502
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
2503
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
1941
2504
|
*
|
|
1942
2505
|
* @throws {RequiredError}
|
|
1943
2506
|
*/
|
|
@@ -1980,9 +2543,9 @@ var RwusdApiAxiosParamCreator = function(configuration) {
|
|
|
1980
2543
|
* @summary Get RWUSD Rewards History (USER_DATA)
|
|
1981
2544
|
* @param {number} [startTime]
|
|
1982
2545
|
* @param {number} [endTime]
|
|
1983
|
-
* @param {number} [current] Currently querying
|
|
1984
|
-
* @param {number} [size] Default:10, Max:100
|
|
1985
|
-
* @param {number} [recvWindow]
|
|
2546
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
2547
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
2548
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
1986
2549
|
*
|
|
1987
2550
|
* @throws {RequiredError}
|
|
1988
2551
|
*/
|
|
@@ -2026,9 +2589,9 @@ var RwusdApiAxiosParamCreator = function(configuration) {
|
|
|
2026
2589
|
* @param {string} [asset] USDC or USDT
|
|
2027
2590
|
* @param {number} [startTime]
|
|
2028
2591
|
* @param {number} [endTime]
|
|
2029
|
-
* @param {number} [current] Currently querying
|
|
2030
|
-
* @param {number} [size] Default:10, Max:100
|
|
2031
|
-
* @param {number} [recvWindow]
|
|
2592
|
+
* @param {number} [current] Currently querying page. Starts from 1. Default: 1
|
|
2593
|
+
* @param {number} [size] Number of results per page. Default: 10, Max: 100
|
|
2594
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
2032
2595
|
*
|
|
2033
2596
|
* @throws {RequiredError}
|
|
2034
2597
|
*/
|
|
@@ -2071,13 +2634,13 @@ var RwusdApiAxiosParamCreator = function(configuration) {
|
|
|
2071
2634
|
* @summary Redeem RWUSD(TRADE)
|
|
2072
2635
|
* @param {number} amount Amount
|
|
2073
2636
|
* @param {string} type FAST or STANDARD, defaults to STANDARD
|
|
2074
|
-
* @param {number} [recvWindow]
|
|
2637
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
2075
2638
|
*
|
|
2076
2639
|
* @throws {RequiredError}
|
|
2077
2640
|
*/
|
|
2078
2641
|
redeemRwusd: async (amount, type, recvWindow) => {
|
|
2079
|
-
(0,
|
|
2080
|
-
(0,
|
|
2642
|
+
(0, import_common3.assertParamExists)("redeemRwusd", "amount", amount);
|
|
2643
|
+
(0, import_common3.assertParamExists)("redeemRwusd", "type", type);
|
|
2081
2644
|
const localVarQueryParameter = {};
|
|
2082
2645
|
if (amount !== void 0 && amount !== null) {
|
|
2083
2646
|
localVarQueryParameter["amount"] = amount;
|
|
@@ -2107,13 +2670,13 @@ var RwusdApiAxiosParamCreator = function(configuration) {
|
|
|
2107
2670
|
* @summary Subscribe RWUSD(TRADE)
|
|
2108
2671
|
* @param {string} asset USDT or USDC (whichever is eligible)
|
|
2109
2672
|
* @param {number} amount Amount
|
|
2110
|
-
* @param {number} [recvWindow]
|
|
2673
|
+
* @param {number} [recvWindow] The value cannot be greater than 60000 (ms)
|
|
2111
2674
|
*
|
|
2112
2675
|
* @throws {RequiredError}
|
|
2113
2676
|
*/
|
|
2114
2677
|
subscribeRwusd: async (asset, amount, recvWindow) => {
|
|
2115
|
-
(0,
|
|
2116
|
-
(0,
|
|
2678
|
+
(0, import_common3.assertParamExists)("subscribeRwusd", "asset", asset);
|
|
2679
|
+
(0, import_common3.assertParamExists)("subscribeRwusd", "amount", amount);
|
|
2117
2680
|
const localVarQueryParameter = {};
|
|
2118
2681
|
if (asset !== void 0 && asset !== null) {
|
|
2119
2682
|
localVarQueryParameter["asset"] = asset;
|
|
@@ -2156,7 +2719,7 @@ var RwusdApi = class {
|
|
|
2156
2719
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getRwusdAccount(
|
|
2157
2720
|
requestParameters?.recvWindow
|
|
2158
2721
|
);
|
|
2159
|
-
return (0,
|
|
2722
|
+
return (0, import_common3.sendRequest)(
|
|
2160
2723
|
this.configuration,
|
|
2161
2724
|
localVarAxiosArgs.endpoint,
|
|
2162
2725
|
localVarAxiosArgs.method,
|
|
@@ -2181,7 +2744,7 @@ var RwusdApi = class {
|
|
|
2181
2744
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getRwusdQuotaDetails(
|
|
2182
2745
|
requestParameters?.recvWindow
|
|
2183
2746
|
);
|
|
2184
|
-
return (0,
|
|
2747
|
+
return (0, import_common3.sendRequest)(
|
|
2185
2748
|
this.configuration,
|
|
2186
2749
|
localVarAxiosArgs.endpoint,
|
|
2187
2750
|
localVarAxiosArgs.method,
|
|
@@ -2215,7 +2778,7 @@ var RwusdApi = class {
|
|
|
2215
2778
|
requestParameters?.size,
|
|
2216
2779
|
requestParameters?.recvWindow
|
|
2217
2780
|
);
|
|
2218
|
-
return (0,
|
|
2781
|
+
return (0, import_common3.sendRequest)(
|
|
2219
2782
|
this.configuration,
|
|
2220
2783
|
localVarAxiosArgs.endpoint,
|
|
2221
2784
|
localVarAxiosArgs.method,
|
|
@@ -2249,7 +2812,7 @@ var RwusdApi = class {
|
|
|
2249
2812
|
requestParameters?.size,
|
|
2250
2813
|
requestParameters?.recvWindow
|
|
2251
2814
|
);
|
|
2252
|
-
return (0,
|
|
2815
|
+
return (0, import_common3.sendRequest)(
|
|
2253
2816
|
this.configuration,
|
|
2254
2817
|
localVarAxiosArgs.endpoint,
|
|
2255
2818
|
localVarAxiosArgs.method,
|
|
@@ -2283,7 +2846,7 @@ var RwusdApi = class {
|
|
|
2283
2846
|
requestParameters?.size,
|
|
2284
2847
|
requestParameters?.recvWindow
|
|
2285
2848
|
);
|
|
2286
|
-
return (0,
|
|
2849
|
+
return (0, import_common3.sendRequest)(
|
|
2287
2850
|
this.configuration,
|
|
2288
2851
|
localVarAxiosArgs.endpoint,
|
|
2289
2852
|
localVarAxiosArgs.method,
|
|
@@ -2318,7 +2881,7 @@ var RwusdApi = class {
|
|
|
2318
2881
|
requestParameters?.size,
|
|
2319
2882
|
requestParameters?.recvWindow
|
|
2320
2883
|
);
|
|
2321
|
-
return (0,
|
|
2884
|
+
return (0, import_common3.sendRequest)(
|
|
2322
2885
|
this.configuration,
|
|
2323
2886
|
localVarAxiosArgs.endpoint,
|
|
2324
2887
|
localVarAxiosArgs.method,
|
|
@@ -2347,7 +2910,7 @@ var RwusdApi = class {
|
|
|
2347
2910
|
requestParameters?.type,
|
|
2348
2911
|
requestParameters?.recvWindow
|
|
2349
2912
|
);
|
|
2350
|
-
return (0,
|
|
2913
|
+
return (0, import_common3.sendRequest)(
|
|
2351
2914
|
this.configuration,
|
|
2352
2915
|
localVarAxiosArgs.endpoint,
|
|
2353
2916
|
localVarAxiosArgs.method,
|
|
@@ -2376,7 +2939,7 @@ var RwusdApi = class {
|
|
|
2376
2939
|
requestParameters?.amount,
|
|
2377
2940
|
requestParameters?.recvWindow
|
|
2378
2941
|
);
|
|
2379
|
-
return (0,
|
|
2942
|
+
return (0, import_common3.sendRequest)(
|
|
2380
2943
|
this.configuration,
|
|
2381
2944
|
localVarAxiosArgs.endpoint,
|
|
2382
2945
|
localVarAxiosArgs.method,
|
|
@@ -2388,10 +2951,11 @@ var RwusdApi = class {
|
|
|
2388
2951
|
};
|
|
2389
2952
|
|
|
2390
2953
|
// src/rest-api/rest-api.ts
|
|
2391
|
-
var
|
|
2954
|
+
var import_common4 = require("@binance/common");
|
|
2392
2955
|
var RestAPI = class {
|
|
2393
2956
|
constructor(configuration) {
|
|
2394
2957
|
this.configuration = configuration;
|
|
2958
|
+
this.bfusdApi = new BfusdApi(configuration);
|
|
2395
2959
|
this.flexibleLockedApi = new FlexibleLockedApi(configuration);
|
|
2396
2960
|
this.rwusdApi = new RwusdApi(configuration);
|
|
2397
2961
|
}
|
|
@@ -2404,7 +2968,7 @@ var RestAPI = class {
|
|
|
2404
2968
|
* @returns A promise resolving to the response data object.
|
|
2405
2969
|
*/
|
|
2406
2970
|
sendRequest(endpoint, method, params = {}) {
|
|
2407
|
-
return (0,
|
|
2971
|
+
return (0, import_common4.sendRequest)(this.configuration, endpoint, method, params, void 0);
|
|
2408
2972
|
}
|
|
2409
2973
|
/**
|
|
2410
2974
|
* Generic function to send a signed request.
|
|
@@ -2415,10 +2979,154 @@ var RestAPI = class {
|
|
|
2415
2979
|
* @returns A promise resolving to the response data object.
|
|
2416
2980
|
*/
|
|
2417
2981
|
sendSignedRequest(endpoint, method, params = {}) {
|
|
2418
|
-
return (0,
|
|
2982
|
+
return (0, import_common4.sendRequest)(this.configuration, endpoint, method, params, void 0, {
|
|
2419
2983
|
isSigned: true
|
|
2420
2984
|
});
|
|
2421
2985
|
}
|
|
2986
|
+
/**
|
|
2987
|
+
* Get BFUSD account information.
|
|
2988
|
+
*
|
|
2989
|
+
* Weight: 150
|
|
2990
|
+
*
|
|
2991
|
+
* @summary Get BFUSD Account (USER_DATA)
|
|
2992
|
+
* @param {GetBfusdAccountRequest} requestParameters Request parameters.
|
|
2993
|
+
*
|
|
2994
|
+
* @returns {Promise<RestApiResponse<GetBfusdAccountResponse>>}
|
|
2995
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2996
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/account/ Binance API Documentation}
|
|
2997
|
+
*/
|
|
2998
|
+
getBfusdAccount(requestParameters = {}) {
|
|
2999
|
+
return this.bfusdApi.getBfusdAccount(requestParameters);
|
|
3000
|
+
}
|
|
3001
|
+
/**
|
|
3002
|
+
* Get BFUSD quota details including fast redemption quota and standard redemption quota.
|
|
3003
|
+
*
|
|
3004
|
+
* Weight: 150
|
|
3005
|
+
*
|
|
3006
|
+
* @summary Get BFUSD Quota Details (USER_DATA)
|
|
3007
|
+
* @param {GetBfusdQuotaDetailsRequest} requestParameters Request parameters.
|
|
3008
|
+
*
|
|
3009
|
+
* @returns {Promise<RestApiResponse<GetBfusdQuotaDetailsResponse>>}
|
|
3010
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3011
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/account/Get-BFUSD-Quota-Details Binance API Documentation}
|
|
3012
|
+
*/
|
|
3013
|
+
getBfusdQuotaDetails(requestParameters = {}) {
|
|
3014
|
+
return this.bfusdApi.getBfusdQuotaDetails(requestParameters);
|
|
3015
|
+
}
|
|
3016
|
+
/**
|
|
3017
|
+
* Get BFUSD rate history sorted by descending order.
|
|
3018
|
+
*
|
|
3019
|
+
* The time between `startTime` and `endTime` cannot be longer than 6 months.
|
|
3020
|
+
* If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
|
|
3021
|
+
* If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned.
|
|
3022
|
+
* If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned.
|
|
3023
|
+
*
|
|
3024
|
+
* Weight: 150
|
|
3025
|
+
*
|
|
3026
|
+
* @summary Get BFUSD Rate History (USER_DATA)
|
|
3027
|
+
* @param {GetBfusdRateHistoryRequest} requestParameters Request parameters.
|
|
3028
|
+
*
|
|
3029
|
+
* @returns {Promise<RestApiResponse<GetBfusdRateHistoryResponse>>}
|
|
3030
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3031
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/history/Get-BFUSD-Rate-History Binance API Documentation}
|
|
3032
|
+
*/
|
|
3033
|
+
getBfusdRateHistory(requestParameters = {}) {
|
|
3034
|
+
return this.bfusdApi.getBfusdRateHistory(requestParameters);
|
|
3035
|
+
}
|
|
3036
|
+
/**
|
|
3037
|
+
* Get BFUSD redemption history.
|
|
3038
|
+
*
|
|
3039
|
+
* The time between `startTime` and `endTime` cannot be longer than 6 months.
|
|
3040
|
+
* If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
|
|
3041
|
+
* If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned.
|
|
3042
|
+
* If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned.
|
|
3043
|
+
*
|
|
3044
|
+
* Weight: 150
|
|
3045
|
+
*
|
|
3046
|
+
* @summary Get BFUSD Redemption History (USER_DATA)
|
|
3047
|
+
* @param {GetBfusdRedemptionHistoryRequest} requestParameters Request parameters.
|
|
3048
|
+
*
|
|
3049
|
+
* @returns {Promise<RestApiResponse<GetBfusdRedemptionHistoryResponse>>}
|
|
3050
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3051
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/history/Get-BFUSD-Redemption-History Binance API Documentation}
|
|
3052
|
+
*/
|
|
3053
|
+
getBfusdRedemptionHistory(requestParameters = {}) {
|
|
3054
|
+
return this.bfusdApi.getBfusdRedemptionHistory(requestParameters);
|
|
3055
|
+
}
|
|
3056
|
+
/**
|
|
3057
|
+
* Get BFUSD rewards history.
|
|
3058
|
+
*
|
|
3059
|
+
* The time between `startTime` and `endTime` cannot be longer than 6 months.
|
|
3060
|
+
* If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
|
|
3061
|
+
* If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned.
|
|
3062
|
+
* If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time minus one month, and data between `startTime` and `endTime` will be returned.
|
|
3063
|
+
*
|
|
3064
|
+
* Weight: 150
|
|
3065
|
+
*
|
|
3066
|
+
* @summary Get BFUSD Rewards History (USER_DATA)
|
|
3067
|
+
* @param {GetBfusdRewardsHistoryRequest} requestParameters Request parameters.
|
|
3068
|
+
*
|
|
3069
|
+
* @returns {Promise<RestApiResponse<GetBfusdRewardsHistoryResponse>>}
|
|
3070
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3071
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/history/Get-BFUSD-Rewards-History Binance API Documentation}
|
|
3072
|
+
*/
|
|
3073
|
+
getBfusdRewardsHistory(requestParameters = {}) {
|
|
3074
|
+
return this.bfusdApi.getBfusdRewardsHistory(requestParameters);
|
|
3075
|
+
}
|
|
3076
|
+
/**
|
|
3077
|
+
* Get BFUSD subscription history
|
|
3078
|
+
*
|
|
3079
|
+
* The time between `startTime` and `endTime` cannot be longer than 6 months.
|
|
3080
|
+
* If `startTime` and `endTime` are both not sent, then the last 30 days' data will be returned.
|
|
3081
|
+
* If `startTime` is sent but `endTime` is not sent, `endTime` will default to current time, and results from `startTime` onward will be returned.
|
|
3082
|
+
* If `endTime` is sent but `startTime` is not sent, `startTime` defaults to the current time advanced by one month, and data between `startTime` and `endTime` will be returned.
|
|
3083
|
+
*
|
|
3084
|
+
* Weight: 150
|
|
3085
|
+
*
|
|
3086
|
+
* @summary Get BFUSD subscription history(USER_DATA)
|
|
3087
|
+
* @param {GetBfusdSubscriptionHistoryRequest} requestParameters Request parameters.
|
|
3088
|
+
*
|
|
3089
|
+
* @returns {Promise<RestApiResponse<GetBfusdSubscriptionHistoryResponse>>}
|
|
3090
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3091
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/history/Get-BFUSD-subscription-history Binance API Documentation}
|
|
3092
|
+
*/
|
|
3093
|
+
getBfusdSubscriptionHistory(requestParameters = {}) {
|
|
3094
|
+
return this.bfusdApi.getBfusdSubscriptionHistory(requestParameters);
|
|
3095
|
+
}
|
|
3096
|
+
/**
|
|
3097
|
+
* Redeem BFUSD to USDT
|
|
3098
|
+
*
|
|
3099
|
+
* You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
|
|
3100
|
+
*
|
|
3101
|
+
* Weight: 150
|
|
3102
|
+
*
|
|
3103
|
+
* @summary Redeem BFUSD(TRADE)
|
|
3104
|
+
* @param {RedeemBfusdRequest} requestParameters Request parameters.
|
|
3105
|
+
*
|
|
3106
|
+
* @returns {Promise<RestApiResponse<RedeemBfusdResponse>>}
|
|
3107
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3108
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/earn/Redeem-BFUSD Binance API Documentation}
|
|
3109
|
+
*/
|
|
3110
|
+
redeemBfusd(requestParameters) {
|
|
3111
|
+
return this.bfusdApi.redeemBfusd(requestParameters);
|
|
3112
|
+
}
|
|
3113
|
+
/**
|
|
3114
|
+
* Subscribe BFUSD
|
|
3115
|
+
*
|
|
3116
|
+
* You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint.
|
|
3117
|
+
*
|
|
3118
|
+
* Weight: 150
|
|
3119
|
+
*
|
|
3120
|
+
* @summary Subscribe BFUSD(TRADE)
|
|
3121
|
+
* @param {SubscribeBfusdRequest} requestParameters Request parameters.
|
|
3122
|
+
*
|
|
3123
|
+
* @returns {Promise<RestApiResponse<SubscribeBfusdResponse>>}
|
|
3124
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3125
|
+
* @see {@link https://developers.binance.com/docs/simple_earn/bfusd/earn/Subscribe-BFUSD Binance API Documentation}
|
|
3126
|
+
*/
|
|
3127
|
+
subscribeBfusd(requestParameters) {
|
|
3128
|
+
return this.bfusdApi.subscribeBfusd(requestParameters);
|
|
3129
|
+
}
|
|
2422
3130
|
/**
|
|
2423
3131
|
* Get Collateral Record
|
|
2424
3132
|
*
|
|
@@ -2431,6 +3139,7 @@ var RestAPI = class {
|
|
|
2431
3139
|
*
|
|
2432
3140
|
* @summary Get Collateral Record(USER_DATA)
|
|
2433
3141
|
* @param {GetCollateralRecordRequest} requestParameters Request parameters.
|
|
3142
|
+
*
|
|
2434
3143
|
* @returns {Promise<RestApiResponse<GetCollateralRecordResponse>>}
|
|
2435
3144
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2436
3145
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Collateral-Record Binance API Documentation}
|
|
@@ -2445,6 +3154,7 @@ var RestAPI = class {
|
|
|
2445
3154
|
*
|
|
2446
3155
|
* @summary Get Flexible Personal Left Quota(USER_DATA)
|
|
2447
3156
|
* @param {GetFlexiblePersonalLeftQuotaRequest} requestParameters Request parameters.
|
|
3157
|
+
*
|
|
2448
3158
|
* @returns {Promise<RestApiResponse<GetFlexiblePersonalLeftQuotaResponse>>}
|
|
2449
3159
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2450
3160
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/account/Get-Flexible-Personal-Left-Quota Binance API Documentation}
|
|
@@ -2459,6 +3169,7 @@ var RestAPI = class {
|
|
|
2459
3169
|
*
|
|
2460
3170
|
* @summary Get Flexible Product Position(USER_DATA)
|
|
2461
3171
|
* @param {GetFlexibleProductPositionRequest} requestParameters Request parameters.
|
|
3172
|
+
*
|
|
2462
3173
|
* @returns {Promise<RestApiResponse<GetFlexibleProductPositionResponse>>}
|
|
2463
3174
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2464
3175
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/account/Get-Flexible-Product-Position Binance API Documentation}
|
|
@@ -2478,6 +3189,7 @@ var RestAPI = class {
|
|
|
2478
3189
|
*
|
|
2479
3190
|
* @summary Get Flexible Redemption Record(USER_DATA)
|
|
2480
3191
|
* @param {GetFlexibleRedemptionRecordRequest} requestParameters Request parameters.
|
|
3192
|
+
*
|
|
2481
3193
|
* @returns {Promise<RestApiResponse<GetFlexibleRedemptionRecordResponse>>}
|
|
2482
3194
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2483
3195
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Flexible-Redemption-Record Binance API Documentation}
|
|
@@ -2497,6 +3209,7 @@ var RestAPI = class {
|
|
|
2497
3209
|
*
|
|
2498
3210
|
* @summary Get Flexible Rewards History(USER_DATA)
|
|
2499
3211
|
* @param {GetFlexibleRewardsHistoryRequest} requestParameters Request parameters.
|
|
3212
|
+
*
|
|
2500
3213
|
* @returns {Promise<RestApiResponse<GetFlexibleRewardsHistoryResponse>>}
|
|
2501
3214
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2502
3215
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Flexible-Rewards-History Binance API Documentation}
|
|
@@ -2511,6 +3224,7 @@ var RestAPI = class {
|
|
|
2511
3224
|
*
|
|
2512
3225
|
* @summary Get Flexible Subscription Preview(USER_DATA)
|
|
2513
3226
|
* @param {GetFlexibleSubscriptionPreviewRequest} requestParameters Request parameters.
|
|
3227
|
+
*
|
|
2514
3228
|
* @returns {Promise<RestApiResponse<GetFlexibleSubscriptionPreviewResponse>>}
|
|
2515
3229
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2516
3230
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Get-Flexible-Subscription-Preview Binance API Documentation}
|
|
@@ -2530,6 +3244,7 @@ var RestAPI = class {
|
|
|
2530
3244
|
*
|
|
2531
3245
|
* @summary Get Flexible Subscription Record(USER_DATA)
|
|
2532
3246
|
* @param {GetFlexibleSubscriptionRecordRequest} requestParameters Request parameters.
|
|
3247
|
+
*
|
|
2533
3248
|
* @returns {Promise<RestApiResponse<GetFlexibleSubscriptionRecordResponse>>}
|
|
2534
3249
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2535
3250
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Flexible-Subscription-Record Binance API Documentation}
|
|
@@ -2544,6 +3259,7 @@ var RestAPI = class {
|
|
|
2544
3259
|
*
|
|
2545
3260
|
* @summary Get Locked Personal Left Quota(USER_DATA)
|
|
2546
3261
|
* @param {GetLockedPersonalLeftQuotaRequest} requestParameters Request parameters.
|
|
3262
|
+
*
|
|
2547
3263
|
* @returns {Promise<RestApiResponse<GetLockedPersonalLeftQuotaResponse>>}
|
|
2548
3264
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2549
3265
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/account/Get-Locked-Personal-Left-Quota Binance API Documentation}
|
|
@@ -2558,6 +3274,7 @@ var RestAPI = class {
|
|
|
2558
3274
|
*
|
|
2559
3275
|
* @summary Get Locked Product Position
|
|
2560
3276
|
* @param {GetLockedProductPositionRequest} requestParameters Request parameters.
|
|
3277
|
+
*
|
|
2561
3278
|
* @returns {Promise<RestApiResponse<GetLockedProductPositionResponse>>}
|
|
2562
3279
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2563
3280
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/account/Get-Locked-Product-Position Binance API Documentation}
|
|
@@ -2577,6 +3294,7 @@ var RestAPI = class {
|
|
|
2577
3294
|
*
|
|
2578
3295
|
* @summary Get Locked Redemption Record(USER_DATA)
|
|
2579
3296
|
* @param {GetLockedRedemptionRecordRequest} requestParameters Request parameters.
|
|
3297
|
+
*
|
|
2580
3298
|
* @returns {Promise<RestApiResponse<GetLockedRedemptionRecordResponse>>}
|
|
2581
3299
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2582
3300
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Locked-Redemption-Record Binance API Documentation}
|
|
@@ -2596,6 +3314,7 @@ var RestAPI = class {
|
|
|
2596
3314
|
*
|
|
2597
3315
|
* @summary Get Locked Rewards History(USER_DATA)
|
|
2598
3316
|
* @param {GetLockedRewardsHistoryRequest} requestParameters Request parameters.
|
|
3317
|
+
*
|
|
2599
3318
|
* @returns {Promise<RestApiResponse<GetLockedRewardsHistoryResponse>>}
|
|
2600
3319
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2601
3320
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Locked-Rewards-History Binance API Documentation}
|
|
@@ -2610,6 +3329,7 @@ var RestAPI = class {
|
|
|
2610
3329
|
*
|
|
2611
3330
|
* @summary Get Locked Subscription Preview(USER_DATA)
|
|
2612
3331
|
* @param {GetLockedSubscriptionPreviewRequest} requestParameters Request parameters.
|
|
3332
|
+
*
|
|
2613
3333
|
* @returns {Promise<RestApiResponse<GetLockedSubscriptionPreviewResponse>>}
|
|
2614
3334
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2615
3335
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Get-Locked-Subscription-Preview Binance API Documentation}
|
|
@@ -2629,6 +3349,7 @@ var RestAPI = class {
|
|
|
2629
3349
|
*
|
|
2630
3350
|
* @summary Get Locked Subscription Record(USER_DATA)
|
|
2631
3351
|
* @param {GetLockedSubscriptionRecordRequest} requestParameters Request parameters.
|
|
3352
|
+
*
|
|
2632
3353
|
* @returns {Promise<RestApiResponse<GetLockedSubscriptionRecordResponse>>}
|
|
2633
3354
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2634
3355
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Locked-Subscription-Record Binance API Documentation}
|
|
@@ -2648,6 +3369,7 @@ var RestAPI = class {
|
|
|
2648
3369
|
*
|
|
2649
3370
|
* @summary Get Rate History(USER_DATA)
|
|
2650
3371
|
* @param {GetRateHistoryRequest} requestParameters Request parameters.
|
|
3372
|
+
*
|
|
2651
3373
|
* @returns {Promise<RestApiResponse<GetRateHistoryResponse>>}
|
|
2652
3374
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2653
3375
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/history/Get-Rate-History Binance API Documentation}
|
|
@@ -2662,6 +3384,7 @@ var RestAPI = class {
|
|
|
2662
3384
|
*
|
|
2663
3385
|
* @summary Get Simple Earn Flexible Product List(USER_DATA)
|
|
2664
3386
|
* @param {GetSimpleEarnFlexibleProductListRequest} requestParameters Request parameters.
|
|
3387
|
+
*
|
|
2665
3388
|
* @returns {Promise<RestApiResponse<GetSimpleEarnFlexibleProductListResponse>>}
|
|
2666
3389
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2667
3390
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/account/Get-Simple-Earn-Flexible-Product-List Binance API Documentation}
|
|
@@ -2678,6 +3401,7 @@ var RestAPI = class {
|
|
|
2678
3401
|
*
|
|
2679
3402
|
* @summary Get Simple Earn Locked Product List(USER_DATA)
|
|
2680
3403
|
* @param {GetSimpleEarnLockedProductListRequest} requestParameters Request parameters.
|
|
3404
|
+
*
|
|
2681
3405
|
* @returns {Promise<RestApiResponse<GetSimpleEarnLockedProductListResponse>>}
|
|
2682
3406
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2683
3407
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/account/Get-Simple-Earn-Locked-Product-List Binance API Documentation}
|
|
@@ -2694,6 +3418,7 @@ var RestAPI = class {
|
|
|
2694
3418
|
*
|
|
2695
3419
|
* @summary Redeem Flexible Product(TRADE)
|
|
2696
3420
|
* @param {RedeemFlexibleProductRequest} requestParameters Request parameters.
|
|
3421
|
+
*
|
|
2697
3422
|
* @returns {Promise<RestApiResponse<RedeemFlexibleProductResponse>>}
|
|
2698
3423
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2699
3424
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Redeem-Flexible-Product Binance API Documentation}
|
|
@@ -2710,6 +3435,7 @@ var RestAPI = class {
|
|
|
2710
3435
|
*
|
|
2711
3436
|
* @summary Redeem Locked Product(TRADE)
|
|
2712
3437
|
* @param {RedeemLockedProductRequest} requestParameters Request parameters.
|
|
3438
|
+
*
|
|
2713
3439
|
* @returns {Promise<RestApiResponse<RedeemLockedProductResponse>>}
|
|
2714
3440
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2715
3441
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Redeem-Locked-Product Binance API Documentation}
|
|
@@ -2724,6 +3450,7 @@ var RestAPI = class {
|
|
|
2724
3450
|
*
|
|
2725
3451
|
* @summary Set Flexible Auto Subscribe(USER_DATA)
|
|
2726
3452
|
* @param {SetFlexibleAutoSubscribeRequest} requestParameters Request parameters.
|
|
3453
|
+
*
|
|
2727
3454
|
* @returns {Promise<RestApiResponse<SetFlexibleAutoSubscribeResponse>>}
|
|
2728
3455
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2729
3456
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Set-Flexible-Auto-Subscribe Binance API Documentation}
|
|
@@ -2738,6 +3465,7 @@ var RestAPI = class {
|
|
|
2738
3465
|
*
|
|
2739
3466
|
* @summary Set Locked Auto Subscribe(USER_DATA)
|
|
2740
3467
|
* @param {SetLockedAutoSubscribeRequest} requestParameters Request parameters.
|
|
3468
|
+
*
|
|
2741
3469
|
* @returns {Promise<RestApiResponse<SetLockedAutoSubscribeResponse>>}
|
|
2742
3470
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2743
3471
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Set-Locked-Auto-Subscribe Binance API Documentation}
|
|
@@ -2752,6 +3480,7 @@ var RestAPI = class {
|
|
|
2752
3480
|
*
|
|
2753
3481
|
* @summary Set Locked Product Redeem Option(USER_DATA)
|
|
2754
3482
|
* @param {SetLockedProductRedeemOptionRequest} requestParameters Request parameters.
|
|
3483
|
+
*
|
|
2755
3484
|
* @returns {Promise<RestApiResponse<SetLockedProductRedeemOptionResponse>>}
|
|
2756
3485
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2757
3486
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Set-Locked-Redeem-Option Binance API Documentation}
|
|
@@ -2766,6 +3495,7 @@ var RestAPI = class {
|
|
|
2766
3495
|
*
|
|
2767
3496
|
* @summary Simple Account(USER_DATA)
|
|
2768
3497
|
* @param {SimpleAccountRequest} requestParameters Request parameters.
|
|
3498
|
+
*
|
|
2769
3499
|
* @returns {Promise<RestApiResponse<SimpleAccountResponse>>}
|
|
2770
3500
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2771
3501
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/account/Simple-Account Binance API Documentation}
|
|
@@ -2782,6 +3512,7 @@ var RestAPI = class {
|
|
|
2782
3512
|
*
|
|
2783
3513
|
* @summary Subscribe Flexible Product(TRADE)
|
|
2784
3514
|
* @param {SubscribeFlexibleProductRequest} requestParameters Request parameters.
|
|
3515
|
+
*
|
|
2785
3516
|
* @returns {Promise<RestApiResponse<SubscribeFlexibleProductResponse>>}
|
|
2786
3517
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2787
3518
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Subscribe-Flexible-Product Binance API Documentation}
|
|
@@ -2798,6 +3529,7 @@ var RestAPI = class {
|
|
|
2798
3529
|
*
|
|
2799
3530
|
* @summary Subscribe Locked Product(TRADE)
|
|
2800
3531
|
* @param {SubscribeLockedProductRequest} requestParameters Request parameters.
|
|
3532
|
+
*
|
|
2801
3533
|
* @returns {Promise<RestApiResponse<SubscribeLockedProductResponse>>}
|
|
2802
3534
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2803
3535
|
* @see {@link https://developers.binance.com/docs/simple_earn/flexible-locked/earn/Subscribe-Locked-Product Binance API Documentation}
|
|
@@ -2812,6 +3544,7 @@ var RestAPI = class {
|
|
|
2812
3544
|
*
|
|
2813
3545
|
* @summary Get RWUSD Account (USER_DATA)
|
|
2814
3546
|
* @param {GetRwusdAccountRequest} requestParameters Request parameters.
|
|
3547
|
+
*
|
|
2815
3548
|
* @returns {Promise<RestApiResponse<GetRwusdAccountResponse>>}
|
|
2816
3549
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2817
3550
|
* @see {@link https://developers.binance.com/docs/simple_earn/rwusd/account/ Binance API Documentation}
|
|
@@ -2826,6 +3559,7 @@ var RestAPI = class {
|
|
|
2826
3559
|
*
|
|
2827
3560
|
* @summary Get RWUSD Quota Details (USER_DATA)
|
|
2828
3561
|
* @param {GetRwusdQuotaDetailsRequest} requestParameters Request parameters.
|
|
3562
|
+
*
|
|
2829
3563
|
* @returns {Promise<RestApiResponse<GetRwusdQuotaDetailsResponse>>}
|
|
2830
3564
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2831
3565
|
* @see {@link https://developers.binance.com/docs/simple_earn/rwusd/account/Get-RWUSD-Quota-Details Binance API Documentation}
|
|
@@ -2845,6 +3579,7 @@ var RestAPI = class {
|
|
|
2845
3579
|
*
|
|
2846
3580
|
* @summary Get RWUSD Rate History (USER_DATA)
|
|
2847
3581
|
* @param {GetRwusdRateHistoryRequest} requestParameters Request parameters.
|
|
3582
|
+
*
|
|
2848
3583
|
* @returns {Promise<RestApiResponse<GetRwusdRateHistoryResponse>>}
|
|
2849
3584
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2850
3585
|
* @see {@link https://developers.binance.com/docs/simple_earn/rwusd/history/Get-RWUSD-Rate-History Binance API Documentation}
|
|
@@ -2864,6 +3599,7 @@ var RestAPI = class {
|
|
|
2864
3599
|
*
|
|
2865
3600
|
* @summary Get RWUSD Redemption History (USER_DATA)
|
|
2866
3601
|
* @param {GetRwusdRedemptionHistoryRequest} requestParameters Request parameters.
|
|
3602
|
+
*
|
|
2867
3603
|
* @returns {Promise<RestApiResponse<GetRwusdRedemptionHistoryResponse>>}
|
|
2868
3604
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2869
3605
|
* @see {@link https://developers.binance.com/docs/simple_earn/rwusd/history/Get-RWUSD-Redemption-History Binance API Documentation}
|
|
@@ -2883,6 +3619,7 @@ var RestAPI = class {
|
|
|
2883
3619
|
*
|
|
2884
3620
|
* @summary Get RWUSD Rewards History (USER_DATA)
|
|
2885
3621
|
* @param {GetRwusdRewardsHistoryRequest} requestParameters Request parameters.
|
|
3622
|
+
*
|
|
2886
3623
|
* @returns {Promise<RestApiResponse<GetRwusdRewardsHistoryResponse>>}
|
|
2887
3624
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2888
3625
|
* @see {@link https://developers.binance.com/docs/simple_earn/rwusd/history/Get-RWUSD-Rewards-History Binance API Documentation}
|
|
@@ -2902,6 +3639,7 @@ var RestAPI = class {
|
|
|
2902
3639
|
*
|
|
2903
3640
|
* @summary Get RWUSD subscription history(USER_DATA)
|
|
2904
3641
|
* @param {GetRwusdSubscriptionHistoryRequest} requestParameters Request parameters.
|
|
3642
|
+
*
|
|
2905
3643
|
* @returns {Promise<RestApiResponse<GetRwusdSubscriptionHistoryResponse>>}
|
|
2906
3644
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2907
3645
|
* @see {@link https://developers.binance.com/docs/simple_earn/rwusd/history/Get-RWUSD-subscription-history Binance API Documentation}
|
|
@@ -2918,6 +3656,7 @@ var RestAPI = class {
|
|
|
2918
3656
|
*
|
|
2919
3657
|
* @summary Redeem RWUSD(TRADE)
|
|
2920
3658
|
* @param {RedeemRwusdRequest} requestParameters Request parameters.
|
|
3659
|
+
*
|
|
2921
3660
|
* @returns {Promise<RestApiResponse<RedeemRwusdResponse>>}
|
|
2922
3661
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2923
3662
|
* @see {@link https://developers.binance.com/docs/simple_earn/rwusd/earn/Redeem-RWUSD Binance API Documentation}
|
|
@@ -2934,6 +3673,7 @@ var RestAPI = class {
|
|
|
2934
3673
|
*
|
|
2935
3674
|
* @summary Subscribe RWUSD(TRADE)
|
|
2936
3675
|
* @param {SubscribeRwusdRequest} requestParameters Request parameters.
|
|
3676
|
+
*
|
|
2937
3677
|
* @returns {Promise<RestApiResponse<SubscribeRwusdResponse>>}
|
|
2938
3678
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2939
3679
|
* @see {@link https://developers.binance.com/docs/simple_earn/rwusd/earn/Subscribe-RWUSD Binance API Documentation}
|
|
@@ -2946,12 +3686,12 @@ var RestAPI = class {
|
|
|
2946
3686
|
// src/simple-earn.ts
|
|
2947
3687
|
var SimpleEarn = class {
|
|
2948
3688
|
constructor(config) {
|
|
2949
|
-
const userAgent = (0,
|
|
3689
|
+
const userAgent = (0, import_common5.buildUserAgent)(name, version);
|
|
2950
3690
|
if (config?.configurationRestAPI) {
|
|
2951
|
-
const configRestAPI = new
|
|
3691
|
+
const configRestAPI = new import_common5.ConfigurationRestAPI(
|
|
2952
3692
|
config.configurationRestAPI
|
|
2953
3693
|
);
|
|
2954
|
-
configRestAPI.basePath = configRestAPI.basePath ||
|
|
3694
|
+
configRestAPI.basePath = configRestAPI.basePath || import_common5.SIMPLE_EARN_REST_API_PROD_URL;
|
|
2955
3695
|
configRestAPI.baseOptions = configRestAPI.baseOptions || {};
|
|
2956
3696
|
configRestAPI.baseOptions.headers = {
|
|
2957
3697
|
...configRestAPI.baseOptions.headers || {},
|
|
@@ -2963,7 +3703,7 @@ var SimpleEarn = class {
|
|
|
2963
3703
|
};
|
|
2964
3704
|
|
|
2965
3705
|
// src/index.ts
|
|
2966
|
-
var
|
|
3706
|
+
var import_common6 = require("@binance/common");
|
|
2967
3707
|
// Annotate the CommonJS export names for ESM import in node:
|
|
2968
3708
|
0 && (module.exports = {
|
|
2969
3709
|
BadRequestError,
|