@binance/fiat 4.0.0 → 5.0.2
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/chunk.mjs +13 -0
- package/dist/index.d.mts +401 -817
- package/dist/index.d.ts +403 -818
- package/dist/index.js +286 -478
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +212 -469
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -1,483 +1,226 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
for (var name2 in all)
|
|
4
|
-
__defProp(target, name2, { get: all[name2], enumerable: true });
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
// src/fiat.ts
|
|
8
|
-
import { buildUserAgent, ConfigurationRestAPI as ConfigurationRestAPI3, FIAT_REST_API_PROD_URL } from "@binance/common";
|
|
1
|
+
import { t as __export } from "./chunk.mjs";
|
|
2
|
+
import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, FIAT_REST_API_PROD_URL, FIAT_REST_API_PROD_URL as FIAT_REST_API_PROD_URL$1, ForbiddenError, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError, assertParamExists, buildUserAgent, sendRequest } from "@binance/common";
|
|
9
3
|
|
|
10
|
-
|
|
4
|
+
//#region package.json
|
|
11
5
|
var name = "@binance/fiat";
|
|
12
|
-
var version = "
|
|
13
|
-
|
|
14
|
-
// src/rest-api/index.ts
|
|
15
|
-
var rest_api_exports = {};
|
|
16
|
-
__export(rest_api_exports, {
|
|
17
|
-
FiatApi: () => FiatApi,
|
|
18
|
-
RestAPI: () => RestAPI
|
|
19
|
-
});
|
|
6
|
+
var version = "5.0.2";
|
|
20
7
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
const localVarQueryParameter = {};
|
|
78
|
-
if (transactionType !== void 0 && transactionType !== null) {
|
|
79
|
-
localVarQueryParameter["transactionType"] = transactionType;
|
|
80
|
-
}
|
|
81
|
-
if (beginTime !== void 0 && beginTime !== null) {
|
|
82
|
-
localVarQueryParameter["beginTime"] = beginTime;
|
|
83
|
-
}
|
|
84
|
-
if (endTime !== void 0 && endTime !== null) {
|
|
85
|
-
localVarQueryParameter["endTime"] = endTime;
|
|
86
|
-
}
|
|
87
|
-
if (page !== void 0 && page !== null) {
|
|
88
|
-
localVarQueryParameter["page"] = page;
|
|
89
|
-
}
|
|
90
|
-
if (rows !== void 0 && rows !== null) {
|
|
91
|
-
localVarQueryParameter["rows"] = rows;
|
|
92
|
-
}
|
|
93
|
-
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
94
|
-
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
95
|
-
}
|
|
96
|
-
let _timeUnit;
|
|
97
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
98
|
-
return {
|
|
99
|
-
endpoint: "/sapi/v1/fiat/orders",
|
|
100
|
-
method: "GET",
|
|
101
|
-
params: localVarQueryParameter,
|
|
102
|
-
timeUnit: _timeUnit
|
|
103
|
-
};
|
|
104
|
-
},
|
|
105
|
-
/**
|
|
106
|
-
* Get Fiat Deposit/Withdraw History
|
|
107
|
-
*
|
|
108
|
-
* If beginTime and endTime are not sent, the recent 30-day data will be returned.
|
|
109
|
-
* paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
|
|
110
|
-
* Cash Balance
|
|
111
|
-
* Credit Card
|
|
112
|
-
* Online Banking
|
|
113
|
-
* Bank Transfer
|
|
114
|
-
*
|
|
115
|
-
* Weight: 1
|
|
116
|
-
*
|
|
117
|
-
* @summary Get Fiat Payments History (USER_DATA)
|
|
118
|
-
* @param {string} transactionType 0-buy,1-sell
|
|
119
|
-
* @param {number | bigint} [beginTime]
|
|
120
|
-
* @param {number | bigint} [endTime]
|
|
121
|
-
* @param {number | bigint} [page] default 1
|
|
122
|
-
* @param {number | bigint} [rows] default 100, max 500
|
|
123
|
-
* @param {number | bigint} [recvWindow]
|
|
124
|
-
*
|
|
125
|
-
* @throws {RequiredError}
|
|
126
|
-
*/
|
|
127
|
-
getFiatPaymentsHistory: async (transactionType, beginTime, endTime, page, rows, recvWindow) => {
|
|
128
|
-
assertParamExists("getFiatPaymentsHistory", "transactionType", transactionType);
|
|
129
|
-
const localVarQueryParameter = {};
|
|
130
|
-
if (transactionType !== void 0 && transactionType !== null) {
|
|
131
|
-
localVarQueryParameter["transactionType"] = transactionType;
|
|
132
|
-
}
|
|
133
|
-
if (beginTime !== void 0 && beginTime !== null) {
|
|
134
|
-
localVarQueryParameter["beginTime"] = beginTime;
|
|
135
|
-
}
|
|
136
|
-
if (endTime !== void 0 && endTime !== null) {
|
|
137
|
-
localVarQueryParameter["endTime"] = endTime;
|
|
138
|
-
}
|
|
139
|
-
if (page !== void 0 && page !== null) {
|
|
140
|
-
localVarQueryParameter["page"] = page;
|
|
141
|
-
}
|
|
142
|
-
if (rows !== void 0 && rows !== null) {
|
|
143
|
-
localVarQueryParameter["rows"] = rows;
|
|
144
|
-
}
|
|
145
|
-
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
146
|
-
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
147
|
-
}
|
|
148
|
-
let _timeUnit;
|
|
149
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
150
|
-
return {
|
|
151
|
-
endpoint: "/sapi/v1/fiat/payments",
|
|
152
|
-
method: "GET",
|
|
153
|
-
params: localVarQueryParameter,
|
|
154
|
-
timeUnit: _timeUnit
|
|
155
|
-
};
|
|
156
|
-
},
|
|
157
|
-
/**
|
|
158
|
-
* Get Order Detail
|
|
159
|
-
*
|
|
160
|
-
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
161
|
-
*
|
|
162
|
-
* Weight: 45000
|
|
163
|
-
*
|
|
164
|
-
* @summary Get Order Detail(USER_DATA)
|
|
165
|
-
* @param {string} orderId order id retrieved from the api call of withdrawal
|
|
166
|
-
* @param {number | bigint} [recvWindow]
|
|
167
|
-
*
|
|
168
|
-
* @throws {RequiredError}
|
|
169
|
-
*/
|
|
170
|
-
getOrderDetail: async (orderId, recvWindow) => {
|
|
171
|
-
assertParamExists("getOrderDetail", "orderId", orderId);
|
|
172
|
-
const localVarQueryParameter = {};
|
|
173
|
-
if (orderId !== void 0 && orderId !== null) {
|
|
174
|
-
localVarQueryParameter["orderId"] = orderId;
|
|
175
|
-
}
|
|
176
|
-
if (recvWindow !== void 0 && recvWindow !== null) {
|
|
177
|
-
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
178
|
-
}
|
|
179
|
-
let _timeUnit;
|
|
180
|
-
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
181
|
-
return {
|
|
182
|
-
endpoint: "/sapi/v1/fiat/get-order-detail",
|
|
183
|
-
method: "GET",
|
|
184
|
-
params: localVarQueryParameter,
|
|
185
|
-
timeUnit: _timeUnit
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
};
|
|
8
|
+
//#endregion
|
|
9
|
+
//#region src/rest-api/modules/fiat-api.ts
|
|
10
|
+
/**
|
|
11
|
+
* Binance Fiat REST API
|
|
12
|
+
*
|
|
13
|
+
* OpenAPI Specification for the Binance Fiat REST API
|
|
14
|
+
*
|
|
15
|
+
* The version of the OpenAPI document: 1.0.0
|
|
16
|
+
*
|
|
17
|
+
*
|
|
18
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
19
|
+
* https://openapi-generator.tech
|
|
20
|
+
* Do not edit the class manually.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* FiatApi - axios parameter creator
|
|
24
|
+
*/
|
|
25
|
+
const FiatApiAxiosParamCreator = function(configuration) {
|
|
26
|
+
return {
|
|
27
|
+
getFiatDepositWithdrawHistory: async (transactionType, beginTime, endTime, page, rows, recvWindow) => {
|
|
28
|
+
assertParamExists("getFiatDepositWithdrawHistory", "transactionType", transactionType);
|
|
29
|
+
const localVarQueryParameter = {};
|
|
30
|
+
if (transactionType !== void 0 && transactionType !== null) localVarQueryParameter["transactionType"] = transactionType;
|
|
31
|
+
if (beginTime !== void 0 && beginTime !== null) localVarQueryParameter["beginTime"] = beginTime;
|
|
32
|
+
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
33
|
+
if (page !== void 0 && page !== null) localVarQueryParameter["page"] = page;
|
|
34
|
+
if (rows !== void 0 && rows !== null) localVarQueryParameter["rows"] = rows;
|
|
35
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
36
|
+
let _timeUnit;
|
|
37
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
38
|
+
return {
|
|
39
|
+
endpoint: "/sapi/v1/fiat/orders",
|
|
40
|
+
method: "GET",
|
|
41
|
+
params: localVarQueryParameter,
|
|
42
|
+
timeUnit: _timeUnit
|
|
43
|
+
};
|
|
44
|
+
},
|
|
45
|
+
getFiatPaymentsHistory: async (transactionType, beginTime, endTime, page, rows, recvWindow) => {
|
|
46
|
+
assertParamExists("getFiatPaymentsHistory", "transactionType", transactionType);
|
|
47
|
+
const localVarQueryParameter = {};
|
|
48
|
+
if (transactionType !== void 0 && transactionType !== null) localVarQueryParameter["transactionType"] = transactionType;
|
|
49
|
+
if (beginTime !== void 0 && beginTime !== null) localVarQueryParameter["beginTime"] = beginTime;
|
|
50
|
+
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
51
|
+
if (page !== void 0 && page !== null) localVarQueryParameter["page"] = page;
|
|
52
|
+
if (rows !== void 0 && rows !== null) localVarQueryParameter["rows"] = rows;
|
|
53
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
54
|
+
let _timeUnit;
|
|
55
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
56
|
+
return {
|
|
57
|
+
endpoint: "/sapi/v1/fiat/payments",
|
|
58
|
+
method: "GET",
|
|
59
|
+
params: localVarQueryParameter,
|
|
60
|
+
timeUnit: _timeUnit
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
};
|
|
189
64
|
};
|
|
65
|
+
/**
|
|
66
|
+
* FiatApi - object-oriented interface
|
|
67
|
+
* @class FiatApi
|
|
68
|
+
*/
|
|
190
69
|
var FiatApi = class {
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
237
|
-
* @memberof FiatApi
|
|
238
|
-
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}
|
|
239
|
-
*/
|
|
240
|
-
async getFiatDepositWithdrawHistory(requestParameters) {
|
|
241
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatDepositWithdrawHistory(
|
|
242
|
-
requestParameters?.transactionType,
|
|
243
|
-
requestParameters?.beginTime,
|
|
244
|
-
requestParameters?.endTime,
|
|
245
|
-
requestParameters?.page,
|
|
246
|
-
requestParameters?.rows,
|
|
247
|
-
requestParameters?.recvWindow
|
|
248
|
-
);
|
|
249
|
-
return sendRequest(
|
|
250
|
-
this.configuration,
|
|
251
|
-
localVarAxiosArgs.endpoint,
|
|
252
|
-
localVarAxiosArgs.method,
|
|
253
|
-
localVarAxiosArgs.params,
|
|
254
|
-
localVarAxiosArgs?.timeUnit,
|
|
255
|
-
{ isSigned: true }
|
|
256
|
-
);
|
|
257
|
-
}
|
|
258
|
-
/**
|
|
259
|
-
* Get Fiat Deposit/Withdraw History
|
|
260
|
-
*
|
|
261
|
-
* If beginTime and endTime are not sent, the recent 30-day data will be returned.
|
|
262
|
-
* paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
|
|
263
|
-
* Cash Balance
|
|
264
|
-
* Credit Card
|
|
265
|
-
* Online Banking
|
|
266
|
-
* Bank Transfer
|
|
267
|
-
*
|
|
268
|
-
* Weight: 1
|
|
269
|
-
*
|
|
270
|
-
* @summary Get Fiat Payments History (USER_DATA)
|
|
271
|
-
* @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
|
|
272
|
-
* @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}
|
|
273
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
274
|
-
* @memberof FiatApi
|
|
275
|
-
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
|
|
276
|
-
*/
|
|
277
|
-
async getFiatPaymentsHistory(requestParameters) {
|
|
278
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatPaymentsHistory(
|
|
279
|
-
requestParameters?.transactionType,
|
|
280
|
-
requestParameters?.beginTime,
|
|
281
|
-
requestParameters?.endTime,
|
|
282
|
-
requestParameters?.page,
|
|
283
|
-
requestParameters?.rows,
|
|
284
|
-
requestParameters?.recvWindow
|
|
285
|
-
);
|
|
286
|
-
return sendRequest(
|
|
287
|
-
this.configuration,
|
|
288
|
-
localVarAxiosArgs.endpoint,
|
|
289
|
-
localVarAxiosArgs.method,
|
|
290
|
-
localVarAxiosArgs.params,
|
|
291
|
-
localVarAxiosArgs?.timeUnit,
|
|
292
|
-
{ isSigned: true }
|
|
293
|
-
);
|
|
294
|
-
}
|
|
295
|
-
/**
|
|
296
|
-
* Get Order Detail
|
|
297
|
-
*
|
|
298
|
-
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
299
|
-
*
|
|
300
|
-
* Weight: 45000
|
|
301
|
-
*
|
|
302
|
-
* @summary Get Order Detail(USER_DATA)
|
|
303
|
-
* @param {GetOrderDetailRequest} requestParameters Request parameters.
|
|
304
|
-
* @returns {Promise<RestApiResponse<GetOrderDetailResponse>>}
|
|
305
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
306
|
-
* @memberof FiatApi
|
|
307
|
-
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail Binance API Documentation}
|
|
308
|
-
*/
|
|
309
|
-
async getOrderDetail(requestParameters) {
|
|
310
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOrderDetail(
|
|
311
|
-
requestParameters?.orderId,
|
|
312
|
-
requestParameters?.recvWindow
|
|
313
|
-
);
|
|
314
|
-
return sendRequest(
|
|
315
|
-
this.configuration,
|
|
316
|
-
localVarAxiosArgs.endpoint,
|
|
317
|
-
localVarAxiosArgs.method,
|
|
318
|
-
localVarAxiosArgs.params,
|
|
319
|
-
localVarAxiosArgs?.timeUnit,
|
|
320
|
-
{ isSigned: true }
|
|
321
|
-
);
|
|
322
|
-
}
|
|
70
|
+
constructor(configuration) {
|
|
71
|
+
this.configuration = configuration;
|
|
72
|
+
this.localVarAxiosParamCreator = FiatApiAxiosParamCreator(configuration);
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get Fiat Deposit/Withdraw History
|
|
76
|
+
*
|
|
77
|
+
* If beginTime and endTime are not sent, the recent 30-day data will be returned.
|
|
78
|
+
*
|
|
79
|
+
* Weight: 45000
|
|
80
|
+
*
|
|
81
|
+
* @summary Get Fiat Deposit/Withdraw History (USER_DATA)
|
|
82
|
+
* @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.
|
|
83
|
+
* @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}
|
|
84
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
85
|
+
* @memberof FiatApi
|
|
86
|
+
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}
|
|
87
|
+
*/
|
|
88
|
+
async getFiatDepositWithdrawHistory(requestParameters) {
|
|
89
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatDepositWithdrawHistory(requestParameters?.transactionType, requestParameters?.beginTime, requestParameters?.endTime, requestParameters?.page, requestParameters?.rows, requestParameters?.recvWindow);
|
|
90
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Get Fiat Deposit/Withdraw History
|
|
94
|
+
*
|
|
95
|
+
* If beginTime and endTime are not sent, the recent 30-day data will be returned.
|
|
96
|
+
* paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
|
|
97
|
+
* Cash Balance
|
|
98
|
+
* Credit Card
|
|
99
|
+
* Online Banking
|
|
100
|
+
* Bank Transfer
|
|
101
|
+
*
|
|
102
|
+
* Weight: 1
|
|
103
|
+
*
|
|
104
|
+
* @summary Get Fiat Payments History (USER_DATA)
|
|
105
|
+
* @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
|
|
106
|
+
* @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}
|
|
107
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
108
|
+
* @memberof FiatApi
|
|
109
|
+
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
|
|
110
|
+
*/
|
|
111
|
+
async getFiatPaymentsHistory(requestParameters) {
|
|
112
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatPaymentsHistory(requestParameters?.transactionType, requestParameters?.beginTime, requestParameters?.endTime, requestParameters?.page, requestParameters?.rows, requestParameters?.recvWindow);
|
|
113
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
114
|
+
}
|
|
323
115
|
};
|
|
324
116
|
|
|
325
|
-
|
|
326
|
-
|
|
117
|
+
//#endregion
|
|
118
|
+
//#region src/rest-api/rest-api.ts
|
|
119
|
+
/**
|
|
120
|
+
* Binance Fiat REST API
|
|
121
|
+
*
|
|
122
|
+
* OpenAPI Specification for the Binance Fiat REST API
|
|
123
|
+
*
|
|
124
|
+
* The version of the OpenAPI document: 1.0.0
|
|
125
|
+
*
|
|
126
|
+
*
|
|
127
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
128
|
+
* https://openapi-generator.tech
|
|
129
|
+
* Do not edit the class manually.
|
|
130
|
+
*/
|
|
327
131
|
var RestAPI = class {
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
}
|
|
394
|
-
/**
|
|
395
|
-
* Get Fiat Deposit/Withdraw History
|
|
396
|
-
*
|
|
397
|
-
* If beginTime and endTime are not sent, the recent 30-day data will be returned.
|
|
398
|
-
* paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
|
|
399
|
-
* Cash Balance
|
|
400
|
-
* Credit Card
|
|
401
|
-
* Online Banking
|
|
402
|
-
* Bank Transfer
|
|
403
|
-
*
|
|
404
|
-
* Weight: 1
|
|
405
|
-
*
|
|
406
|
-
* @summary Get Fiat Payments History (USER_DATA)
|
|
407
|
-
* @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
|
|
408
|
-
*
|
|
409
|
-
* @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}
|
|
410
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
411
|
-
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
|
|
412
|
-
*/
|
|
413
|
-
getFiatPaymentsHistory(requestParameters) {
|
|
414
|
-
return this.fiatApi.getFiatPaymentsHistory(requestParameters);
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* Get Order Detail
|
|
418
|
-
*
|
|
419
|
-
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
420
|
-
*
|
|
421
|
-
* Weight: 45000
|
|
422
|
-
*
|
|
423
|
-
* @summary Get Order Detail(USER_DATA)
|
|
424
|
-
* @param {GetOrderDetailRequest} requestParameters Request parameters.
|
|
425
|
-
*
|
|
426
|
-
* @returns {Promise<RestApiResponse<GetOrderDetailResponse>>}
|
|
427
|
-
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
428
|
-
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail Binance API Documentation}
|
|
429
|
-
*/
|
|
430
|
-
getOrderDetail(requestParameters) {
|
|
431
|
-
return this.fiatApi.getOrderDetail(requestParameters);
|
|
432
|
-
}
|
|
132
|
+
constructor(configuration) {
|
|
133
|
+
this.configuration = configuration;
|
|
134
|
+
this.fiatApi = new FiatApi(configuration);
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Generic function to send a request.
|
|
138
|
+
* @param endpoint - The API endpoint to call.
|
|
139
|
+
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
140
|
+
* @param params - Query parameters for the request.
|
|
141
|
+
*
|
|
142
|
+
* @returns A promise resolving to the response data object.
|
|
143
|
+
*/
|
|
144
|
+
sendRequest(endpoint, method, params = {}) {
|
|
145
|
+
return sendRequest(this.configuration, endpoint, method, params, void 0);
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Generic function to send a signed request.
|
|
149
|
+
* @param endpoint - The API endpoint to call.
|
|
150
|
+
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
|
|
151
|
+
* @param params - Query parameters for the request.
|
|
152
|
+
*
|
|
153
|
+
* @returns A promise resolving to the response data object.
|
|
154
|
+
*/
|
|
155
|
+
sendSignedRequest(endpoint, method, params = {}) {
|
|
156
|
+
return sendRequest(this.configuration, endpoint, method, params, void 0, { isSigned: true });
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Get Fiat Deposit/Withdraw History
|
|
160
|
+
*
|
|
161
|
+
* If beginTime and endTime are not sent, the recent 30-day data will be returned.
|
|
162
|
+
*
|
|
163
|
+
* Weight: 45000
|
|
164
|
+
*
|
|
165
|
+
* @summary Get Fiat Deposit/Withdraw History (USER_DATA)
|
|
166
|
+
* @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.
|
|
167
|
+
*
|
|
168
|
+
* @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}
|
|
169
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
170
|
+
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}
|
|
171
|
+
*/
|
|
172
|
+
getFiatDepositWithdrawHistory(requestParameters) {
|
|
173
|
+
return this.fiatApi.getFiatDepositWithdrawHistory(requestParameters);
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Get Fiat Deposit/Withdraw History
|
|
177
|
+
*
|
|
178
|
+
* If beginTime and endTime are not sent, the recent 30-day data will be returned.
|
|
179
|
+
* paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
|
|
180
|
+
* Cash Balance
|
|
181
|
+
* Credit Card
|
|
182
|
+
* Online Banking
|
|
183
|
+
* Bank Transfer
|
|
184
|
+
*
|
|
185
|
+
* Weight: 1
|
|
186
|
+
*
|
|
187
|
+
* @summary Get Fiat Payments History (USER_DATA)
|
|
188
|
+
* @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
|
|
189
|
+
*
|
|
190
|
+
* @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}
|
|
191
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
192
|
+
* @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
|
|
193
|
+
*/
|
|
194
|
+
getFiatPaymentsHistory(requestParameters) {
|
|
195
|
+
return this.fiatApi.getFiatPaymentsHistory(requestParameters);
|
|
196
|
+
}
|
|
433
197
|
};
|
|
434
198
|
|
|
435
|
-
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region src/rest-api/index.ts
|
|
201
|
+
var rest_api_exports = /* @__PURE__ */ __export({
|
|
202
|
+
FiatApi: () => FiatApi,
|
|
203
|
+
RestAPI: () => RestAPI
|
|
204
|
+
});
|
|
205
|
+
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region src/fiat.ts
|
|
436
208
|
var Fiat = class {
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
}
|
|
451
|
-
}
|
|
209
|
+
constructor(config) {
|
|
210
|
+
const userAgent = buildUserAgent(name, version);
|
|
211
|
+
if (config?.configurationRestAPI) {
|
|
212
|
+
const configRestAPI = new ConfigurationRestAPI(config.configurationRestAPI);
|
|
213
|
+
configRestAPI.basePath = configRestAPI.basePath || FIAT_REST_API_PROD_URL$1;
|
|
214
|
+
configRestAPI.baseOptions = configRestAPI.baseOptions || {};
|
|
215
|
+
configRestAPI.baseOptions.headers = {
|
|
216
|
+
...configRestAPI.baseOptions.headers || {},
|
|
217
|
+
"User-Agent": userAgent
|
|
218
|
+
};
|
|
219
|
+
this.restAPI = new RestAPI(configRestAPI);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
452
222
|
};
|
|
453
223
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
FIAT_REST_API_PROD_URL as FIAT_REST_API_PROD_URL2,
|
|
457
|
-
ConnectorClientError,
|
|
458
|
-
RequiredError,
|
|
459
|
-
UnauthorizedError,
|
|
460
|
-
ForbiddenError,
|
|
461
|
-
TooManyRequestsError,
|
|
462
|
-
RateLimitBanError,
|
|
463
|
-
ServerError,
|
|
464
|
-
NetworkError,
|
|
465
|
-
NotFoundError,
|
|
466
|
-
BadRequestError
|
|
467
|
-
} from "@binance/common";
|
|
468
|
-
export {
|
|
469
|
-
BadRequestError,
|
|
470
|
-
ConnectorClientError,
|
|
471
|
-
FIAT_REST_API_PROD_URL2 as FIAT_REST_API_PROD_URL,
|
|
472
|
-
Fiat,
|
|
473
|
-
rest_api_exports as FiatRestAPI,
|
|
474
|
-
ForbiddenError,
|
|
475
|
-
NetworkError,
|
|
476
|
-
NotFoundError,
|
|
477
|
-
RateLimitBanError,
|
|
478
|
-
RequiredError,
|
|
479
|
-
ServerError,
|
|
480
|
-
TooManyRequestsError,
|
|
481
|
-
UnauthorizedError
|
|
482
|
-
};
|
|
224
|
+
//#endregion
|
|
225
|
+
export { BadRequestError, ConnectorClientError, FIAT_REST_API_PROD_URL, Fiat, rest_api_exports as FiatRestAPI, ForbiddenError, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError };
|
|
483
226
|
//# sourceMappingURL=index.mjs.map
|