@binance/fiat 3.0.1 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,325 +1,226 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name2 in all)
4
- __defProp(target, name2, { get: all[name2], enumerable: true });
5
- };
6
-
7
- // src/fiat.ts
8
- import { buildUserAgent, ConfigurationRestAPI as ConfigurationRestAPI3, FIAT_REST_API_PROD_URL } from "@binance/common";
1
+ import { t as __export } from "./chunk.mjs";
2
+ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, FIAT_REST_API_PROD_URL, FIAT_REST_API_PROD_URL as FIAT_REST_API_PROD_URL$1, ForbiddenError, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError, assertParamExists, buildUserAgent, sendRequest } from "@binance/common";
9
3
 
10
- // package.json
4
+ //#region package.json
11
5
  var name = "@binance/fiat";
12
- var version = "3.0.1";
13
-
14
- // src/rest-api/index.ts
15
- var rest_api_exports = {};
16
- __export(rest_api_exports, {
17
- FiatApi: () => FiatApi,
18
- RestAPI: () => RestAPI
19
- });
6
+ var version = "5.0.1";
20
7
 
21
- // src/rest-api/modules/fiat-api.ts
22
- import {
23
- assertParamExists,
24
- sendRequest
25
- } from "@binance/common";
26
- var FiatApiAxiosParamCreator = function(configuration) {
27
- return {
28
- /**
29
- * Get Fiat Deposit/Withdraw History
30
- *
31
- * If beginTime and endTime are not sent, the recent 30-day data will be returned.
32
- *
33
- * Weight: 45000
34
- *
35
- * @summary Get Fiat Deposit/Withdraw History (USER_DATA)
36
- * @param {string} transactionType 0-buy,1-sell
37
- * @param {number | bigint} [beginTime]
38
- * @param {number | bigint} [endTime]
39
- * @param {number | bigint} [page] default 1
40
- * @param {number | bigint} [rows] default 100, max 500
41
- * @param {number | bigint} [recvWindow]
42
- *
43
- * @throws {RequiredError}
44
- */
45
- getFiatDepositWithdrawHistory: async (transactionType, beginTime, endTime, page, rows, recvWindow) => {
46
- assertParamExists("getFiatDepositWithdrawHistory", "transactionType", transactionType);
47
- const localVarQueryParameter = {};
48
- if (transactionType !== void 0 && transactionType !== null) {
49
- localVarQueryParameter["transactionType"] = transactionType;
50
- }
51
- if (beginTime !== void 0 && beginTime !== null) {
52
- localVarQueryParameter["beginTime"] = beginTime;
53
- }
54
- if (endTime !== void 0 && endTime !== null) {
55
- localVarQueryParameter["endTime"] = endTime;
56
- }
57
- if (page !== void 0 && page !== null) {
58
- localVarQueryParameter["page"] = page;
59
- }
60
- if (rows !== void 0 && rows !== null) {
61
- localVarQueryParameter["rows"] = rows;
62
- }
63
- if (recvWindow !== void 0 && recvWindow !== null) {
64
- localVarQueryParameter["recvWindow"] = recvWindow;
65
- }
66
- let _timeUnit;
67
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
68
- return {
69
- endpoint: "/sapi/v1/fiat/orders",
70
- method: "GET",
71
- params: localVarQueryParameter,
72
- timeUnit: _timeUnit
73
- };
74
- },
75
- /**
76
- * Get Fiat Deposit/Withdraw History
77
- *
78
- * If beginTime and endTime are not sent, the recent 30-day data will be returned.
79
- * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
80
- * Cash Balance
81
- * Credit Card
82
- * Online Banking
83
- * Bank Transfer
84
- *
85
- * Weight: 1
86
- *
87
- * @summary Get Fiat Payments History (USER_DATA)
88
- * @param {string} transactionType 0-buy,1-sell
89
- * @param {number | bigint} [beginTime]
90
- * @param {number | bigint} [endTime]
91
- * @param {number | bigint} [page] default 1
92
- * @param {number | bigint} [rows] default 100, max 500
93
- * @param {number | bigint} [recvWindow]
94
- *
95
- * @throws {RequiredError}
96
- */
97
- getFiatPaymentsHistory: async (transactionType, beginTime, endTime, page, rows, recvWindow) => {
98
- assertParamExists("getFiatPaymentsHistory", "transactionType", transactionType);
99
- const localVarQueryParameter = {};
100
- if (transactionType !== void 0 && transactionType !== null) {
101
- localVarQueryParameter["transactionType"] = transactionType;
102
- }
103
- if (beginTime !== void 0 && beginTime !== null) {
104
- localVarQueryParameter["beginTime"] = beginTime;
105
- }
106
- if (endTime !== void 0 && endTime !== null) {
107
- localVarQueryParameter["endTime"] = endTime;
108
- }
109
- if (page !== void 0 && page !== null) {
110
- localVarQueryParameter["page"] = page;
111
- }
112
- if (rows !== void 0 && rows !== null) {
113
- localVarQueryParameter["rows"] = rows;
114
- }
115
- if (recvWindow !== void 0 && recvWindow !== null) {
116
- localVarQueryParameter["recvWindow"] = recvWindow;
117
- }
118
- let _timeUnit;
119
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
120
- return {
121
- endpoint: "/sapi/v1/fiat/payments",
122
- method: "GET",
123
- params: localVarQueryParameter,
124
- timeUnit: _timeUnit
125
- };
126
- }
127
- };
8
+ //#endregion
9
+ //#region src/rest-api/modules/fiat-api.ts
10
+ /**
11
+ * Binance Fiat REST API
12
+ *
13
+ * OpenAPI Specification for the Binance Fiat REST API
14
+ *
15
+ * The version of the OpenAPI document: 1.0.0
16
+ *
17
+ *
18
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19
+ * https://openapi-generator.tech
20
+ * Do not edit the class manually.
21
+ */
22
+ /**
23
+ * FiatApi - axios parameter creator
24
+ */
25
+ const FiatApiAxiosParamCreator = function(configuration) {
26
+ return {
27
+ getFiatDepositWithdrawHistory: async (transactionType, beginTime, endTime, page, rows, recvWindow) => {
28
+ assertParamExists("getFiatDepositWithdrawHistory", "transactionType", transactionType);
29
+ const localVarQueryParameter = {};
30
+ if (transactionType !== void 0 && transactionType !== null) localVarQueryParameter["transactionType"] = transactionType;
31
+ if (beginTime !== void 0 && beginTime !== null) localVarQueryParameter["beginTime"] = beginTime;
32
+ if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
33
+ if (page !== void 0 && page !== null) localVarQueryParameter["page"] = page;
34
+ if (rows !== void 0 && rows !== null) localVarQueryParameter["rows"] = rows;
35
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
36
+ let _timeUnit;
37
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
38
+ return {
39
+ endpoint: "/sapi/v1/fiat/orders",
40
+ method: "GET",
41
+ params: localVarQueryParameter,
42
+ timeUnit: _timeUnit
43
+ };
44
+ },
45
+ getFiatPaymentsHistory: async (transactionType, beginTime, endTime, page, rows, recvWindow) => {
46
+ assertParamExists("getFiatPaymentsHistory", "transactionType", transactionType);
47
+ const localVarQueryParameter = {};
48
+ if (transactionType !== void 0 && transactionType !== null) localVarQueryParameter["transactionType"] = transactionType;
49
+ if (beginTime !== void 0 && beginTime !== null) localVarQueryParameter["beginTime"] = beginTime;
50
+ if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
51
+ if (page !== void 0 && page !== null) localVarQueryParameter["page"] = page;
52
+ if (rows !== void 0 && rows !== null) localVarQueryParameter["rows"] = rows;
53
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
54
+ let _timeUnit;
55
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
56
+ return {
57
+ endpoint: "/sapi/v1/fiat/payments",
58
+ method: "GET",
59
+ params: localVarQueryParameter,
60
+ timeUnit: _timeUnit
61
+ };
62
+ }
63
+ };
128
64
  };
65
+ /**
66
+ * FiatApi - object-oriented interface
67
+ * @class FiatApi
68
+ */
129
69
  var FiatApi = class {
130
- constructor(configuration) {
131
- this.configuration = configuration;
132
- this.localVarAxiosParamCreator = FiatApiAxiosParamCreator(configuration);
133
- }
134
- /**
135
- * Get Fiat Deposit/Withdraw History
136
- *
137
- * If beginTime and endTime are not sent, the recent 30-day data will be returned.
138
- *
139
- * Weight: 45000
140
- *
141
- * @summary Get Fiat Deposit/Withdraw History (USER_DATA)
142
- * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.
143
- * @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}
144
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
145
- * @memberof FiatApi
146
- * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}
147
- */
148
- async getFiatDepositWithdrawHistory(requestParameters) {
149
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatDepositWithdrawHistory(
150
- requestParameters?.transactionType,
151
- requestParameters?.beginTime,
152
- requestParameters?.endTime,
153
- requestParameters?.page,
154
- requestParameters?.rows,
155
- requestParameters?.recvWindow
156
- );
157
- return sendRequest(
158
- this.configuration,
159
- localVarAxiosArgs.endpoint,
160
- localVarAxiosArgs.method,
161
- localVarAxiosArgs.params,
162
- localVarAxiosArgs?.timeUnit,
163
- { isSigned: true }
164
- );
165
- }
166
- /**
167
- * Get Fiat Deposit/Withdraw History
168
- *
169
- * If beginTime and endTime are not sent, the recent 30-day data will be returned.
170
- * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
171
- * Cash Balance
172
- * Credit Card
173
- * Online Banking
174
- * Bank Transfer
175
- *
176
- * Weight: 1
177
- *
178
- * @summary Get Fiat Payments History (USER_DATA)
179
- * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
180
- * @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}
181
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
182
- * @memberof FiatApi
183
- * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
184
- */
185
- async getFiatPaymentsHistory(requestParameters) {
186
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatPaymentsHistory(
187
- requestParameters?.transactionType,
188
- requestParameters?.beginTime,
189
- requestParameters?.endTime,
190
- requestParameters?.page,
191
- requestParameters?.rows,
192
- requestParameters?.recvWindow
193
- );
194
- return sendRequest(
195
- this.configuration,
196
- localVarAxiosArgs.endpoint,
197
- localVarAxiosArgs.method,
198
- localVarAxiosArgs.params,
199
- localVarAxiosArgs?.timeUnit,
200
- { isSigned: true }
201
- );
202
- }
70
+ constructor(configuration) {
71
+ this.configuration = configuration;
72
+ this.localVarAxiosParamCreator = FiatApiAxiosParamCreator(configuration);
73
+ }
74
+ /**
75
+ * Get Fiat Deposit/Withdraw History
76
+ *
77
+ * If beginTime and endTime are not sent, the recent 30-day data will be returned.
78
+ *
79
+ * Weight: 45000
80
+ *
81
+ * @summary Get Fiat Deposit/Withdraw History (USER_DATA)
82
+ * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.
83
+ * @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}
84
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
85
+ * @memberof FiatApi
86
+ * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}
87
+ */
88
+ async getFiatDepositWithdrawHistory(requestParameters) {
89
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatDepositWithdrawHistory(requestParameters?.transactionType, requestParameters?.beginTime, requestParameters?.endTime, requestParameters?.page, requestParameters?.rows, requestParameters?.recvWindow);
90
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
91
+ }
92
+ /**
93
+ * Get Fiat Deposit/Withdraw History
94
+ *
95
+ * If beginTime and endTime are not sent, the recent 30-day data will be returned.
96
+ * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
97
+ * Cash Balance
98
+ * Credit Card
99
+ * Online Banking
100
+ * Bank Transfer
101
+ *
102
+ * Weight: 1
103
+ *
104
+ * @summary Get Fiat Payments History (USER_DATA)
105
+ * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
106
+ * @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}
107
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
108
+ * @memberof FiatApi
109
+ * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
110
+ */
111
+ async getFiatPaymentsHistory(requestParameters) {
112
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFiatPaymentsHistory(requestParameters?.transactionType, requestParameters?.beginTime, requestParameters?.endTime, requestParameters?.page, requestParameters?.rows, requestParameters?.recvWindow);
113
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
114
+ }
203
115
  };
204
116
 
205
- // src/rest-api/rest-api.ts
206
- import { sendRequest as sendRequest2 } from "@binance/common";
117
+ //#endregion
118
+ //#region src/rest-api/rest-api.ts
119
+ /**
120
+ * Binance Fiat REST API
121
+ *
122
+ * OpenAPI Specification for the Binance Fiat REST API
123
+ *
124
+ * The version of the OpenAPI document: 1.0.0
125
+ *
126
+ *
127
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
128
+ * https://openapi-generator.tech
129
+ * Do not edit the class manually.
130
+ */
207
131
  var RestAPI = class {
208
- constructor(configuration) {
209
- this.configuration = configuration;
210
- this.fiatApi = new FiatApi(configuration);
211
- }
212
- /**
213
- * Generic function to send a request.
214
- * @param endpoint - The API endpoint to call.
215
- * @param method - HTTP method to use (GET, POST, DELETE, etc.).
216
- * @param params - Query parameters for the request.
217
- *
218
- * @returns A promise resolving to the response data object.
219
- */
220
- sendRequest(endpoint, method, params = {}) {
221
- return sendRequest2(this.configuration, endpoint, method, params, void 0);
222
- }
223
- /**
224
- * Generic function to send a signed request.
225
- * @param endpoint - The API endpoint to call.
226
- * @param method - HTTP method to use (GET, POST, DELETE, etc.).
227
- * @param params - Query parameters for the request.
228
- *
229
- * @returns A promise resolving to the response data object.
230
- */
231
- sendSignedRequest(endpoint, method, params = {}) {
232
- return sendRequest2(this.configuration, endpoint, method, params, void 0, {
233
- isSigned: true
234
- });
235
- }
236
- /**
237
- * Get Fiat Deposit/Withdraw History
238
- *
239
- * If beginTime and endTime are not sent, the recent 30-day data will be returned.
240
- *
241
- * Weight: 45000
242
- *
243
- * @summary Get Fiat Deposit/Withdraw History (USER_DATA)
244
- * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.
245
- *
246
- * @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}
247
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
248
- * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}
249
- */
250
- getFiatDepositWithdrawHistory(requestParameters) {
251
- return this.fiatApi.getFiatDepositWithdrawHistory(requestParameters);
252
- }
253
- /**
254
- * Get Fiat Deposit/Withdraw History
255
- *
256
- * If beginTime and endTime are not sent, the recent 30-day data will be returned.
257
- * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
258
- * Cash Balance
259
- * Credit Card
260
- * Online Banking
261
- * Bank Transfer
262
- *
263
- * Weight: 1
264
- *
265
- * @summary Get Fiat Payments History (USER_DATA)
266
- * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
267
- *
268
- * @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}
269
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
270
- * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
271
- */
272
- getFiatPaymentsHistory(requestParameters) {
273
- return this.fiatApi.getFiatPaymentsHistory(requestParameters);
274
- }
132
+ constructor(configuration) {
133
+ this.configuration = configuration;
134
+ this.fiatApi = new FiatApi(configuration);
135
+ }
136
+ /**
137
+ * Generic function to send a request.
138
+ * @param endpoint - The API endpoint to call.
139
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
140
+ * @param params - Query parameters for the request.
141
+ *
142
+ * @returns A promise resolving to the response data object.
143
+ */
144
+ sendRequest(endpoint, method, params = {}) {
145
+ return sendRequest(this.configuration, endpoint, method, params, void 0);
146
+ }
147
+ /**
148
+ * Generic function to send a signed request.
149
+ * @param endpoint - The API endpoint to call.
150
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
151
+ * @param params - Query parameters for the request.
152
+ *
153
+ * @returns A promise resolving to the response data object.
154
+ */
155
+ sendSignedRequest(endpoint, method, params = {}) {
156
+ return sendRequest(this.configuration, endpoint, method, params, void 0, { isSigned: true });
157
+ }
158
+ /**
159
+ * Get Fiat Deposit/Withdraw History
160
+ *
161
+ * If beginTime and endTime are not sent, the recent 30-day data will be returned.
162
+ *
163
+ * Weight: 45000
164
+ *
165
+ * @summary Get Fiat Deposit/Withdraw History (USER_DATA)
166
+ * @param {GetFiatDepositWithdrawHistoryRequest} requestParameters Request parameters.
167
+ *
168
+ * @returns {Promise<RestApiResponse<GetFiatDepositWithdrawHistoryResponse>>}
169
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
170
+ * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History Binance API Documentation}
171
+ */
172
+ getFiatDepositWithdrawHistory(requestParameters) {
173
+ return this.fiatApi.getFiatDepositWithdrawHistory(requestParameters);
174
+ }
175
+ /**
176
+ * Get Fiat Deposit/Withdraw History
177
+ *
178
+ * If beginTime and endTime are not sent, the recent 30-day data will be returned.
179
+ * paymentMethod: Only when requesting payments history for buy (transactionType=0), response contains paymentMethod representing the way of purchase. Now we have:
180
+ * Cash Balance
181
+ * Credit Card
182
+ * Online Banking
183
+ * Bank Transfer
184
+ *
185
+ * Weight: 1
186
+ *
187
+ * @summary Get Fiat Payments History (USER_DATA)
188
+ * @param {GetFiatPaymentsHistoryRequest} requestParameters Request parameters.
189
+ *
190
+ * @returns {Promise<RestApiResponse<GetFiatPaymentsHistoryResponse>>}
191
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
192
+ * @see {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History Binance API Documentation}
193
+ */
194
+ getFiatPaymentsHistory(requestParameters) {
195
+ return this.fiatApi.getFiatPaymentsHistory(requestParameters);
196
+ }
275
197
  };
276
198
 
277
- // src/fiat.ts
199
+ //#endregion
200
+ //#region src/rest-api/index.ts
201
+ var rest_api_exports = /* @__PURE__ */ __export({
202
+ FiatApi: () => FiatApi,
203
+ RestAPI: () => RestAPI
204
+ });
205
+
206
+ //#endregion
207
+ //#region src/fiat.ts
278
208
  var Fiat = class {
279
- constructor(config) {
280
- const userAgent = buildUserAgent(name, version);
281
- if (config?.configurationRestAPI) {
282
- const configRestAPI = new ConfigurationRestAPI3(
283
- config.configurationRestAPI
284
- );
285
- configRestAPI.basePath = configRestAPI.basePath || FIAT_REST_API_PROD_URL;
286
- configRestAPI.baseOptions = configRestAPI.baseOptions || {};
287
- configRestAPI.baseOptions.headers = {
288
- ...configRestAPI.baseOptions.headers || {},
289
- "User-Agent": userAgent
290
- };
291
- this.restAPI = new RestAPI(configRestAPI);
292
- }
293
- }
209
+ constructor(config) {
210
+ const userAgent = buildUserAgent(name, version);
211
+ if (config?.configurationRestAPI) {
212
+ const configRestAPI = new ConfigurationRestAPI(config.configurationRestAPI);
213
+ configRestAPI.basePath = configRestAPI.basePath || FIAT_REST_API_PROD_URL$1;
214
+ configRestAPI.baseOptions = configRestAPI.baseOptions || {};
215
+ configRestAPI.baseOptions.headers = {
216
+ ...configRestAPI.baseOptions.headers || {},
217
+ "User-Agent": userAgent
218
+ };
219
+ this.restAPI = new RestAPI(configRestAPI);
220
+ }
221
+ }
294
222
  };
295
223
 
296
- // src/index.ts
297
- import {
298
- FIAT_REST_API_PROD_URL as FIAT_REST_API_PROD_URL2,
299
- ConnectorClientError,
300
- RequiredError,
301
- UnauthorizedError,
302
- ForbiddenError,
303
- TooManyRequestsError,
304
- RateLimitBanError,
305
- ServerError,
306
- NetworkError,
307
- NotFoundError,
308
- BadRequestError
309
- } from "@binance/common";
310
- export {
311
- BadRequestError,
312
- ConnectorClientError,
313
- FIAT_REST_API_PROD_URL2 as FIAT_REST_API_PROD_URL,
314
- Fiat,
315
- rest_api_exports as FiatRestAPI,
316
- ForbiddenError,
317
- NetworkError,
318
- NotFoundError,
319
- RateLimitBanError,
320
- RequiredError,
321
- ServerError,
322
- TooManyRequestsError,
323
- UnauthorizedError
324
- };
224
+ //#endregion
225
+ export { BadRequestError, ConfigurationFiat, ConnectorClientError, FIAT_REST_API_PROD_URL, Fiat, rest_api_exports as FiatRestAPI, ForbiddenError, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError };
325
226
  //# sourceMappingURL=index.mjs.map