@binance/fiat 6.0.15 → 7.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 +24 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.js +22 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -26,6 +26,24 @@ interface AccountInfo {
|
|
|
26
26
|
* @memberof AccountInfo
|
|
27
27
|
*/
|
|
28
28
|
accountNumber?: string;
|
|
29
|
+
/**
|
|
30
|
+
*
|
|
31
|
+
* @type {string}
|
|
32
|
+
* @memberof AccountInfo
|
|
33
|
+
*/
|
|
34
|
+
agency?: string;
|
|
35
|
+
/**
|
|
36
|
+
*
|
|
37
|
+
* @type {string}
|
|
38
|
+
* @memberof AccountInfo
|
|
39
|
+
*/
|
|
40
|
+
bankCodeForPix?: string;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* @type {string}
|
|
44
|
+
* @memberof AccountInfo
|
|
45
|
+
*/
|
|
46
|
+
accountType?: string;
|
|
29
47
|
}
|
|
30
48
|
//#endregion
|
|
31
49
|
//#region src/rest-api/types/deposit-response-data.d.ts
|
|
@@ -461,6 +479,8 @@ interface FiatApiInterface {
|
|
|
461
479
|
*
|
|
462
480
|
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
463
481
|
*
|
|
482
|
+
* `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
|
|
483
|
+
*
|
|
464
484
|
* Weight: 45000
|
|
465
485
|
*
|
|
466
486
|
* @summary Deposit(TRADE)
|
|
@@ -733,6 +753,8 @@ declare class FiatApi implements FiatApiInterface {
|
|
|
733
753
|
*
|
|
734
754
|
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
735
755
|
*
|
|
756
|
+
* `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
|
|
757
|
+
*
|
|
736
758
|
* Weight: 45000
|
|
737
759
|
*
|
|
738
760
|
* @summary Deposit(TRADE)
|
|
@@ -848,6 +870,8 @@ declare class RestAPI {
|
|
|
848
870
|
*
|
|
849
871
|
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
850
872
|
*
|
|
873
|
+
* `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
|
|
874
|
+
*
|
|
851
875
|
* Weight: 45000
|
|
852
876
|
*
|
|
853
877
|
* @summary Deposit(TRADE)
|
package/dist/index.d.ts
CHANGED
|
@@ -28,6 +28,24 @@ interface AccountInfo {
|
|
|
28
28
|
* @memberof AccountInfo
|
|
29
29
|
*/
|
|
30
30
|
accountNumber?: string;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof AccountInfo
|
|
35
|
+
*/
|
|
36
|
+
agency?: string;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof AccountInfo
|
|
41
|
+
*/
|
|
42
|
+
bankCodeForPix?: string;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof AccountInfo
|
|
47
|
+
*/
|
|
48
|
+
accountType?: string;
|
|
31
49
|
}
|
|
32
50
|
//#endregion
|
|
33
51
|
//#region src/rest-api/types/deposit-response-data.d.ts
|
|
@@ -462,6 +480,8 @@ interface FiatApiInterface {
|
|
|
462
480
|
*
|
|
463
481
|
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
464
482
|
*
|
|
483
|
+
* `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
|
|
484
|
+
*
|
|
465
485
|
* Weight: 45000
|
|
466
486
|
*
|
|
467
487
|
* @summary Deposit(TRADE)
|
|
@@ -734,6 +754,8 @@ declare class FiatApi implements FiatApiInterface {
|
|
|
734
754
|
*
|
|
735
755
|
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
736
756
|
*
|
|
757
|
+
* `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
|
|
758
|
+
*
|
|
737
759
|
* Weight: 45000
|
|
738
760
|
*
|
|
739
761
|
* @summary Deposit(TRADE)
|
|
@@ -849,6 +871,8 @@ declare class RestAPI {
|
|
|
849
871
|
*
|
|
850
872
|
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
851
873
|
*
|
|
874
|
+
* `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
|
|
875
|
+
*
|
|
852
876
|
* Weight: 45000
|
|
853
877
|
*
|
|
854
878
|
* @summary Deposit(TRADE)
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ let __binance_common = require("@binance/common");
|
|
|
14
14
|
|
|
15
15
|
//#region package.json
|
|
16
16
|
var name = "@binance/fiat";
|
|
17
|
-
var version = "
|
|
17
|
+
var version = "7.0.0";
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/rest-api/modules/fiat-api.ts
|
|
@@ -41,6 +41,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
41
41
|
(0, __binance_common.assertParamExists)("deposit", "amount", amount);
|
|
42
42
|
const localVarQueryParameter = {};
|
|
43
43
|
const localVarBodyParameter = {};
|
|
44
|
+
const localVarHeaderParameter = {};
|
|
44
45
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
45
46
|
if (currency !== void 0 && currency !== null) localVarBodyParameter["currency"] = currency;
|
|
46
47
|
if (apiPaymentMethod !== void 0 && apiPaymentMethod !== null) localVarBodyParameter["apiPaymentMethod"] = apiPaymentMethod;
|
|
@@ -53,6 +54,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
53
54
|
method: "POST",
|
|
54
55
|
queryParams: localVarQueryParameter,
|
|
55
56
|
bodyParams: localVarBodyParameter,
|
|
57
|
+
headerParams: localVarHeaderParameter,
|
|
56
58
|
timeUnit: _timeUnit
|
|
57
59
|
};
|
|
58
60
|
},
|
|
@@ -63,6 +65,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
63
65
|
(0, __binance_common.assertParamExists)("fiatWithdraw", "accountInfo", accountInfo);
|
|
64
66
|
const localVarQueryParameter = {};
|
|
65
67
|
const localVarBodyParameter = {};
|
|
68
|
+
const localVarHeaderParameter = {};
|
|
66
69
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
67
70
|
if (currency !== void 0 && currency !== null) localVarBodyParameter["currency"] = currency;
|
|
68
71
|
if (apiPaymentMethod !== void 0 && apiPaymentMethod !== null) localVarBodyParameter["apiPaymentMethod"] = apiPaymentMethod;
|
|
@@ -76,6 +79,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
76
79
|
method: "POST",
|
|
77
80
|
queryParams: localVarQueryParameter,
|
|
78
81
|
bodyParams: localVarBodyParameter,
|
|
82
|
+
headerParams: localVarHeaderParameter,
|
|
79
83
|
timeUnit: _timeUnit
|
|
80
84
|
};
|
|
81
85
|
},
|
|
@@ -83,6 +87,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
83
87
|
(0, __binance_common.assertParamExists)("getFiatDepositWithdrawHistory", "transactionType", transactionType);
|
|
84
88
|
const localVarQueryParameter = {};
|
|
85
89
|
const localVarBodyParameter = {};
|
|
90
|
+
const localVarHeaderParameter = {};
|
|
86
91
|
if (transactionType !== void 0 && transactionType !== null) localVarQueryParameter["transactionType"] = transactionType;
|
|
87
92
|
if (beginTime !== void 0 && beginTime !== null) localVarQueryParameter["beginTime"] = beginTime;
|
|
88
93
|
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
@@ -96,6 +101,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
96
101
|
method: "GET",
|
|
97
102
|
queryParams: localVarQueryParameter,
|
|
98
103
|
bodyParams: localVarBodyParameter,
|
|
104
|
+
headerParams: localVarHeaderParameter,
|
|
99
105
|
timeUnit: _timeUnit
|
|
100
106
|
};
|
|
101
107
|
},
|
|
@@ -103,6 +109,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
103
109
|
(0, __binance_common.assertParamExists)("getFiatPaymentsHistory", "transactionType", transactionType);
|
|
104
110
|
const localVarQueryParameter = {};
|
|
105
111
|
const localVarBodyParameter = {};
|
|
112
|
+
const localVarHeaderParameter = {};
|
|
106
113
|
if (transactionType !== void 0 && transactionType !== null) localVarQueryParameter["transactionType"] = transactionType;
|
|
107
114
|
if (beginTime !== void 0 && beginTime !== null) localVarQueryParameter["beginTime"] = beginTime;
|
|
108
115
|
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
@@ -116,6 +123,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
116
123
|
method: "GET",
|
|
117
124
|
queryParams: localVarQueryParameter,
|
|
118
125
|
bodyParams: localVarBodyParameter,
|
|
126
|
+
headerParams: localVarHeaderParameter,
|
|
119
127
|
timeUnit: _timeUnit
|
|
120
128
|
};
|
|
121
129
|
},
|
|
@@ -123,6 +131,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
123
131
|
(0, __binance_common.assertParamExists)("getOrderDetail", "orderNo", orderNo);
|
|
124
132
|
const localVarQueryParameter = {};
|
|
125
133
|
const localVarBodyParameter = {};
|
|
134
|
+
const localVarHeaderParameter = {};
|
|
126
135
|
if (orderNo !== void 0 && orderNo !== null) localVarQueryParameter["orderNo"] = orderNo;
|
|
127
136
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
128
137
|
let _timeUnit;
|
|
@@ -132,6 +141,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
132
141
|
method: "GET",
|
|
133
142
|
queryParams: localVarQueryParameter,
|
|
134
143
|
bodyParams: localVarBodyParameter,
|
|
144
|
+
headerParams: localVarHeaderParameter,
|
|
135
145
|
timeUnit: _timeUnit
|
|
136
146
|
};
|
|
137
147
|
}
|
|
@@ -155,6 +165,8 @@ var FiatApi = class {
|
|
|
155
165
|
*
|
|
156
166
|
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
157
167
|
*
|
|
168
|
+
* `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
|
|
169
|
+
*
|
|
158
170
|
* Weight: 45000
|
|
159
171
|
*
|
|
160
172
|
* @summary Deposit(TRADE)
|
|
@@ -166,7 +178,7 @@ var FiatApi = class {
|
|
|
166
178
|
*/
|
|
167
179
|
async deposit(requestParameters) {
|
|
168
180
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.deposit(requestParameters?.currency, requestParameters?.apiPaymentMethod, requestParameters?.amount, requestParameters?.recvWindow, requestParameters?.ext);
|
|
169
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
181
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
170
182
|
}
|
|
171
183
|
/**
|
|
172
184
|
* Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.
|
|
@@ -188,7 +200,7 @@ var FiatApi = class {
|
|
|
188
200
|
*/
|
|
189
201
|
async fiatWithdraw(requestParameters) {
|
|
190
202
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.fiatWithdraw(requestParameters?.currency, requestParameters?.apiPaymentMethod, requestParameters?.amount, requestParameters?.accountInfo, requestParameters?.recvWindow, requestParameters?.ext);
|
|
191
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
203
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
192
204
|
}
|
|
193
205
|
/**
|
|
194
206
|
* Get Fiat Deposit/Withdraw History
|
|
@@ -206,7 +218,7 @@ var FiatApi = class {
|
|
|
206
218
|
*/
|
|
207
219
|
async getFiatDepositWithdrawHistory(requestParameters) {
|
|
208
220
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatDepositWithdrawHistory(requestParameters?.transactionType, requestParameters?.beginTime, requestParameters?.endTime, requestParameters?.page, requestParameters?.rows, requestParameters?.recvWindow);
|
|
209
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
221
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
210
222
|
}
|
|
211
223
|
/**
|
|
212
224
|
* Get Fiat Deposit/Withdraw History
|
|
@@ -229,7 +241,7 @@ var FiatApi = class {
|
|
|
229
241
|
*/
|
|
230
242
|
async getFiatPaymentsHistory(requestParameters) {
|
|
231
243
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatPaymentsHistory(requestParameters?.transactionType, requestParameters?.beginTime, requestParameters?.endTime, requestParameters?.page, requestParameters?.rows, requestParameters?.recvWindow);
|
|
232
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
244
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
233
245
|
}
|
|
234
246
|
/**
|
|
235
247
|
* Get Order Detail
|
|
@@ -247,7 +259,7 @@ var FiatApi = class {
|
|
|
247
259
|
*/
|
|
248
260
|
async getOrderDetail(requestParameters) {
|
|
249
261
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOrderDetail(requestParameters?.orderNo, requestParameters?.recvWindow);
|
|
250
|
-
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
262
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
251
263
|
}
|
|
252
264
|
};
|
|
253
265
|
|
|
@@ -280,7 +292,7 @@ var RestAPI = class {
|
|
|
280
292
|
* @returns A promise resolving to the response data object.
|
|
281
293
|
*/
|
|
282
294
|
sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
|
|
283
|
-
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
|
|
295
|
+
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0);
|
|
284
296
|
}
|
|
285
297
|
/**
|
|
286
298
|
* Generic function to send a signed request.
|
|
@@ -292,7 +304,7 @@ var RestAPI = class {
|
|
|
292
304
|
* @returns A promise resolving to the response data object.
|
|
293
305
|
*/
|
|
294
306
|
sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
|
|
295
|
-
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
|
|
307
|
+
return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0, { isSigned: true });
|
|
296
308
|
}
|
|
297
309
|
/**
|
|
298
310
|
* Submit deposit request, in this version, we only support BRL deposit via pix.
|
|
@@ -303,6 +315,8 @@ var RestAPI = class {
|
|
|
303
315
|
*
|
|
304
316
|
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
305
317
|
*
|
|
318
|
+
* `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
|
|
319
|
+
*
|
|
306
320
|
* Weight: 45000
|
|
307
321
|
*
|
|
308
322
|
* @summary Deposit(TRADE)
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","FIAT_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/fiat-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/fiat.ts"],"sourcesContent":["{\n \"name\": \"@binance/fiat\",\n \"description\": \"Official Binance Fiat Connector - A lightweight library that provides a convenient interface to Binance's Fiat REST API.\",\n \"version\": \"6.0.15\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Fiat\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.3.14\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Fiat REST API\n *\n * OpenAPI Specification for the Binance Fiat REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n AccountInfo,\n DepositResponse,\n FiatWithdrawResponse,\n GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\n GetOrderDetailResponse,\n} from '../types';\n\n/**\n * FiatApi - axios parameter creator\n */\nconst FiatApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {string} currency\n * @param {string} apiPaymentMethod\n * @param {number | bigint} amount\n * @param {number | bigint} [recvWindow]\n * @param {object} [ext]\n *\n * @throws {RequiredError}\n */\n deposit: async (\n currency: string,\n apiPaymentMethod: string,\n amount: number | bigint,\n recvWindow?: number | bigint,\n ext?: object\n ): Promise<RequestArgs> => {\n // verify required parameter 'currency' is not null or undefined\n assertParamExists('deposit', 'currency', currency);\n // verify required parameter 'apiPaymentMethod' is not null or undefined\n assertParamExists('deposit', 'apiPaymentMethod', apiPaymentMethod);\n // verify required parameter 'amount' is not null or undefined\n assertParamExists('deposit', 'amount', amount);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n if (currency !== undefined && currency !== null) {\n localVarBodyParameter['currency'] = currency;\n }\n\n if (apiPaymentMethod !== undefined && apiPaymentMethod !== null) {\n localVarBodyParameter['apiPaymentMethod'] = apiPaymentMethod;\n }\n\n if (amount !== undefined && amount !== null) {\n localVarBodyParameter['amount'] = amount;\n }\n\n if (ext !== undefined && ext !== null) {\n localVarBodyParameter['ext'] = ext;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/deposit',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {string} currency\n * @param {string} apiPaymentMethod\n * @param {number | bigint} amount\n * @param {AccountInfo} accountInfo\n * @param {number | bigint} [recvWindow]\n * @param {object} [ext]\n *\n * @throws {RequiredError}\n */\n fiatWithdraw: async (\n currency: string,\n apiPaymentMethod: string,\n amount: number | bigint,\n accountInfo: AccountInfo,\n recvWindow?: number | bigint,\n ext?: object\n ): Promise<RequestArgs> => {\n // verify required parameter 'currency' is not null or undefined\n assertParamExists('fiatWithdraw', 'currency', currency);\n // verify required parameter 'apiPaymentMethod' is not null or undefined\n assertParamExists('fiatWithdraw', 'apiPaymentMethod', apiPaymentMethod);\n // verify required parameter 'amount' is not null or undefined\n assertParamExists('fiatWithdraw', 'amount', amount);\n // verify required parameter 'accountInfo' is not null or undefined\n assertParamExists('fiatWithdraw', 'accountInfo', accountInfo);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n if (currency !== undefined && currency !== null) {\n localVarBodyParameter['currency'] = currency;\n }\n\n if (apiPaymentMethod !== undefined && apiPaymentMethod !== null) {\n localVarBodyParameter['apiPaymentMethod'] = apiPaymentMethod;\n }\n\n if (amount !== undefined && amount !== null) {\n localVarBodyParameter['amount'] = amount;\n }\n\n if (accountInfo !== undefined && accountInfo !== null) {\n localVarBodyParameter['accountInfo'] = accountInfo;\n }\n\n if (ext !== undefined && ext !== null) {\n localVarBodyParameter['ext'] = ext;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v2/fiat/withdraw',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {string} transactionType 0-buy,1-sell\n * @param {number | bigint} [beginTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [page] default 1\n * @param {number | bigint} [rows] default 100, max 500\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatDepositWithdrawHistory: async (\n transactionType: string,\n beginTime?: number | bigint,\n endTime?: number | bigint,\n page?: number | bigint,\n rows?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'transactionType' is not null or undefined\n assertParamExists('getFiatDepositWithdrawHistory', 'transactionType', transactionType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/orders',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {string} transactionType 0-buy,1-sell\n * @param {number | bigint} [beginTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [page] default 1\n * @param {number | bigint} [rows] default 100, max 500\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatPaymentsHistory: async (\n transactionType: string,\n beginTime?: number | bigint,\n endTime?: number | bigint,\n page?: number | bigint,\n rows?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'transactionType' is not null or undefined\n assertParamExists('getFiatPaymentsHistory', 'transactionType', transactionType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/payments',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {string} orderNo order id retrieved from the api call of withdrawal\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getOrderDetail: async (\n orderNo: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'orderNo' is not null or undefined\n assertParamExists('getOrderDetail', 'orderNo', orderNo);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (orderNo !== undefined && orderNo !== null) {\n localVarQueryParameter['orderNo'] = orderNo;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/get-order-detail',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * FiatApi - interface\n * @interface FiatApi\n */\nexport interface FiatApiInterface {\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {DepositRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n deposit(requestParameters: DepositRequest): Promise<RestApiResponse<DepositResponse>>;\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {FiatWithdrawRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n fiatWithdraw(\n requestParameters: FiatWithdrawRequest\n ): Promise<RestApiResponse<FiatWithdrawResponse>>;\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n getFiatDepositWithdrawHistory(\n requestParameters: GetFiatDepositWithdrawHistoryRequest\n ): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>;\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n getFiatPaymentsHistory(\n requestParameters: GetFiatPaymentsHistoryRequest\n ): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>;\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {GetOrderDetailRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n getOrderDetail(\n requestParameters: GetOrderDetailRequest\n ): Promise<RestApiResponse<GetOrderDetailResponse>>;\n}\n\n/**\n * Request parameters for deposit operation in FiatApi.\n * @interface DepositRequest\n */\nexport interface DepositRequest {\n /**\n *\n * @type {string}\n * @memberof FiatApiDeposit\n */\n readonly currency: string;\n\n /**\n *\n * @type {string}\n * @memberof FiatApiDeposit\n */\n readonly apiPaymentMethod: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiDeposit\n */\n readonly amount: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiDeposit\n */\n readonly recvWindow?: number | bigint;\n\n /**\n *\n * @type {object}\n * @memberof FiatApiDeposit\n */\n readonly ext?: object;\n}\n\n/**\n * Request parameters for fiatWithdraw operation in FiatApi.\n * @interface FiatWithdrawRequest\n */\nexport interface FiatWithdrawRequest {\n /**\n *\n * @type {string}\n * @memberof FiatApiFiatWithdraw\n */\n readonly currency: string;\n\n /**\n *\n * @type {string}\n * @memberof FiatApiFiatWithdraw\n */\n readonly apiPaymentMethod: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiFiatWithdraw\n */\n readonly amount: number | bigint;\n\n /**\n *\n * @type {AccountInfo}\n * @memberof FiatApiFiatWithdraw\n */\n readonly accountInfo: AccountInfo;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiFiatWithdraw\n */\n readonly recvWindow?: number | bigint;\n\n /**\n *\n * @type {object}\n * @memberof FiatApiFiatWithdraw\n */\n readonly ext?: object;\n}\n\n/**\n * Request parameters for getFiatDepositWithdrawHistory operation in FiatApi.\n * @interface GetFiatDepositWithdrawHistoryRequest\n */\nexport interface GetFiatDepositWithdrawHistoryRequest {\n /**\n * 0-buy,1-sell\n * @type {string}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly transactionType: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly beginTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly endTime?: number | bigint;\n\n /**\n * default 1\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly page?: number | bigint;\n\n /**\n * default 100, max 500\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly rows?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getFiatPaymentsHistory operation in FiatApi.\n * @interface GetFiatPaymentsHistoryRequest\n */\nexport interface GetFiatPaymentsHistoryRequest {\n /**\n * 0-buy,1-sell\n * @type {string}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly transactionType: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly beginTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly endTime?: number | bigint;\n\n /**\n * default 1\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly page?: number | bigint;\n\n /**\n * default 100, max 500\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly rows?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getOrderDetail operation in FiatApi.\n * @interface GetOrderDetailRequest\n */\nexport interface GetOrderDetailRequest {\n /**\n * order id retrieved from the api call of withdrawal\n * @type {string}\n * @memberof FiatApiGetOrderDetail\n */\n readonly orderNo: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetOrderDetail\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * FiatApi - object-oriented interface\n * @class FiatApi\n */\nexport class FiatApi implements FiatApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = FiatApiAxiosParamCreator(configuration);\n }\n\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {DepositRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<DepositResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Deposit Binance API Documentation}\n */\n public async deposit(\n requestParameters: DepositRequest\n ): Promise<RestApiResponse<DepositResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.deposit(\n requestParameters?.currency,\n requestParameters?.apiPaymentMethod,\n requestParameters?.amount,\n requestParameters?.recvWindow,\n requestParameters?.ext\n );\n return sendRequest<DepositResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {FiatWithdrawRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<FiatWithdrawResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Withdraw Binance API Documentation}\n */\n public async fiatWithdraw(\n requestParameters: FiatWithdrawRequest\n ): Promise<RestApiResponse<FiatWithdrawResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.fiatWithdraw(\n requestParameters?.currency,\n requestParameters?.apiPaymentMethod,\n requestParameters?.amount,\n requestParameters?.accountInfo,\n requestParameters?.recvWindow,\n requestParameters?.ext\n );\n return sendRequest<FiatWithdrawResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}\n */\n public async getFiatDepositWithdrawHistory(\n requestParameters: GetFiatDepositWithdrawHistoryRequest\n ): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.getFiatDepositWithdrawHistory(\n requestParameters?.transactionType,\n requestParameters?.beginTime,\n requestParameters?.endTime,\n requestParameters?.page,\n requestParameters?.rows,\n requestParameters?.recvWindow\n );\n return sendRequest<GetFiatDepositWithdrawHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}\n */\n public async getFiatPaymentsHistory(\n requestParameters: GetFiatPaymentsHistoryRequest\n ): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatPaymentsHistory(\n requestParameters?.transactionType,\n requestParameters?.beginTime,\n requestParameters?.endTime,\n requestParameters?.page,\n requestParameters?.rows,\n requestParameters?.recvWindow\n );\n return sendRequest<GetFiatPaymentsHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {GetOrderDetailRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetOrderDetailResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail Binance API Documentation}\n */\n public async getOrderDetail(\n requestParameters: GetOrderDetailRequest\n ): Promise<RestApiResponse<GetOrderDetailResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOrderDetail(\n requestParameters?.orderNo,\n requestParameters?.recvWindow\n );\n return sendRequest<GetOrderDetailResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Fiat REST API\n *\n * OpenAPI Specification for the Binance Fiat REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { FiatApi } from './modules/fiat-api';\n\nimport type {\n DepositRequest,\n FiatWithdrawRequest,\n GetFiatDepositWithdrawHistoryRequest,\n GetFiatPaymentsHistoryRequest,\n GetOrderDetailRequest,\n} from './modules/fiat-api';\n\nimport type {\n DepositResponse,\n FiatWithdrawResponse,\n GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\n GetOrderDetailResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private fiatApi: FiatApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.fiatApi = new FiatApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined\n );\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {DepositRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<DepositResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Deposit Binance API Documentation}\n */\n deposit(requestParameters: DepositRequest): Promise<RestApiResponse<DepositResponse>> {\n return this.fiatApi.deposit(requestParameters);\n }\n\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {FiatWithdrawRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<FiatWithdrawResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Withdraw Binance API Documentation}\n */\n fiatWithdraw(\n requestParameters: FiatWithdrawRequest\n ): Promise<RestApiResponse<FiatWithdrawResponse>> {\n return this.fiatApi.fiatWithdraw(requestParameters);\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}\n */\n getFiatDepositWithdrawHistory(\n requestParameters: GetFiatDepositWithdrawHistoryRequest\n ): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>> {\n return this.fiatApi.getFiatDepositWithdrawHistory(requestParameters);\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}\n */\n getFiatPaymentsHistory(\n requestParameters: GetFiatPaymentsHistoryRequest\n ): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>> {\n return this.fiatApi.getFiatPaymentsHistory(requestParameters);\n }\n\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {GetOrderDetailRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetOrderDetailResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail Binance API Documentation}\n */\n getOrderDetail(\n requestParameters: GetOrderDetailRequest\n ): Promise<RestApiResponse<GetOrderDetailResponse>> {\n return this.fiatApi.getOrderDetail(requestParameters);\n }\n}\n","/**\n * Binance Fiat REST API\n *\n * OpenAPI Specification for the Binance Fiat REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, FIAT_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationFiat {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Fiat {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationFiat) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || FIAT_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;WACY;cAEG;;;;;;;;;;;;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AO,KAAK,QAAQ,QAAQ,kBAAkB;;;;;;;;;;;;;;;;;;;;CAqBlD,aACI,mBAC8C;AAC9C,SAAO,KAAK,QAAQ,aAAa,kBAAkB;;;;;;;;;;;;;;;;CAiBvD,8BACI,mBAC+D;AAC/D,SAAO,KAAK,QAAQ,8BAA8B,kBAAkB;;;;;;;;;;;;;;;;;;;;;CAsBxE,uBACI,mBACwD;AACxD,SAAO,KAAK,QAAQ,uBAAuB,kBAAkB;;;;;;;;;;;;;;;;CAiBjE,eACI,mBACgD;AAChD,SAAO,KAAK,QAAQ,eAAe,kBAAkB;;;;;;;;;;;;;AEhM7D,IAAa,OAAb,MAAkB;CAGd,YAAY,QAA2B;EACnC,MAAM,iDAA2B,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAIC,sCACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","FIAT_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/fiat-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/fiat.ts"],"sourcesContent":["{\n \"name\": \"@binance/fiat\",\n \"description\": \"Official Binance Fiat Connector - A lightweight library that provides a convenient interface to Binance's Fiat REST API.\",\n \"version\": \"7.0.0\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Fiat\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.4.0\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Fiat REST API\n *\n * OpenAPI Specification for the Binance Fiat REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n AccountInfo,\n DepositResponse,\n FiatWithdrawResponse,\n GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\n GetOrderDetailResponse,\n} from '../types';\n\n/**\n * FiatApi - axios parameter creator\n */\nconst FiatApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {string} currency\n * @param {string} apiPaymentMethod\n * @param {number | bigint} amount\n * @param {number | bigint} [recvWindow]\n * @param {object} [ext]\n *\n * @throws {RequiredError}\n */\n deposit: async (\n currency: string,\n apiPaymentMethod: string,\n amount: number | bigint,\n recvWindow?: number | bigint,\n ext?: object\n ): Promise<RequestArgs> => {\n // verify required parameter 'currency' is not null or undefined\n assertParamExists('deposit', 'currency', currency);\n // verify required parameter 'apiPaymentMethod' is not null or undefined\n assertParamExists('deposit', 'apiPaymentMethod', apiPaymentMethod);\n // verify required parameter 'amount' is not null or undefined\n assertParamExists('deposit', 'amount', amount);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n if (currency !== undefined && currency !== null) {\n localVarBodyParameter['currency'] = currency;\n }\n\n if (apiPaymentMethod !== undefined && apiPaymentMethod !== null) {\n localVarBodyParameter['apiPaymentMethod'] = apiPaymentMethod;\n }\n\n if (amount !== undefined && amount !== null) {\n localVarBodyParameter['amount'] = amount;\n }\n\n if (ext !== undefined && ext !== null) {\n localVarBodyParameter['ext'] = ext;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/deposit',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {string} currency\n * @param {string} apiPaymentMethod\n * @param {number | bigint} amount\n * @param {AccountInfo} accountInfo\n * @param {number | bigint} [recvWindow]\n * @param {object} [ext]\n *\n * @throws {RequiredError}\n */\n fiatWithdraw: async (\n currency: string,\n apiPaymentMethod: string,\n amount: number | bigint,\n accountInfo: AccountInfo,\n recvWindow?: number | bigint,\n ext?: object\n ): Promise<RequestArgs> => {\n // verify required parameter 'currency' is not null or undefined\n assertParamExists('fiatWithdraw', 'currency', currency);\n // verify required parameter 'apiPaymentMethod' is not null or undefined\n assertParamExists('fiatWithdraw', 'apiPaymentMethod', apiPaymentMethod);\n // verify required parameter 'amount' is not null or undefined\n assertParamExists('fiatWithdraw', 'amount', amount);\n // verify required parameter 'accountInfo' is not null or undefined\n assertParamExists('fiatWithdraw', 'accountInfo', accountInfo);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n if (currency !== undefined && currency !== null) {\n localVarBodyParameter['currency'] = currency;\n }\n\n if (apiPaymentMethod !== undefined && apiPaymentMethod !== null) {\n localVarBodyParameter['apiPaymentMethod'] = apiPaymentMethod;\n }\n\n if (amount !== undefined && amount !== null) {\n localVarBodyParameter['amount'] = amount;\n }\n\n if (accountInfo !== undefined && accountInfo !== null) {\n localVarBodyParameter['accountInfo'] = accountInfo;\n }\n\n if (ext !== undefined && ext !== null) {\n localVarBodyParameter['ext'] = ext;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v2/fiat/withdraw',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {string} transactionType 0-buy,1-sell\n * @param {number | bigint} [beginTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [page] default 1\n * @param {number | bigint} [rows] default 100, max 500\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatDepositWithdrawHistory: async (\n transactionType: string,\n beginTime?: number | bigint,\n endTime?: number | bigint,\n page?: number | bigint,\n rows?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'transactionType' is not null or undefined\n assertParamExists('getFiatDepositWithdrawHistory', 'transactionType', transactionType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/orders',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {string} transactionType 0-buy,1-sell\n * @param {number | bigint} [beginTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [page] default 1\n * @param {number | bigint} [rows] default 100, max 500\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatPaymentsHistory: async (\n transactionType: string,\n beginTime?: number | bigint,\n endTime?: number | bigint,\n page?: number | bigint,\n rows?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'transactionType' is not null or undefined\n assertParamExists('getFiatPaymentsHistory', 'transactionType', transactionType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/payments',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {string} orderNo order id retrieved from the api call of withdrawal\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getOrderDetail: async (\n orderNo: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'orderNo' is not null or undefined\n assertParamExists('getOrderDetail', 'orderNo', orderNo);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (orderNo !== undefined && orderNo !== null) {\n localVarQueryParameter['orderNo'] = orderNo;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/get-order-detail',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * FiatApi - interface\n * @interface FiatApi\n */\nexport interface FiatApiInterface {\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {DepositRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n deposit(requestParameters: DepositRequest): Promise<RestApiResponse<DepositResponse>>;\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {FiatWithdrawRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n fiatWithdraw(\n requestParameters: FiatWithdrawRequest\n ): Promise<RestApiResponse<FiatWithdrawResponse>>;\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n getFiatDepositWithdrawHistory(\n requestParameters: GetFiatDepositWithdrawHistoryRequest\n ): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>;\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n getFiatPaymentsHistory(\n requestParameters: GetFiatPaymentsHistoryRequest\n ): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>;\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {GetOrderDetailRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n getOrderDetail(\n requestParameters: GetOrderDetailRequest\n ): Promise<RestApiResponse<GetOrderDetailResponse>>;\n}\n\n/**\n * Request parameters for deposit operation in FiatApi.\n * @interface DepositRequest\n */\nexport interface DepositRequest {\n /**\n *\n * @type {string}\n * @memberof FiatApiDeposit\n */\n readonly currency: string;\n\n /**\n *\n * @type {string}\n * @memberof FiatApiDeposit\n */\n readonly apiPaymentMethod: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiDeposit\n */\n readonly amount: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiDeposit\n */\n readonly recvWindow?: number | bigint;\n\n /**\n *\n * @type {object}\n * @memberof FiatApiDeposit\n */\n readonly ext?: object;\n}\n\n/**\n * Request parameters for fiatWithdraw operation in FiatApi.\n * @interface FiatWithdrawRequest\n */\nexport interface FiatWithdrawRequest {\n /**\n *\n * @type {string}\n * @memberof FiatApiFiatWithdraw\n */\n readonly currency: string;\n\n /**\n *\n * @type {string}\n * @memberof FiatApiFiatWithdraw\n */\n readonly apiPaymentMethod: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiFiatWithdraw\n */\n readonly amount: number | bigint;\n\n /**\n *\n * @type {AccountInfo}\n * @memberof FiatApiFiatWithdraw\n */\n readonly accountInfo: AccountInfo;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiFiatWithdraw\n */\n readonly recvWindow?: number | bigint;\n\n /**\n *\n * @type {object}\n * @memberof FiatApiFiatWithdraw\n */\n readonly ext?: object;\n}\n\n/**\n * Request parameters for getFiatDepositWithdrawHistory operation in FiatApi.\n * @interface GetFiatDepositWithdrawHistoryRequest\n */\nexport interface GetFiatDepositWithdrawHistoryRequest {\n /**\n * 0-buy,1-sell\n * @type {string}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly transactionType: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly beginTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly endTime?: number | bigint;\n\n /**\n * default 1\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly page?: number | bigint;\n\n /**\n * default 100, max 500\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly rows?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getFiatPaymentsHistory operation in FiatApi.\n * @interface GetFiatPaymentsHistoryRequest\n */\nexport interface GetFiatPaymentsHistoryRequest {\n /**\n * 0-buy,1-sell\n * @type {string}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly transactionType: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly beginTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly endTime?: number | bigint;\n\n /**\n * default 1\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly page?: number | bigint;\n\n /**\n * default 100, max 500\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly rows?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getOrderDetail operation in FiatApi.\n * @interface GetOrderDetailRequest\n */\nexport interface GetOrderDetailRequest {\n /**\n * order id retrieved from the api call of withdrawal\n * @type {string}\n * @memberof FiatApiGetOrderDetail\n */\n readonly orderNo: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetOrderDetail\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * FiatApi - object-oriented interface\n * @class FiatApi\n */\nexport class FiatApi implements FiatApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = FiatApiAxiosParamCreator(configuration);\n }\n\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {DepositRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<DepositResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Deposit Binance API Documentation}\n */\n public async deposit(\n requestParameters: DepositRequest\n ): Promise<RestApiResponse<DepositResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.deposit(\n requestParameters?.currency,\n requestParameters?.apiPaymentMethod,\n requestParameters?.amount,\n requestParameters?.recvWindow,\n requestParameters?.ext\n );\n return sendRequest<DepositResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {FiatWithdrawRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<FiatWithdrawResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Withdraw Binance API Documentation}\n */\n public async fiatWithdraw(\n requestParameters: FiatWithdrawRequest\n ): Promise<RestApiResponse<FiatWithdrawResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.fiatWithdraw(\n requestParameters?.currency,\n requestParameters?.apiPaymentMethod,\n requestParameters?.amount,\n requestParameters?.accountInfo,\n requestParameters?.recvWindow,\n requestParameters?.ext\n );\n return sendRequest<FiatWithdrawResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}\n */\n public async getFiatDepositWithdrawHistory(\n requestParameters: GetFiatDepositWithdrawHistoryRequest\n ): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.getFiatDepositWithdrawHistory(\n requestParameters?.transactionType,\n requestParameters?.beginTime,\n requestParameters?.endTime,\n requestParameters?.page,\n requestParameters?.rows,\n requestParameters?.recvWindow\n );\n return sendRequest<GetFiatDepositWithdrawHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}\n */\n public async getFiatPaymentsHistory(\n requestParameters: GetFiatPaymentsHistoryRequest\n ): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatPaymentsHistory(\n requestParameters?.transactionType,\n requestParameters?.beginTime,\n requestParameters?.endTime,\n requestParameters?.page,\n requestParameters?.rows,\n requestParameters?.recvWindow\n );\n return sendRequest<GetFiatPaymentsHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {GetOrderDetailRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetOrderDetailResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail Binance API Documentation}\n */\n public async getOrderDetail(\n requestParameters: GetOrderDetailRequest\n ): Promise<RestApiResponse<GetOrderDetailResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOrderDetail(\n requestParameters?.orderNo,\n requestParameters?.recvWindow\n );\n return sendRequest<GetOrderDetailResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Fiat REST API\n *\n * OpenAPI Specification for the Binance Fiat REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { FiatApi } from './modules/fiat-api';\n\nimport type {\n DepositRequest,\n FiatWithdrawRequest,\n GetFiatDepositWithdrawHistoryRequest,\n GetFiatPaymentsHistoryRequest,\n GetOrderDetailRequest,\n} from './modules/fiat-api';\n\nimport type {\n DepositResponse,\n FiatWithdrawResponse,\n GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\n GetOrderDetailResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private fiatApi: FiatApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.fiatApi = new FiatApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined\n );\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {DepositRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<DepositResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Deposit Binance API Documentation}\n */\n deposit(requestParameters: DepositRequest): Promise<RestApiResponse<DepositResponse>> {\n return this.fiatApi.deposit(requestParameters);\n }\n\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {FiatWithdrawRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<FiatWithdrawResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Withdraw Binance API Documentation}\n */\n fiatWithdraw(\n requestParameters: FiatWithdrawRequest\n ): Promise<RestApiResponse<FiatWithdrawResponse>> {\n return this.fiatApi.fiatWithdraw(requestParameters);\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}\n */\n getFiatDepositWithdrawHistory(\n requestParameters: GetFiatDepositWithdrawHistoryRequest\n ): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>> {\n return this.fiatApi.getFiatDepositWithdrawHistory(requestParameters);\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}\n */\n getFiatPaymentsHistory(\n requestParameters: GetFiatPaymentsHistoryRequest\n ): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>> {\n return this.fiatApi.getFiatPaymentsHistory(requestParameters);\n }\n\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {GetOrderDetailRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetOrderDetailResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail Binance API Documentation}\n */\n getOrderDetail(\n requestParameters: GetOrderDetailRequest\n ): Promise<RestApiResponse<GetOrderDetailResponse>> {\n return this.fiatApi.getOrderDetail(requestParameters);\n }\n}\n","/**\n * Binance Fiat REST API\n *\n * OpenAPI Specification for the Binance Fiat REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, FIAT_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationFiat {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Fiat {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationFiat) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || FIAT_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;AC8Bf,MAAM,2BAA2B,SAAU,eAAqC;AAC5E,QAAO;EAuBH,SAAS,OACL,UACA,kBACA,QACA,YACA,QACuB;AAEvB,2CAAkB,WAAW,YAAY,SAAS;AAElD,2CAAkB,WAAW,oBAAoB,iBAAiB;AAElE,2CAAkB,WAAW,UAAU,OAAO;GAE9C,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;AAG3C,OAAI,aAAa,UAAa,aAAa,KACvC,uBAAsB,cAAc;AAGxC,OAAI,qBAAqB,UAAa,qBAAqB,KACvD,uBAAsB,sBAAsB;AAGhD,OAAI,WAAW,UAAa,WAAW,KACnC,uBAAsB,YAAY;AAGtC,OAAI,QAAQ,UAAa,QAAQ,KAC7B,uBAAsB,SAAS;GAGnC,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,cAAc;IACd,UAAU;IACb;;EAuBL,cAAc,OACV,UACA,kBACA,QACA,aACA,YACA,QACuB;AAEvB,2CAAkB,gBAAgB,YAAY,SAAS;AAEvD,2CAAkB,gBAAgB,oBAAoB,iBAAiB;AAEvE,2CAAkB,gBAAgB,UAAU,O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BAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
|
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, FIAT_REST_
|
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
5
|
var name = "@binance/fiat";
|
|
6
|
-
var version = "
|
|
6
|
+
var version = "7.0.0";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/rest-api/modules/fiat-api.ts
|
|
@@ -30,6 +30,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
30
30
|
assertParamExists("deposit", "amount", amount);
|
|
31
31
|
const localVarQueryParameter = {};
|
|
32
32
|
const localVarBodyParameter = {};
|
|
33
|
+
const localVarHeaderParameter = {};
|
|
33
34
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
34
35
|
if (currency !== void 0 && currency !== null) localVarBodyParameter["currency"] = currency;
|
|
35
36
|
if (apiPaymentMethod !== void 0 && apiPaymentMethod !== null) localVarBodyParameter["apiPaymentMethod"] = apiPaymentMethod;
|
|
@@ -42,6 +43,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
42
43
|
method: "POST",
|
|
43
44
|
queryParams: localVarQueryParameter,
|
|
44
45
|
bodyParams: localVarBodyParameter,
|
|
46
|
+
headerParams: localVarHeaderParameter,
|
|
45
47
|
timeUnit: _timeUnit
|
|
46
48
|
};
|
|
47
49
|
},
|
|
@@ -52,6 +54,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
52
54
|
assertParamExists("fiatWithdraw", "accountInfo", accountInfo);
|
|
53
55
|
const localVarQueryParameter = {};
|
|
54
56
|
const localVarBodyParameter = {};
|
|
57
|
+
const localVarHeaderParameter = {};
|
|
55
58
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
56
59
|
if (currency !== void 0 && currency !== null) localVarBodyParameter["currency"] = currency;
|
|
57
60
|
if (apiPaymentMethod !== void 0 && apiPaymentMethod !== null) localVarBodyParameter["apiPaymentMethod"] = apiPaymentMethod;
|
|
@@ -65,6 +68,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
65
68
|
method: "POST",
|
|
66
69
|
queryParams: localVarQueryParameter,
|
|
67
70
|
bodyParams: localVarBodyParameter,
|
|
71
|
+
headerParams: localVarHeaderParameter,
|
|
68
72
|
timeUnit: _timeUnit
|
|
69
73
|
};
|
|
70
74
|
},
|
|
@@ -72,6 +76,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
72
76
|
assertParamExists("getFiatDepositWithdrawHistory", "transactionType", transactionType);
|
|
73
77
|
const localVarQueryParameter = {};
|
|
74
78
|
const localVarBodyParameter = {};
|
|
79
|
+
const localVarHeaderParameter = {};
|
|
75
80
|
if (transactionType !== void 0 && transactionType !== null) localVarQueryParameter["transactionType"] = transactionType;
|
|
76
81
|
if (beginTime !== void 0 && beginTime !== null) localVarQueryParameter["beginTime"] = beginTime;
|
|
77
82
|
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
@@ -85,6 +90,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
85
90
|
method: "GET",
|
|
86
91
|
queryParams: localVarQueryParameter,
|
|
87
92
|
bodyParams: localVarBodyParameter,
|
|
93
|
+
headerParams: localVarHeaderParameter,
|
|
88
94
|
timeUnit: _timeUnit
|
|
89
95
|
};
|
|
90
96
|
},
|
|
@@ -92,6 +98,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
92
98
|
assertParamExists("getFiatPaymentsHistory", "transactionType", transactionType);
|
|
93
99
|
const localVarQueryParameter = {};
|
|
94
100
|
const localVarBodyParameter = {};
|
|
101
|
+
const localVarHeaderParameter = {};
|
|
95
102
|
if (transactionType !== void 0 && transactionType !== null) localVarQueryParameter["transactionType"] = transactionType;
|
|
96
103
|
if (beginTime !== void 0 && beginTime !== null) localVarQueryParameter["beginTime"] = beginTime;
|
|
97
104
|
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
@@ -105,6 +112,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
105
112
|
method: "GET",
|
|
106
113
|
queryParams: localVarQueryParameter,
|
|
107
114
|
bodyParams: localVarBodyParameter,
|
|
115
|
+
headerParams: localVarHeaderParameter,
|
|
108
116
|
timeUnit: _timeUnit
|
|
109
117
|
};
|
|
110
118
|
},
|
|
@@ -112,6 +120,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
112
120
|
assertParamExists("getOrderDetail", "orderNo", orderNo);
|
|
113
121
|
const localVarQueryParameter = {};
|
|
114
122
|
const localVarBodyParameter = {};
|
|
123
|
+
const localVarHeaderParameter = {};
|
|
115
124
|
if (orderNo !== void 0 && orderNo !== null) localVarQueryParameter["orderNo"] = orderNo;
|
|
116
125
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
117
126
|
let _timeUnit;
|
|
@@ -121,6 +130,7 @@ const FiatApiAxiosParamCreator = function(configuration) {
|
|
|
121
130
|
method: "GET",
|
|
122
131
|
queryParams: localVarQueryParameter,
|
|
123
132
|
bodyParams: localVarBodyParameter,
|
|
133
|
+
headerParams: localVarHeaderParameter,
|
|
124
134
|
timeUnit: _timeUnit
|
|
125
135
|
};
|
|
126
136
|
}
|
|
@@ -144,6 +154,8 @@ var FiatApi = class {
|
|
|
144
154
|
*
|
|
145
155
|
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
146
156
|
*
|
|
157
|
+
* `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
|
|
158
|
+
*
|
|
147
159
|
* Weight: 45000
|
|
148
160
|
*
|
|
149
161
|
* @summary Deposit(TRADE)
|
|
@@ -155,7 +167,7 @@ var FiatApi = class {
|
|
|
155
167
|
*/
|
|
156
168
|
async deposit(requestParameters) {
|
|
157
169
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.deposit(requestParameters?.currency, requestParameters?.apiPaymentMethod, requestParameters?.amount, requestParameters?.recvWindow, requestParameters?.ext);
|
|
158
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
170
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
159
171
|
}
|
|
160
172
|
/**
|
|
161
173
|
* Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.
|
|
@@ -177,7 +189,7 @@ var FiatApi = class {
|
|
|
177
189
|
*/
|
|
178
190
|
async fiatWithdraw(requestParameters) {
|
|
179
191
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.fiatWithdraw(requestParameters?.currency, requestParameters?.apiPaymentMethod, requestParameters?.amount, requestParameters?.accountInfo, requestParameters?.recvWindow, requestParameters?.ext);
|
|
180
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
192
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
181
193
|
}
|
|
182
194
|
/**
|
|
183
195
|
* Get Fiat Deposit/Withdraw History
|
|
@@ -195,7 +207,7 @@ var FiatApi = class {
|
|
|
195
207
|
*/
|
|
196
208
|
async getFiatDepositWithdrawHistory(requestParameters) {
|
|
197
209
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatDepositWithdrawHistory(requestParameters?.transactionType, requestParameters?.beginTime, requestParameters?.endTime, requestParameters?.page, requestParameters?.rows, requestParameters?.recvWindow);
|
|
198
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
210
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
199
211
|
}
|
|
200
212
|
/**
|
|
201
213
|
* Get Fiat Deposit/Withdraw History
|
|
@@ -218,7 +230,7 @@ var FiatApi = class {
|
|
|
218
230
|
*/
|
|
219
231
|
async getFiatPaymentsHistory(requestParameters) {
|
|
220
232
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatPaymentsHistory(requestParameters?.transactionType, requestParameters?.beginTime, requestParameters?.endTime, requestParameters?.page, requestParameters?.rows, requestParameters?.recvWindow);
|
|
221
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
233
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
222
234
|
}
|
|
223
235
|
/**
|
|
224
236
|
* Get Order Detail
|
|
@@ -236,7 +248,7 @@ var FiatApi = class {
|
|
|
236
248
|
*/
|
|
237
249
|
async getOrderDetail(requestParameters) {
|
|
238
250
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOrderDetail(requestParameters?.orderNo, requestParameters?.recvWindow);
|
|
239
|
-
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
251
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
240
252
|
}
|
|
241
253
|
};
|
|
242
254
|
|
|
@@ -269,7 +281,7 @@ var RestAPI = class {
|
|
|
269
281
|
* @returns A promise resolving to the response data object.
|
|
270
282
|
*/
|
|
271
283
|
sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
|
|
272
|
-
return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
|
|
284
|
+
return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0);
|
|
273
285
|
}
|
|
274
286
|
/**
|
|
275
287
|
* Generic function to send a signed request.
|
|
@@ -281,7 +293,7 @@ var RestAPI = class {
|
|
|
281
293
|
* @returns A promise resolving to the response data object.
|
|
282
294
|
*/
|
|
283
295
|
sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
|
|
284
|
-
return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
|
|
296
|
+
return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0, { isSigned: true });
|
|
285
297
|
}
|
|
286
298
|
/**
|
|
287
299
|
* Submit deposit request, in this version, we only support BRL deposit via pix.
|
|
@@ -292,6 +304,8 @@ var RestAPI = class {
|
|
|
292
304
|
*
|
|
293
305
|
* Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.
|
|
294
306
|
*
|
|
307
|
+
* `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.
|
|
308
|
+
*
|
|
295
309
|
* Weight: 45000
|
|
296
310
|
*
|
|
297
311
|
* @summary Deposit(TRADE)
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","FIAT_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/fiat-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/fiat.ts"],"sourcesContent":["{\n \"name\": \"@binance/fiat\",\n \"description\": \"Official Binance Fiat Connector - A lightweight library that provides a convenient interface to Binance's Fiat REST API.\",\n \"version\": \"6.0.15\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Fiat\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.3.14\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Fiat REST API\n *\n * OpenAPI Specification for the Binance Fiat REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n AccountInfo,\n DepositResponse,\n FiatWithdrawResponse,\n GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\n GetOrderDetailResponse,\n} from '../types';\n\n/**\n * FiatApi - axios parameter creator\n */\nconst FiatApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {string} currency\n * @param {string} apiPaymentMethod\n * @param {number | bigint} amount\n * @param {number | bigint} [recvWindow]\n * @param {object} [ext]\n *\n * @throws {RequiredError}\n */\n deposit: async (\n currency: string,\n apiPaymentMethod: string,\n amount: number | bigint,\n recvWindow?: number | bigint,\n ext?: object\n ): Promise<RequestArgs> => {\n // verify required parameter 'currency' is not null or undefined\n assertParamExists('deposit', 'currency', currency);\n // verify required parameter 'apiPaymentMethod' is not null or undefined\n assertParamExists('deposit', 'apiPaymentMethod', apiPaymentMethod);\n // verify required parameter 'amount' is not null or undefined\n assertParamExists('deposit', 'amount', amount);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n if (currency !== undefined && currency !== null) {\n localVarBodyParameter['currency'] = currency;\n }\n\n if (apiPaymentMethod !== undefined && apiPaymentMethod !== null) {\n localVarBodyParameter['apiPaymentMethod'] = apiPaymentMethod;\n }\n\n if (amount !== undefined && amount !== null) {\n localVarBodyParameter['amount'] = amount;\n }\n\n if (ext !== undefined && ext !== null) {\n localVarBodyParameter['ext'] = ext;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/deposit',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {string} currency\n * @param {string} apiPaymentMethod\n * @param {number | bigint} amount\n * @param {AccountInfo} accountInfo\n * @param {number | bigint} [recvWindow]\n * @param {object} [ext]\n *\n * @throws {RequiredError}\n */\n fiatWithdraw: async (\n currency: string,\n apiPaymentMethod: string,\n amount: number | bigint,\n accountInfo: AccountInfo,\n recvWindow?: number | bigint,\n ext?: object\n ): Promise<RequestArgs> => {\n // verify required parameter 'currency' is not null or undefined\n assertParamExists('fiatWithdraw', 'currency', currency);\n // verify required parameter 'apiPaymentMethod' is not null or undefined\n assertParamExists('fiatWithdraw', 'apiPaymentMethod', apiPaymentMethod);\n // verify required parameter 'amount' is not null or undefined\n assertParamExists('fiatWithdraw', 'amount', amount);\n // verify required parameter 'accountInfo' is not null or undefined\n assertParamExists('fiatWithdraw', 'accountInfo', accountInfo);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n if (currency !== undefined && currency !== null) {\n localVarBodyParameter['currency'] = currency;\n }\n\n if (apiPaymentMethod !== undefined && apiPaymentMethod !== null) {\n localVarBodyParameter['apiPaymentMethod'] = apiPaymentMethod;\n }\n\n if (amount !== undefined && amount !== null) {\n localVarBodyParameter['amount'] = amount;\n }\n\n if (accountInfo !== undefined && accountInfo !== null) {\n localVarBodyParameter['accountInfo'] = accountInfo;\n }\n\n if (ext !== undefined && ext !== null) {\n localVarBodyParameter['ext'] = ext;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v2/fiat/withdraw',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {string} transactionType 0-buy,1-sell\n * @param {number | bigint} [beginTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [page] default 1\n * @param {number | bigint} [rows] default 100, max 500\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatDepositWithdrawHistory: async (\n transactionType: string,\n beginTime?: number | bigint,\n endTime?: number | bigint,\n page?: number | bigint,\n rows?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'transactionType' is not null or undefined\n assertParamExists('getFiatDepositWithdrawHistory', 'transactionType', transactionType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/orders',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {string} transactionType 0-buy,1-sell\n * @param {number | bigint} [beginTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [page] default 1\n * @param {number | bigint} [rows] default 100, max 500\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatPaymentsHistory: async (\n transactionType: string,\n beginTime?: number | bigint,\n endTime?: number | bigint,\n page?: number | bigint,\n rows?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'transactionType' is not null or undefined\n assertParamExists('getFiatPaymentsHistory', 'transactionType', transactionType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/payments',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {string} orderNo order id retrieved from the api call of withdrawal\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getOrderDetail: async (\n orderNo: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'orderNo' is not null or undefined\n assertParamExists('getOrderDetail', 'orderNo', orderNo);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (orderNo !== undefined && orderNo !== null) {\n localVarQueryParameter['orderNo'] = orderNo;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/get-order-detail',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * FiatApi - interface\n * @interface FiatApi\n */\nexport interface FiatApiInterface {\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {DepositRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n deposit(requestParameters: DepositRequest): Promise<RestApiResponse<DepositResponse>>;\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {FiatWithdrawRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n fiatWithdraw(\n requestParameters: FiatWithdrawRequest\n ): Promise<RestApiResponse<FiatWithdrawResponse>>;\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n getFiatDepositWithdrawHistory(\n requestParameters: GetFiatDepositWithdrawHistoryRequest\n ): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>;\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n getFiatPaymentsHistory(\n requestParameters: GetFiatPaymentsHistoryRequest\n ): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>;\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {GetOrderDetailRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n getOrderDetail(\n requestParameters: GetOrderDetailRequest\n ): Promise<RestApiResponse<GetOrderDetailResponse>>;\n}\n\n/**\n * Request parameters for deposit operation in FiatApi.\n * @interface DepositRequest\n */\nexport interface DepositRequest {\n /**\n *\n * @type {string}\n * @memberof FiatApiDeposit\n */\n readonly currency: string;\n\n /**\n *\n * @type {string}\n * @memberof FiatApiDeposit\n */\n readonly apiPaymentMethod: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiDeposit\n */\n readonly amount: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiDeposit\n */\n readonly recvWindow?: number | bigint;\n\n /**\n *\n * @type {object}\n * @memberof FiatApiDeposit\n */\n readonly ext?: object;\n}\n\n/**\n * Request parameters for fiatWithdraw operation in FiatApi.\n * @interface FiatWithdrawRequest\n */\nexport interface FiatWithdrawRequest {\n /**\n *\n * @type {string}\n * @memberof FiatApiFiatWithdraw\n */\n readonly currency: string;\n\n /**\n *\n * @type {string}\n * @memberof FiatApiFiatWithdraw\n */\n readonly apiPaymentMethod: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiFiatWithdraw\n */\n readonly amount: number | bigint;\n\n /**\n *\n * @type {AccountInfo}\n * @memberof FiatApiFiatWithdraw\n */\n readonly accountInfo: AccountInfo;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiFiatWithdraw\n */\n readonly recvWindow?: number | bigint;\n\n /**\n *\n * @type {object}\n * @memberof FiatApiFiatWithdraw\n */\n readonly ext?: object;\n}\n\n/**\n * Request parameters for getFiatDepositWithdrawHistory operation in FiatApi.\n * @interface GetFiatDepositWithdrawHistoryRequest\n */\nexport interface GetFiatDepositWithdrawHistoryRequest {\n /**\n * 0-buy,1-sell\n * @type {string}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly transactionType: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly beginTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly endTime?: number | bigint;\n\n /**\n * default 1\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly page?: number | bigint;\n\n /**\n * default 100, max 500\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly rows?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getFiatPaymentsHistory operation in FiatApi.\n * @interface GetFiatPaymentsHistoryRequest\n */\nexport interface GetFiatPaymentsHistoryRequest {\n /**\n * 0-buy,1-sell\n * @type {string}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly transactionType: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly beginTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly endTime?: number | bigint;\n\n /**\n * default 1\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly page?: number | bigint;\n\n /**\n * default 100, max 500\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly rows?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getOrderDetail operation in FiatApi.\n * @interface GetOrderDetailRequest\n */\nexport interface GetOrderDetailRequest {\n /**\n * order id retrieved from the api call of withdrawal\n * @type {string}\n * @memberof FiatApiGetOrderDetail\n */\n readonly orderNo: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetOrderDetail\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * FiatApi - object-oriented interface\n * @class FiatApi\n */\nexport class FiatApi implements FiatApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = FiatApiAxiosParamCreator(configuration);\n }\n\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {DepositRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<DepositResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Deposit Binance API Documentation}\n */\n public async deposit(\n requestParameters: DepositRequest\n ): Promise<RestApiResponse<DepositResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.deposit(\n requestParameters?.currency,\n requestParameters?.apiPaymentMethod,\n requestParameters?.amount,\n requestParameters?.recvWindow,\n requestParameters?.ext\n );\n return sendRequest<DepositResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {FiatWithdrawRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<FiatWithdrawResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Withdraw Binance API Documentation}\n */\n public async fiatWithdraw(\n requestParameters: FiatWithdrawRequest\n ): Promise<RestApiResponse<FiatWithdrawResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.fiatWithdraw(\n requestParameters?.currency,\n requestParameters?.apiPaymentMethod,\n requestParameters?.amount,\n requestParameters?.accountInfo,\n requestParameters?.recvWindow,\n requestParameters?.ext\n );\n return sendRequest<FiatWithdrawResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}\n */\n public async getFiatDepositWithdrawHistory(\n requestParameters: GetFiatDepositWithdrawHistoryRequest\n ): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.getFiatDepositWithdrawHistory(\n requestParameters?.transactionType,\n requestParameters?.beginTime,\n requestParameters?.endTime,\n requestParameters?.page,\n requestParameters?.rows,\n requestParameters?.recvWindow\n );\n return sendRequest<GetFiatDepositWithdrawHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}\n */\n public async getFiatPaymentsHistory(\n requestParameters: GetFiatPaymentsHistoryRequest\n ): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatPaymentsHistory(\n requestParameters?.transactionType,\n requestParameters?.beginTime,\n requestParameters?.endTime,\n requestParameters?.page,\n requestParameters?.rows,\n requestParameters?.recvWindow\n );\n return sendRequest<GetFiatPaymentsHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {GetOrderDetailRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetOrderDetailResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail Binance API Documentation}\n */\n public async getOrderDetail(\n requestParameters: GetOrderDetailRequest\n ): Promise<RestApiResponse<GetOrderDetailResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOrderDetail(\n requestParameters?.orderNo,\n requestParameters?.recvWindow\n );\n return sendRequest<GetOrderDetailResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Fiat REST API\n *\n * OpenAPI Specification for the Binance Fiat REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { FiatApi } from './modules/fiat-api';\n\nimport type {\n DepositRequest,\n FiatWithdrawRequest,\n GetFiatDepositWithdrawHistoryRequest,\n GetFiatPaymentsHistoryRequest,\n GetOrderDetailRequest,\n} from './modules/fiat-api';\n\nimport type {\n DepositResponse,\n FiatWithdrawResponse,\n GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\n GetOrderDetailResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private fiatApi: FiatApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.fiatApi = new FiatApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined\n );\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {DepositRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<DepositResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Deposit Binance API Documentation}\n */\n deposit(requestParameters: DepositRequest): Promise<RestApiResponse<DepositResponse>> {\n return this.fiatApi.deposit(requestParameters);\n }\n\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {FiatWithdrawRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<FiatWithdrawResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Withdraw Binance API Documentation}\n */\n fiatWithdraw(\n requestParameters: FiatWithdrawRequest\n ): Promise<RestApiResponse<FiatWithdrawResponse>> {\n return this.fiatApi.fiatWithdraw(requestParameters);\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}\n */\n getFiatDepositWithdrawHistory(\n requestParameters: GetFiatDepositWithdrawHistoryRequest\n ): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>> {\n return this.fiatApi.getFiatDepositWithdrawHistory(requestParameters);\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}\n */\n getFiatPaymentsHistory(\n requestParameters: GetFiatPaymentsHistoryRequest\n ): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>> {\n return this.fiatApi.getFiatPaymentsHistory(requestParameters);\n }\n\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {GetOrderDetailRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetOrderDetailResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail Binance API Documentation}\n */\n getOrderDetail(\n requestParameters: GetOrderDetailRequest\n ): Promise<RestApiResponse<GetOrderDetailResponse>> {\n return this.fiatApi.getOrderDetail(requestParameters);\n }\n}\n","/**\n * Binance Fiat REST API\n *\n * OpenAPI Specification for the Binance Fiat REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, FIAT_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationFiat {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Fiat {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationFiat) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || FIAT_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;AC8Bf,MAAM,2BAA2B,SAAU,eAAqC;AAC5E,QAAO;EAqBH,SAAS,OACL,UACA,kBACA,QACA,YACA,QACuB;AAEvB,qBAAkB,WAAW,YAAY,SAAS;AAElD,qBAAkB,WAAW,oBAAoB,iBAAiB;AAElE,qBAAkB,WAAW,UAAU,OAAO;GAE9C,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;AAEzD,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;AAG3C,OAAI,aAAa,UAAa,aAAa,KACvC,uBAAsB,cAAc;AAGxC,OAAI,qBAAqB,UAAa,qBAAqB,KACvD,uBAAsB,sBAAsB;AAGhD,OAAI,WAAW,UAAa,WAAW,KACnC,uBAAsB,YAAY;AAGtC,OAAI,QAAQ,UAAa,QAAQ,KAC7B,uBAAsB,SAAS;GAGnC,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,UAAU;IACb;;EAuBL,cAAc,OACV,UACA,kBACA,QACA,aACA,YACA,QACuB;AAEvB,qBAAkB,gBAAgB,YAAY,SAAS;AAEvD,qBAAkB,gBAAgB,oBAAoB,iBAAiB;AAEvE,qBAAkB,gBAAgB,UAAU,OAAO;AAEnD,qBAAkB,gBAAgB,eAAe,YAAY;GAE7D,MAAMF,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;AAEzD,OAAI,eAAe,UAAa,e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;;;;;CAY7C,YACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,SAAO,YACH,KAAK,eACL,UACA,QACA,aACA,YACA,OACH;;;;;;;;;;;CAYL,kBACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,SAAO,YACH,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;;;CAqBL,QAAQ,mBAA8E;AAClF,SAAO,KAAK,QAAQ,QAAQ,kBAAkB;;;;;;;;;;;;;;;;;;;;CAqBlD,aACI,mBAC8C;AAC9C,SAAO,KAAK,QAAQ,aAAa,kBAAkB;;;;;;;;;;;;;;;;CAiBvD,8BACI,mBAC+D;AAC/D,SAAO,KAAK,QAAQ,8BAA8B,kBAAkB;;;;;;;;;;;;;;;;;;;;;CAsBxE,uBACI,mBACwD;AACxD,SAAO,KAAK,QAAQ,uBAAuB,kBAAkB;;;;;;;;;;;;;;;;CAiBjE,eACI,mBACgD;AAChD,SAAO,KAAK,QAAQ,eAAe,kBAAkB;;;;;;;;;;;;;AEhM7D,IAAa,OAAb,MAAkB;CAGd,YAAY,QAA2B;EACnC,MAAM,YAAY,eAAe,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAI,qBACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","FIAT_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/fiat-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/fiat.ts"],"sourcesContent":["{\n \"name\": \"@binance/fiat\",\n \"description\": \"Official Binance Fiat Connector - A lightweight library that provides a convenient interface to Binance's Fiat REST API.\",\n \"version\": \"7.0.0\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Fiat\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.4.0\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Fiat REST API\n *\n * OpenAPI Specification for the Binance Fiat REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n AccountInfo,\n DepositResponse,\n FiatWithdrawResponse,\n GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\n GetOrderDetailResponse,\n} from '../types';\n\n/**\n * FiatApi - axios parameter creator\n */\nconst FiatApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {string} currency\n * @param {string} apiPaymentMethod\n * @param {number | bigint} amount\n * @param {number | bigint} [recvWindow]\n * @param {object} [ext]\n *\n * @throws {RequiredError}\n */\n deposit: async (\n currency: string,\n apiPaymentMethod: string,\n amount: number | bigint,\n recvWindow?: number | bigint,\n ext?: object\n ): Promise<RequestArgs> => {\n // verify required parameter 'currency' is not null or undefined\n assertParamExists('deposit', 'currency', currency);\n // verify required parameter 'apiPaymentMethod' is not null or undefined\n assertParamExists('deposit', 'apiPaymentMethod', apiPaymentMethod);\n // verify required parameter 'amount' is not null or undefined\n assertParamExists('deposit', 'amount', amount);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n if (currency !== undefined && currency !== null) {\n localVarBodyParameter['currency'] = currency;\n }\n\n if (apiPaymentMethod !== undefined && apiPaymentMethod !== null) {\n localVarBodyParameter['apiPaymentMethod'] = apiPaymentMethod;\n }\n\n if (amount !== undefined && amount !== null) {\n localVarBodyParameter['amount'] = amount;\n }\n\n if (ext !== undefined && ext !== null) {\n localVarBodyParameter['ext'] = ext;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/deposit',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {string} currency\n * @param {string} apiPaymentMethod\n * @param {number | bigint} amount\n * @param {AccountInfo} accountInfo\n * @param {number | bigint} [recvWindow]\n * @param {object} [ext]\n *\n * @throws {RequiredError}\n */\n fiatWithdraw: async (\n currency: string,\n apiPaymentMethod: string,\n amount: number | bigint,\n accountInfo: AccountInfo,\n recvWindow?: number | bigint,\n ext?: object\n ): Promise<RequestArgs> => {\n // verify required parameter 'currency' is not null or undefined\n assertParamExists('fiatWithdraw', 'currency', currency);\n // verify required parameter 'apiPaymentMethod' is not null or undefined\n assertParamExists('fiatWithdraw', 'apiPaymentMethod', apiPaymentMethod);\n // verify required parameter 'amount' is not null or undefined\n assertParamExists('fiatWithdraw', 'amount', amount);\n // verify required parameter 'accountInfo' is not null or undefined\n assertParamExists('fiatWithdraw', 'accountInfo', accountInfo);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n if (currency !== undefined && currency !== null) {\n localVarBodyParameter['currency'] = currency;\n }\n\n if (apiPaymentMethod !== undefined && apiPaymentMethod !== null) {\n localVarBodyParameter['apiPaymentMethod'] = apiPaymentMethod;\n }\n\n if (amount !== undefined && amount !== null) {\n localVarBodyParameter['amount'] = amount;\n }\n\n if (accountInfo !== undefined && accountInfo !== null) {\n localVarBodyParameter['accountInfo'] = accountInfo;\n }\n\n if (ext !== undefined && ext !== null) {\n localVarBodyParameter['ext'] = ext;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v2/fiat/withdraw',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {string} transactionType 0-buy,1-sell\n * @param {number | bigint} [beginTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [page] default 1\n * @param {number | bigint} [rows] default 100, max 500\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatDepositWithdrawHistory: async (\n transactionType: string,\n beginTime?: number | bigint,\n endTime?: number | bigint,\n page?: number | bigint,\n rows?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'transactionType' is not null or undefined\n assertParamExists('getFiatDepositWithdrawHistory', 'transactionType', transactionType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/orders',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {string} transactionType 0-buy,1-sell\n * @param {number | bigint} [beginTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [page] default 1\n * @param {number | bigint} [rows] default 100, max 500\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatPaymentsHistory: async (\n transactionType: string,\n beginTime?: number | bigint,\n endTime?: number | bigint,\n page?: number | bigint,\n rows?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'transactionType' is not null or undefined\n assertParamExists('getFiatPaymentsHistory', 'transactionType', transactionType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/payments',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {string} orderNo order id retrieved from the api call of withdrawal\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getOrderDetail: async (\n orderNo: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'orderNo' is not null or undefined\n assertParamExists('getOrderDetail', 'orderNo', orderNo);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (orderNo !== undefined && orderNo !== null) {\n localVarQueryParameter['orderNo'] = orderNo;\n }\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/fiat/get-order-detail',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * FiatApi - interface\n * @interface FiatApi\n */\nexport interface FiatApiInterface {\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {DepositRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n deposit(requestParameters: DepositRequest): Promise<RestApiResponse<DepositResponse>>;\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {FiatWithdrawRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n fiatWithdraw(\n requestParameters: FiatWithdrawRequest\n ): Promise<RestApiResponse<FiatWithdrawResponse>>;\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n getFiatDepositWithdrawHistory(\n requestParameters: GetFiatDepositWithdrawHistoryRequest\n ): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>;\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n getFiatPaymentsHistory(\n requestParameters: GetFiatPaymentsHistoryRequest\n ): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>;\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {GetOrderDetailRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApiInterface\n */\n getOrderDetail(\n requestParameters: GetOrderDetailRequest\n ): Promise<RestApiResponse<GetOrderDetailResponse>>;\n}\n\n/**\n * Request parameters for deposit operation in FiatApi.\n * @interface DepositRequest\n */\nexport interface DepositRequest {\n /**\n *\n * @type {string}\n * @memberof FiatApiDeposit\n */\n readonly currency: string;\n\n /**\n *\n * @type {string}\n * @memberof FiatApiDeposit\n */\n readonly apiPaymentMethod: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiDeposit\n */\n readonly amount: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiDeposit\n */\n readonly recvWindow?: number | bigint;\n\n /**\n *\n * @type {object}\n * @memberof FiatApiDeposit\n */\n readonly ext?: object;\n}\n\n/**\n * Request parameters for fiatWithdraw operation in FiatApi.\n * @interface FiatWithdrawRequest\n */\nexport interface FiatWithdrawRequest {\n /**\n *\n * @type {string}\n * @memberof FiatApiFiatWithdraw\n */\n readonly currency: string;\n\n /**\n *\n * @type {string}\n * @memberof FiatApiFiatWithdraw\n */\n readonly apiPaymentMethod: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiFiatWithdraw\n */\n readonly amount: number | bigint;\n\n /**\n *\n * @type {AccountInfo}\n * @memberof FiatApiFiatWithdraw\n */\n readonly accountInfo: AccountInfo;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiFiatWithdraw\n */\n readonly recvWindow?: number | bigint;\n\n /**\n *\n * @type {object}\n * @memberof FiatApiFiatWithdraw\n */\n readonly ext?: object;\n}\n\n/**\n * Request parameters for getFiatDepositWithdrawHistory operation in FiatApi.\n * @interface GetFiatDepositWithdrawHistoryRequest\n */\nexport interface GetFiatDepositWithdrawHistoryRequest {\n /**\n * 0-buy,1-sell\n * @type {string}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly transactionType: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly beginTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly endTime?: number | bigint;\n\n /**\n * default 1\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly page?: number | bigint;\n\n /**\n * default 100, max 500\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly rows?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getFiatPaymentsHistory operation in FiatApi.\n * @interface GetFiatPaymentsHistoryRequest\n */\nexport interface GetFiatPaymentsHistoryRequest {\n /**\n * 0-buy,1-sell\n * @type {string}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly transactionType: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly beginTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly endTime?: number | bigint;\n\n /**\n * default 1\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly page?: number | bigint;\n\n /**\n * default 100, max 500\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly rows?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getOrderDetail operation in FiatApi.\n * @interface GetOrderDetailRequest\n */\nexport interface GetOrderDetailRequest {\n /**\n * order id retrieved from the api call of withdrawal\n * @type {string}\n * @memberof FiatApiGetOrderDetail\n */\n readonly orderNo: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof FiatApiGetOrderDetail\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * FiatApi - object-oriented interface\n * @class FiatApi\n */\nexport class FiatApi implements FiatApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = FiatApiAxiosParamCreator(configuration);\n }\n\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {DepositRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<DepositResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Deposit Binance API Documentation}\n */\n public async deposit(\n requestParameters: DepositRequest\n ): Promise<RestApiResponse<DepositResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.deposit(\n requestParameters?.currency,\n requestParameters?.apiPaymentMethod,\n requestParameters?.amount,\n requestParameters?.recvWindow,\n requestParameters?.ext\n );\n return sendRequest<DepositResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {FiatWithdrawRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<FiatWithdrawResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Withdraw Binance API Documentation}\n */\n public async fiatWithdraw(\n requestParameters: FiatWithdrawRequest\n ): Promise<RestApiResponse<FiatWithdrawResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.fiatWithdraw(\n requestParameters?.currency,\n requestParameters?.apiPaymentMethod,\n requestParameters?.amount,\n requestParameters?.accountInfo,\n requestParameters?.recvWindow,\n requestParameters?.ext\n );\n return sendRequest<FiatWithdrawResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}\n */\n public async getFiatDepositWithdrawHistory(\n requestParameters: GetFiatDepositWithdrawHistoryRequest\n ): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.getFiatDepositWithdrawHistory(\n requestParameters?.transactionType,\n requestParameters?.beginTime,\n requestParameters?.endTime,\n requestParameters?.page,\n requestParameters?.rows,\n requestParameters?.recvWindow\n );\n return sendRequest<GetFiatDepositWithdrawHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}\n */\n public async getFiatPaymentsHistory(\n requestParameters: GetFiatPaymentsHistoryRequest\n ): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatPaymentsHistory(\n requestParameters?.transactionType,\n requestParameters?.beginTime,\n requestParameters?.endTime,\n requestParameters?.page,\n requestParameters?.rows,\n requestParameters?.recvWindow\n );\n return sendRequest<GetFiatPaymentsHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {GetOrderDetailRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetOrderDetailResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FiatApi\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail Binance API Documentation}\n */\n public async getOrderDetail(\n requestParameters: GetOrderDetailRequest\n ): Promise<RestApiResponse<GetOrderDetailResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOrderDetail(\n requestParameters?.orderNo,\n requestParameters?.recvWindow\n );\n return sendRequest<GetOrderDetailResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Fiat REST API\n *\n * OpenAPI Specification for the Binance Fiat REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { FiatApi } from './modules/fiat-api';\n\nimport type {\n DepositRequest,\n FiatWithdrawRequest,\n GetFiatDepositWithdrawHistoryRequest,\n GetFiatPaymentsHistoryRequest,\n GetOrderDetailRequest,\n} from './modules/fiat-api';\n\nimport type {\n DepositResponse,\n FiatWithdrawResponse,\n GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\n GetOrderDetailResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private fiatApi: FiatApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.fiatApi = new FiatApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined\n );\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param queryParams - Query parameters for the request.\n * @param bodyParams - Body parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Submit deposit request, in this version, we only support BRL deposit via pix.\n *\n *\n *\n * For BRL deposit via pix, you need to place an order before making a transfer from your bank.\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * `timestamp`, `signature` and `recvWindow` are sent as query-string parameters, while the business fields (`currency`, `apiPaymentMethod`, `amount`, `ext`) are sent in the JSON request body with `Content-Type: application/json`.\n *\n * Weight: 45000\n *\n * @summary Deposit(TRADE)\n * @param {DepositRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<DepositResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Deposit Binance API Documentation}\n */\n deposit(requestParameters: DepositRequest): Promise<RestApiResponse<DepositResponse>> {\n return this.fiatApi.deposit(requestParameters);\n }\n\n /**\n * Submit withdraw request, in this version, we support BRL,ARS,MXN withdrawal via bank_transfer.\n *\n * You need to call this api first, and call query order detail api in a loop to get the status of the order until this order is successful.\n *\n * Before calling this API, please ensure you have completed your KYC or KYB, activated your fiat service, and verified your destination bank account on our website.\n *\n * you need to bind your bank account on web/app before using the corresponding account number\n *\n * Weight: 45000\n *\n * @summary Fiat Withdraw(WITHDRAW)\n * @param {FiatWithdrawRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<FiatWithdrawResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Fiat-Withdraw Binance API Documentation}\n */\n fiatWithdraw(\n requestParameters: FiatWithdrawRequest\n ): Promise<RestApiResponse<FiatWithdrawResponse>> {\n return this.fiatApi.fiatWithdraw(requestParameters);\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n *\n * Weight: 45000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}\n */\n getFiatDepositWithdrawHistory(\n requestParameters: GetFiatDepositWithdrawHistoryRequest\n ): Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>> {\n return this.fiatApi.getFiatDepositWithdrawHistory(requestParameters);\n }\n\n /**\n * Get Fiat Deposit/Withdraw History\n *\n * If beginTime and endTime are not sent, the recent 30-day data will be returned.\n * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:\n * Cash Balance\n * Credit Card\n * Online Banking\n * Bank Transfer\n *\n * Weight: 1\n *\n * @summary Get Fiat Payments History (USER_DATA)\n * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}\n */\n getFiatPaymentsHistory(\n requestParameters: GetFiatPaymentsHistoryRequest\n ): Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>> {\n return this.fiatApi.getFiatPaymentsHistory(requestParameters);\n }\n\n /**\n * Get Order Detail\n *\n * Before calling this api, please make sure you have already completed your KYC or KYB, and already activated your fiat service on our website.\n *\n * Weight: 1\n *\n * @summary Get Order Detail(USER_DATA)\n * @param {GetOrderDetailRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetOrderDetailResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Order-Detail Binance API Documentation}\n */\n getOrderDetail(\n requestParameters: GetOrderDetailRequest\n ): Promise<RestApiResponse<GetOrderDetailResponse>> {\n return this.fiatApi.getOrderDetail(requestParameters);\n }\n}\n","/**\n * Binance Fiat REST API\n *\n * OpenAPI Specification for the Binance Fiat REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, FIAT_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationFiat {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Fiat {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationFiat) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || FIAT_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;AC8Bf,MAAM,2BAA2B,SAAU,eAAqC;AAC5E,QAAO;EAuBH,SAAS,OACL,UACA,kBACA,QACA,YACA,QACuB;AAEvB,qBAAkB,WAAW,YAAY,SAAS;AAElD,qBAAkB,WAAW,oBAAoB,iBAAiB;AAElE,qBAAkB,WAAW,UAAU,OAAO;GAE9C,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;AAG3C,OAAI,aAAa,UAAa,aAAa,KACvC,uBAAsB,cAAc;AAGxC,OAAI,qBAAqB,UAAa,qBAAqB,KACvD,uBAAsB,sBAAsB;AAGhD,OAAI,WAAW,UAAa,WAAW,KACnC,uBAAsB,YAAY;AAGtC,OAAI,QAAQ,UAAa,QAAQ,KAC7B,uBAAsB,SAA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ACxD,SAAO,KAAK,QAAQ,uBAAuB,kBAAkB;;;;;;;;;;;;;;;;CAiBjE,eACI,mBACgD;AAChD,SAAO,KAAK,QAAQ,eAAe,kBAAkB;;;;;;;;;;;;;AEpM7D,IAAa,OAAb,MAAkB;CAGd,YAAY,QAA2B;EACnC,MAAM,YAAY,eAAe,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAI,qBACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@binance/fiat",
|
|
3
3
|
"description": "Official Binance Fiat Connector - A lightweight library that provides a convenient interface to Binance's Fiat REST API.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "7.0.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"typescript-eslint": "^8.24.0"
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
|
-
"@binance/common": "2.
|
|
59
|
+
"@binance/common": "2.4.0",
|
|
60
60
|
"axios": "^1.7.4"
|
|
61
61
|
}
|
|
62
62
|
}
|