@binance/fiat 1.0.0 → 1.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/README.md CHANGED
@@ -139,21 +139,6 @@ The REST API provides detailed error types to help you handle issues effectively
139
139
 
140
140
  See the [Error Handling example](./docs/rest-api/error-handling.md) for detailed usage.
141
141
 
142
- #### Testnet
143
-
144
- For testing purposes, `/sapi/v1/fiat/*` endpoints can be used in the [Testnet](https://testnet.binance.vision/). Update the `basePath` in your configuration:
145
-
146
- ```typescript
147
- import { Fiat, FiatRestAPI, FIAT_REST_API_TESTNET_URL } from '@binance/fiat';
148
-
149
- const configurationRestAPI = {
150
- apiKey: 'your-api-key',
151
- apiSecret: 'your-api-secret',
152
- basePath: FIAT_REST_API_TESTNET_URL,
153
- };
154
- const client = new Fiat({ configurationRestAPI });
155
- ```
156
-
157
142
  If `basePath` is not provided, it defaults to `https://api.binance.com`.
158
143
 
159
144
  ## Testing
package/dist/index.d.mts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { RestApiResponse, ConfigurationRestAPI } from '@binance/common';
2
- export { BadRequestError, ConnectorClientError, FIAT_REST_API_PROD_URL, FIAT_REST_API_TESTNET_URL, ForbiddenError, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError } from '@binance/common';
2
+ export { BadRequestError, ConnectorClientError, FIAT_REST_API_PROD_URL, ForbiddenError, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError } from '@binance/common';
3
3
 
4
4
  /**
5
- * Binance Public Fiat REST API
5
+ * Binance Fiat REST API
6
6
  *
7
- * OpenAPI Specification for the Binance Public Fiat REST API
7
+ * OpenAPI Specification for the Binance Fiat REST API
8
8
  *
9
9
  * The version of the OpenAPI document: 1.0.0
10
10
  *
@@ -34,9 +34,9 @@ interface BadRequest {
34
34
  }
35
35
 
36
36
  /**
37
- * Binance Public Fiat REST API
37
+ * Binance Fiat REST API
38
38
  *
39
- * OpenAPI Specification for the Binance Public Fiat REST API
39
+ * OpenAPI Specification for the Binance Fiat REST API
40
40
  *
41
41
  * The version of the OpenAPI document: 1.0.0
42
42
  *
@@ -108,9 +108,9 @@ interface GetFiatDepositWithdrawHistoryResponseDataInner {
108
108
  }
109
109
 
110
110
  /**
111
- * Binance Public Fiat REST API
111
+ * Binance Fiat REST API
112
112
  *
113
- * OpenAPI Specification for the Binance Public Fiat REST API
113
+ * OpenAPI Specification for the Binance Fiat REST API
114
114
  *
115
115
  * The version of the OpenAPI document: 1.0.0
116
116
  *
@@ -159,9 +159,9 @@ interface GetFiatDepositWithdrawHistoryResponse {
159
159
  }
160
160
 
161
161
  /**
162
- * Binance Public Fiat REST API
162
+ * Binance Fiat REST API
163
163
  *
164
- * OpenAPI Specification for the Binance Public Fiat REST API
164
+ * OpenAPI Specification for the Binance Fiat REST API
165
165
  *
166
166
  * The version of the OpenAPI document: 1.0.0
167
167
  *
@@ -245,9 +245,9 @@ interface GetFiatPaymentsHistoryResponseDataInner {
245
245
  }
246
246
 
247
247
  /**
248
- * Binance Public Fiat REST API
248
+ * Binance Fiat REST API
249
249
  *
250
- * OpenAPI Specification for the Binance Public Fiat REST API
250
+ * OpenAPI Specification for the Binance Fiat REST API
251
251
  *
252
252
  * The version of the OpenAPI document: 1.0.0
253
253
  *
@@ -296,9 +296,9 @@ interface GetFiatPaymentsHistoryResponse {
296
296
  }
297
297
 
298
298
  /**
299
- * Binance Public Fiat REST API
299
+ * Binance Fiat REST API
300
300
  *
301
- * OpenAPI Specification for the Binance Public Fiat REST API
301
+ * OpenAPI Specification for the Binance Fiat REST API
302
302
  *
303
303
  * The version of the OpenAPI document: 1.0.0
304
304
  *
@@ -477,9 +477,9 @@ declare class FiatApi implements FiatApiInterface {
477
477
  }
478
478
 
479
479
  /**
480
- * Binance Public Fiat REST API
480
+ * Binance Fiat REST API
481
481
  *
482
- * OpenAPI Specification for the Binance Public Fiat REST API
482
+ * OpenAPI Specification for the Binance Fiat REST API
483
483
  *
484
484
  * The version of the OpenAPI document: 1.0.0
485
485
  *
@@ -547,9 +547,9 @@ declare class RestAPI {
547
547
  }
548
548
 
549
549
  /**
550
- * Binance Public Fiat REST API
550
+ * Binance Fiat REST API
551
551
  *
552
- * OpenAPI Specification for the Binance Public Fiat REST API
552
+ * OpenAPI Specification for the Binance Fiat REST API
553
553
  *
554
554
  * The version of the OpenAPI document: 1.0.0
555
555
  *
@@ -572,18 +572,7 @@ type index_GetFiatPaymentsHistoryResponseDataInner = GetFiatPaymentsHistoryRespo
572
572
  type index_RestAPI = RestAPI;
573
573
  declare const index_RestAPI: typeof RestAPI;
574
574
  declare namespace index {
575
- export {
576
- index_BadRequest as BadRequest,
577
- index_FiatApi as FiatApi,
578
- index_FiatApiInterface as FiatApiInterface,
579
- index_GetFiatDepositWithdrawHistoryRequest as GetFiatDepositWithdrawHistoryRequest,
580
- index_GetFiatDepositWithdrawHistoryResponse as GetFiatDepositWithdrawHistoryResponse,
581
- index_GetFiatDepositWithdrawHistoryResponseDataInner as GetFiatDepositWithdrawHistoryResponseDataInner,
582
- index_GetFiatPaymentsHistoryRequest as GetFiatPaymentsHistoryRequest,
583
- index_GetFiatPaymentsHistoryResponse as GetFiatPaymentsHistoryResponse,
584
- index_GetFiatPaymentsHistoryResponseDataInner as GetFiatPaymentsHistoryResponseDataInner,
585
- index_RestAPI as RestAPI,
586
- };
575
+ export { type index_BadRequest as BadRequest, index_FiatApi as FiatApi, type index_FiatApiInterface as FiatApiInterface, type index_GetFiatDepositWithdrawHistoryRequest as GetFiatDepositWithdrawHistoryRequest, type index_GetFiatDepositWithdrawHistoryResponse as GetFiatDepositWithdrawHistoryResponse, type index_GetFiatDepositWithdrawHistoryResponseDataInner as GetFiatDepositWithdrawHistoryResponseDataInner, type index_GetFiatPaymentsHistoryRequest as GetFiatPaymentsHistoryRequest, type index_GetFiatPaymentsHistoryResponse as GetFiatPaymentsHistoryResponse, type index_GetFiatPaymentsHistoryResponseDataInner as GetFiatPaymentsHistoryResponseDataInner, index_RestAPI as RestAPI };
587
576
  }
588
577
 
589
578
  interface ConfigurationFiat {
@@ -594,4 +583,4 @@ declare class Fiat {
594
583
  constructor(config: ConfigurationFiat);
595
584
  }
596
585
 
597
- export { ConfigurationFiat, Fiat, index as FiatRestAPI };
586
+ export { type ConfigurationFiat, Fiat, index as FiatRestAPI };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { RestApiResponse, ConfigurationRestAPI } from '@binance/common';
2
- export { BadRequestError, ConnectorClientError, FIAT_REST_API_PROD_URL, FIAT_REST_API_TESTNET_URL, ForbiddenError, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError } from '@binance/common';
2
+ export { BadRequestError, ConnectorClientError, FIAT_REST_API_PROD_URL, ForbiddenError, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError } from '@binance/common';
3
3
 
4
4
  /**
5
- * Binance Public Fiat REST API
5
+ * Binance Fiat REST API
6
6
  *
7
- * OpenAPI Specification for the Binance Public Fiat REST API
7
+ * OpenAPI Specification for the Binance Fiat REST API
8
8
  *
9
9
  * The version of the OpenAPI document: 1.0.0
10
10
  *
@@ -34,9 +34,9 @@ interface BadRequest {
34
34
  }
35
35
 
36
36
  /**
37
- * Binance Public Fiat REST API
37
+ * Binance Fiat REST API
38
38
  *
39
- * OpenAPI Specification for the Binance Public Fiat REST API
39
+ * OpenAPI Specification for the Binance Fiat REST API
40
40
  *
41
41
  * The version of the OpenAPI document: 1.0.0
42
42
  *
@@ -108,9 +108,9 @@ interface GetFiatDepositWithdrawHistoryResponseDataInner {
108
108
  }
109
109
 
110
110
  /**
111
- * Binance Public Fiat REST API
111
+ * Binance Fiat REST API
112
112
  *
113
- * OpenAPI Specification for the Binance Public Fiat REST API
113
+ * OpenAPI Specification for the Binance Fiat REST API
114
114
  *
115
115
  * The version of the OpenAPI document: 1.0.0
116
116
  *
@@ -159,9 +159,9 @@ interface GetFiatDepositWithdrawHistoryResponse {
159
159
  }
160
160
 
161
161
  /**
162
- * Binance Public Fiat REST API
162
+ * Binance Fiat REST API
163
163
  *
164
- * OpenAPI Specification for the Binance Public Fiat REST API
164
+ * OpenAPI Specification for the Binance Fiat REST API
165
165
  *
166
166
  * The version of the OpenAPI document: 1.0.0
167
167
  *
@@ -245,9 +245,9 @@ interface GetFiatPaymentsHistoryResponseDataInner {
245
245
  }
246
246
 
247
247
  /**
248
- * Binance Public Fiat REST API
248
+ * Binance Fiat REST API
249
249
  *
250
- * OpenAPI Specification for the Binance Public Fiat REST API
250
+ * OpenAPI Specification for the Binance Fiat REST API
251
251
  *
252
252
  * The version of the OpenAPI document: 1.0.0
253
253
  *
@@ -296,9 +296,9 @@ interface GetFiatPaymentsHistoryResponse {
296
296
  }
297
297
 
298
298
  /**
299
- * Binance Public Fiat REST API
299
+ * Binance Fiat REST API
300
300
  *
301
- * OpenAPI Specification for the Binance Public Fiat REST API
301
+ * OpenAPI Specification for the Binance Fiat REST API
302
302
  *
303
303
  * The version of the OpenAPI document: 1.0.0
304
304
  *
@@ -477,9 +477,9 @@ declare class FiatApi implements FiatApiInterface {
477
477
  }
478
478
 
479
479
  /**
480
- * Binance Public Fiat REST API
480
+ * Binance Fiat REST API
481
481
  *
482
- * OpenAPI Specification for the Binance Public Fiat REST API
482
+ * OpenAPI Specification for the Binance Fiat REST API
483
483
  *
484
484
  * The version of the OpenAPI document: 1.0.0
485
485
  *
@@ -547,9 +547,9 @@ declare class RestAPI {
547
547
  }
548
548
 
549
549
  /**
550
- * Binance Public Fiat REST API
550
+ * Binance Fiat REST API
551
551
  *
552
- * OpenAPI Specification for the Binance Public Fiat REST API
552
+ * OpenAPI Specification for the Binance Fiat REST API
553
553
  *
554
554
  * The version of the OpenAPI document: 1.0.0
555
555
  *
@@ -572,18 +572,7 @@ type index_GetFiatPaymentsHistoryResponseDataInner = GetFiatPaymentsHistoryRespo
572
572
  type index_RestAPI = RestAPI;
573
573
  declare const index_RestAPI: typeof RestAPI;
574
574
  declare namespace index {
575
- export {
576
- index_BadRequest as BadRequest,
577
- index_FiatApi as FiatApi,
578
- index_FiatApiInterface as FiatApiInterface,
579
- index_GetFiatDepositWithdrawHistoryRequest as GetFiatDepositWithdrawHistoryRequest,
580
- index_GetFiatDepositWithdrawHistoryResponse as GetFiatDepositWithdrawHistoryResponse,
581
- index_GetFiatDepositWithdrawHistoryResponseDataInner as GetFiatDepositWithdrawHistoryResponseDataInner,
582
- index_GetFiatPaymentsHistoryRequest as GetFiatPaymentsHistoryRequest,
583
- index_GetFiatPaymentsHistoryResponse as GetFiatPaymentsHistoryResponse,
584
- index_GetFiatPaymentsHistoryResponseDataInner as GetFiatPaymentsHistoryResponseDataInner,
585
- index_RestAPI as RestAPI,
586
- };
575
+ export { type index_BadRequest as BadRequest, index_FiatApi as FiatApi, type index_FiatApiInterface as FiatApiInterface, type index_GetFiatDepositWithdrawHistoryRequest as GetFiatDepositWithdrawHistoryRequest, type index_GetFiatDepositWithdrawHistoryResponse as GetFiatDepositWithdrawHistoryResponse, type index_GetFiatDepositWithdrawHistoryResponseDataInner as GetFiatDepositWithdrawHistoryResponseDataInner, type index_GetFiatPaymentsHistoryRequest as GetFiatPaymentsHistoryRequest, type index_GetFiatPaymentsHistoryResponse as GetFiatPaymentsHistoryResponse, type index_GetFiatPaymentsHistoryResponseDataInner as GetFiatPaymentsHistoryResponseDataInner, index_RestAPI as RestAPI };
587
576
  }
588
577
 
589
578
  interface ConfigurationFiat {
@@ -594,4 +583,4 @@ declare class Fiat {
594
583
  constructor(config: ConfigurationFiat);
595
584
  }
596
585
 
597
- export { ConfigurationFiat, Fiat, index as FiatRestAPI };
586
+ export { type ConfigurationFiat, Fiat, index as FiatRestAPI };
package/dist/index.js CHANGED
@@ -18,12 +18,11 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
20
  // src/index.ts
21
- var src_exports = {};
22
- __export(src_exports, {
21
+ var index_exports = {};
22
+ __export(index_exports, {
23
23
  BadRequestError: () => import_common4.BadRequestError,
24
24
  ConnectorClientError: () => import_common4.ConnectorClientError,
25
25
  FIAT_REST_API_PROD_URL: () => import_common4.FIAT_REST_API_PROD_URL,
26
- FIAT_REST_API_TESTNET_URL: () => import_common4.FIAT_REST_API_TESTNET_URL,
27
26
  Fiat: () => Fiat,
28
27
  FiatRestAPI: () => rest_api_exports,
29
28
  ForbiddenError: () => import_common4.ForbiddenError,
@@ -35,7 +34,7 @@ __export(src_exports, {
35
34
  TooManyRequestsError: () => import_common4.TooManyRequestsError,
36
35
  UnauthorizedError: () => import_common4.UnauthorizedError
37
36
  });
38
- module.exports = __toCommonJS(src_exports);
37
+ module.exports = __toCommonJS(index_exports);
39
38
 
40
39
  // src/fiat.ts
41
40
  var import_os = require("os");
@@ -43,7 +42,7 @@ var import_common3 = require("@binance/common");
43
42
 
44
43
  // package.json
45
44
  var name = "@binance/fiat";
46
- var version = "1.0.0";
45
+ var version = "1.0.1";
47
46
 
48
47
  // src/rest-api/index.ts
49
48
  var rest_api_exports = {};
@@ -95,8 +94,7 @@ var FiatApiAxiosParamCreator = function(configuration) {
95
94
  localVarQueryParameter["recvWindow"] = recvWindow;
96
95
  }
97
96
  let _timeUnit;
98
- if ("timeUnit" in configuration)
99
- _timeUnit = configuration.timeUnit;
97
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
100
98
  return {
101
99
  endpoint: "/sapi/v1/fiat/orders",
102
100
  method: "GET",
@@ -148,8 +146,7 @@ var FiatApiAxiosParamCreator = function(configuration) {
148
146
  localVarQueryParameter["recvWindow"] = recvWindow;
149
147
  }
150
148
  let _timeUnit;
151
- if ("timeUnit" in configuration)
152
- _timeUnit = configuration.timeUnit;
149
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
153
150
  return {
154
151
  endpoint: "/sapi/v1/fiat/payments",
155
152
  method: "GET",
@@ -328,7 +325,6 @@ var import_common4 = require("@binance/common");
328
325
  BadRequestError,
329
326
  ConnectorClientError,
330
327
  FIAT_REST_API_PROD_URL,
331
- FIAT_REST_API_TESTNET_URL,
332
328
  Fiat,
333
329
  FiatRestAPI,
334
330
  ForbiddenError,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/fiat.ts","../package.json","../src/rest-api/index.ts","../src/rest-api/modules/fiat-api.ts","../src/rest-api/rest-api.ts"],"sourcesContent":["export { Fiat, ConfigurationFiat } from './fiat';\nexport * as FiatRestAPI from './rest-api';\n\nexport {\n FIAT_REST_API_PROD_URL,\n FIAT_REST_API_TESTNET_URL,\n ConnectorClientError,\n RequiredError,\n UnauthorizedError,\n ForbiddenError,\n TooManyRequestsError,\n RateLimitBanError,\n ServerError,\n NetworkError,\n NotFoundError,\n BadRequestError,\n} from '@binance/common';\n","import { platform, arch } from 'os';\nimport { 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 if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(config.configurationRestAPI);\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': `${name}/${version} (Node.js/${process.version}; ${platform()}; ${arch()})`,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n","{\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\": \"1.0.0\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"tsup\",\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 \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsup\": \"^7.2.0\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"1.0.0\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Public Fiat REST API\n *\n * OpenAPI Specification for the Binance Public 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","/**\n * Binance Public Fiat REST API\n *\n * OpenAPI Specification for the Binance Public 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 GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\n} from '../types';\n\n/**\n * FiatApi - axios parameter creator\n */\nconst FiatApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\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: 90000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {string} transactionType 0-buy,1-sell\n * @param {number} [beginTime]\n * @param {number} [endTime]\n * @param {number} [page] default 1\n * @param {number} [rows] default 100, max 500\n * @param {number} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatDepositWithdrawHistory: async (\n transactionType: string,\n beginTime?: number,\n endTime?: number,\n page?: number,\n rows?: number,\n recvWindow?: number\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\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\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 params: localVarQueryParameter,\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} [beginTime]\n * @param {number} [endTime]\n * @param {number} [page] default 1\n * @param {number} [rows] default 100, max 500\n * @param {number} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatPaymentsHistory: async (\n transactionType: string,\n beginTime?: number,\n endTime?: number,\n page?: number,\n rows?: number,\n recvWindow?: number\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\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\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 params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * FiatApi - interface\n * @interface FiatApi\n */\nexport interface FiatApiInterface {\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: 90000\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\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}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly beginTime?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly endTime?: number;\n\n /**\n * default 1\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly page?: number;\n\n /**\n * default 100, max 500\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly rows?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly recvWindow?: number;\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}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly beginTime?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly endTime?: number;\n\n /**\n * default 1\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly page?: number;\n\n /**\n * default 100, max 500\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly rows?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly recvWindow?: number;\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 * 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: 90000\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.params,\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.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Public Fiat REST API\n *\n * OpenAPI Specification for the Binance Public 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 GetFiatDepositWithdrawHistoryRequest,\n GetFiatPaymentsHistoryRequest,\n} from './modules/fiat-api';\n\nimport type {\n GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\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 params - Query 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 params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined);\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 params - Query 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 params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined, {\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: 90000\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 * @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 * @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}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;AAAA;AAAA,EAeA,8BACI,mBAC+D;AAC/D,WAAO,KAAK,QAAQ,8BAA8B,iBAAiB;AAAA,EACvE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAoBA,uBACI,mBACwD;AACxD,WAAO,KAAK,QAAQ,uBAAuB,iBAAiB;AAAA,EAChE;AACJ;;;AJtGO,IAAM,OAAN,MAAW;AAAA,EAGd,YAAY,QAA2B;AACnC,QAAI,QAAQ,sBAAsB;AAC9B,YAAM,gBAAgB,IAAI,oCAAqB,OAAO,oBAAoB;AAC1E,oBAAc,WAAW,cAAc,YAAY;AACnD,oBAAc,cAAc,cAAc,eAAe,CAAC;AAC1D,oBAAc,YAAY,UAAU;AAAA,QAChC,GAAI,cAAc,YAAY,WAAW,CAAC;AAAA,QAC1C,cAAc,GAAG,IAAI,IAAI,OAAO,aAAa,QAAQ,OAAO,SAAK,oBAAS,CAAC,SAAK,gBAAK,CAAC;AAAA,MAC1F;AACA,WAAK,UAAU,IAAI,QAAQ,aAAa;AAAA,IAC5C;AAAA,EACJ;AACJ;;;ADrBA,IAAAC,iBAaO;","names":["import_common","import_common","import_common"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/fiat.ts","../package.json","../src/rest-api/index.ts","../src/rest-api/modules/fiat-api.ts","../src/rest-api/rest-api.ts"],"sourcesContent":["export { Fiat, ConfigurationFiat } from './fiat';\nexport * as FiatRestAPI from './rest-api';\n\nexport {\n FIAT_REST_API_PROD_URL,\n ConnectorClientError,\n RequiredError,\n UnauthorizedError,\n ForbiddenError,\n TooManyRequestsError,\n RateLimitBanError,\n ServerError,\n NetworkError,\n NotFoundError,\n BadRequestError,\n} from '@binance/common';\n","import { platform, arch } from 'os';\nimport { 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 if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(config.configurationRestAPI);\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': `${name}/${version} (Node.js/${process.version}; ${platform()}; ${arch()})`,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n","{\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\": \"1.0.1\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"tsup\",\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 \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsup\": \"^8.4.0\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"1.0.1\",\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\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\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 GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\n} from '../types';\n\n/**\n * FiatApi - axios parameter creator\n */\nconst FiatApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\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: 90000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {string} transactionType 0-buy,1-sell\n * @param {number} [beginTime]\n * @param {number} [endTime]\n * @param {number} [page] default 1\n * @param {number} [rows] default 100, max 500\n * @param {number} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatDepositWithdrawHistory: async (\n transactionType: string,\n beginTime?: number,\n endTime?: number,\n page?: number,\n rows?: number,\n recvWindow?: number\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\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\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 params: localVarQueryParameter,\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} [beginTime]\n * @param {number} [endTime]\n * @param {number} [page] default 1\n * @param {number} [rows] default 100, max 500\n * @param {number} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatPaymentsHistory: async (\n transactionType: string,\n beginTime?: number,\n endTime?: number,\n page?: number,\n rows?: number,\n recvWindow?: number\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\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\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 params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * FiatApi - interface\n * @interface FiatApi\n */\nexport interface FiatApiInterface {\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: 90000\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\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}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly beginTime?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly endTime?: number;\n\n /**\n * default 1\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly page?: number;\n\n /**\n * default 100, max 500\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly rows?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly recvWindow?: number;\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}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly beginTime?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly endTime?: number;\n\n /**\n * default 1\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly page?: number;\n\n /**\n * default 100, max 500\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly rows?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly recvWindow?: number;\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 * 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: 90000\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.params,\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.params,\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 GetFiatDepositWithdrawHistoryRequest,\n GetFiatPaymentsHistoryRequest,\n} from './modules/fiat-api';\n\nimport type {\n GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\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 params - Query 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 params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined);\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 params - Query 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 params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined, {\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: 90000\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 * @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 * @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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,gBAA+B;AAC/B,IAAAA,iBAA6D;;;ACAzD,WAAQ;AAER,cAAW;;;ACHf;AAAA;AAAA;AAAA;AAAA;;;ACaA,oBAOO;AASP,IAAM,2BAA2B,SAAU,eAAqC;AAC5E,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAkBH,+BAA+B,OAC3B,iBACA,WACA,SACA,MACA,MACA,eACuB;AAEvB,2CAAkB,iCAAiC,mBAAmB,eAAe;AAErF,YAAM,yBAAkD,CAAC;AAEzD,UAAI,oBAAoB,UAAa,oBAAoB,MAAM;AAC3D,+BAAuB,iBAAiB,IAAI;AAAA,MAChD;AAEA,UAAI,cAAc,UAAa,cAAc,MAAM;AAC/C,+BAAuB,WAAW,IAAI;AAAA,MAC1C;AAEA,UAAI,YAAY,UAAa,YAAY,MAAM;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J;;;ADrBA,IAAAC,iBAYO;","names":["import_common","import_common","import_common"]}
package/dist/index.mjs CHANGED
@@ -10,7 +10,7 @@ import { ConfigurationRestAPI as ConfigurationRestAPI3, FIAT_REST_API_PROD_URL }
10
10
 
11
11
  // package.json
12
12
  var name = "@binance/fiat";
13
- var version = "1.0.0";
13
+ var version = "1.0.1";
14
14
 
15
15
  // src/rest-api/index.ts
16
16
  var rest_api_exports = {};
@@ -65,8 +65,7 @@ var FiatApiAxiosParamCreator = function(configuration) {
65
65
  localVarQueryParameter["recvWindow"] = recvWindow;
66
66
  }
67
67
  let _timeUnit;
68
- if ("timeUnit" in configuration)
69
- _timeUnit = configuration.timeUnit;
68
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
70
69
  return {
71
70
  endpoint: "/sapi/v1/fiat/orders",
72
71
  method: "GET",
@@ -118,8 +117,7 @@ var FiatApiAxiosParamCreator = function(configuration) {
118
117
  localVarQueryParameter["recvWindow"] = recvWindow;
119
118
  }
120
119
  let _timeUnit;
121
- if ("timeUnit" in configuration)
122
- _timeUnit = configuration.timeUnit;
120
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
123
121
  return {
124
122
  endpoint: "/sapi/v1/fiat/payments",
125
123
  method: "GET",
@@ -294,7 +292,6 @@ var Fiat = class {
294
292
  // src/index.ts
295
293
  import {
296
294
  FIAT_REST_API_PROD_URL as FIAT_REST_API_PROD_URL2,
297
- FIAT_REST_API_TESTNET_URL,
298
295
  ConnectorClientError,
299
296
  RequiredError,
300
297
  UnauthorizedError,
@@ -310,7 +307,6 @@ export {
310
307
  BadRequestError,
311
308
  ConnectorClientError,
312
309
  FIAT_REST_API_PROD_URL2 as FIAT_REST_API_PROD_URL,
313
- FIAT_REST_API_TESTNET_URL,
314
310
  Fiat,
315
311
  rest_api_exports as FiatRestAPI,
316
312
  ForbiddenError,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/fiat.ts","../package.json","../src/rest-api/index.ts","../src/rest-api/modules/fiat-api.ts","../src/rest-api/rest-api.ts","../src/index.ts"],"sourcesContent":["import { platform, arch } from 'os';\nimport { 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 if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(config.configurationRestAPI);\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': `${name}/${version} (Node.js/${process.version}; ${platform()}; ${arch()})`,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n","{\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\": \"1.0.0\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"tsup\",\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 \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsup\": \"^7.2.0\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"1.0.0\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Public Fiat REST API\n *\n * OpenAPI Specification for the Binance Public 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","/**\n * Binance Public Fiat REST API\n *\n * OpenAPI Specification for the Binance Public 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 GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\n} from '../types';\n\n/**\n * FiatApi - axios parameter creator\n */\nconst FiatApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\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: 90000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {string} transactionType 0-buy,1-sell\n * @param {number} [beginTime]\n * @param {number} [endTime]\n * @param {number} [page] default 1\n * @param {number} [rows] default 100, max 500\n * @param {number} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatDepositWithdrawHistory: async (\n transactionType: string,\n beginTime?: number,\n endTime?: number,\n page?: number,\n rows?: number,\n recvWindow?: number\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\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\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 params: localVarQueryParameter,\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} [beginTime]\n * @param {number} [endTime]\n * @param {number} [page] default 1\n * @param {number} [rows] default 100, max 500\n * @param {number} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatPaymentsHistory: async (\n transactionType: string,\n beginTime?: number,\n endTime?: number,\n page?: number,\n rows?: number,\n recvWindow?: number\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\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\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 params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * FiatApi - interface\n * @interface FiatApi\n */\nexport interface FiatApiInterface {\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: 90000\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\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}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly beginTime?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly endTime?: number;\n\n /**\n * default 1\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly page?: number;\n\n /**\n * default 100, max 500\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly rows?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly recvWindow?: number;\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}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly beginTime?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly endTime?: number;\n\n /**\n * default 1\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly page?: number;\n\n /**\n * default 100, max 500\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly rows?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly recvWindow?: number;\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 * 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: 90000\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.params,\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.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Public Fiat REST API\n *\n * OpenAPI Specification for the Binance Public 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 GetFiatDepositWithdrawHistoryRequest,\n GetFiatPaymentsHistoryRequest,\n} from './modules/fiat-api';\n\nimport type {\n GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\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 params - Query 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 params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined);\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 params - Query 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 params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined, {\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: 90000\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 * @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 * @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","export { Fiat, ConfigurationFiat } from './fiat';\nexport * as FiatRestAPI from './rest-api';\n\nexport {\n FIAT_REST_API_PROD_URL,\n FIAT_REST_API_TESTNET_URL,\n ConnectorClientError,\n RequiredError,\n UnauthorizedError,\n ForbiddenError,\n TooManyRequestsError,\n RateLimitBanError,\n ServerError,\n NetworkError,\n NotFoundError,\n BadRequestError,\n} from '@binance/common';\n"],"mappings":";;;;;;;AAAA,SAAS,UAAU,YAAY;AAC/B,SAAS,wBAAAA,uBAAsB,8BAA8B;;;ACAzD,WAAQ;AAER,cAAW;;;ACHf;AAAA;AAAA;AAAA;AAAA;;;ACaA;AAAA,EAII;AAAA,EACA;AAAA,OAEG;AASP,IAAM,2BAA2B,SAAU,eAAqC;AAC5E,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;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;AAC9B,YAAM,gBAAgB,IAAIC,sBAAqB,OAAO,oBAAoB;AAC1E,oBAAc,WAAW,cAAc,YAAY;AACnD,oBAAc,cAAc,cAAc,eAAe,CAAC;AAC1D,oBAAc,YAAY,UAAU;AAAA,QAChC,GAAI,cAAc,YAAY,WAAW,CAAC;AAAA,QAC1C,cAAc,GAAG,IAAI,IAAI,OAAO,aAAa,QAAQ,OAAO,KAAK,SAAS,CAAC,KAAK,KAAK,CAAC;AAAA,MAC1F;AACA,WAAK,UAAU,IAAI,QAAQ,aAAa;AAAA,IAC5C;AAAA,EACJ;AACJ;;;AKrBA;AAAA,EACI,0BAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;","names":["ConfigurationRestAPI","sendRequest","sendRequest","ConfigurationRestAPI","FIAT_REST_API_PROD_URL"]}
1
+ {"version":3,"sources":["../src/fiat.ts","../package.json","../src/rest-api/index.ts","../src/rest-api/modules/fiat-api.ts","../src/rest-api/rest-api.ts","../src/index.ts"],"sourcesContent":["import { platform, arch } from 'os';\nimport { 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 if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(config.configurationRestAPI);\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': `${name}/${version} (Node.js/${process.version}; ${platform()}; ${arch()})`,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n","{\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\": \"1.0.1\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"tsup\",\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 \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsup\": \"^8.4.0\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"1.0.1\",\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\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\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 GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\n} from '../types';\n\n/**\n * FiatApi - axios parameter creator\n */\nconst FiatApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\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: 90000\n *\n * @summary Get Fiat Deposit/Withdraw History (USER_DATA)\n * @param {string} transactionType 0-buy,1-sell\n * @param {number} [beginTime]\n * @param {number} [endTime]\n * @param {number} [page] default 1\n * @param {number} [rows] default 100, max 500\n * @param {number} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatDepositWithdrawHistory: async (\n transactionType: string,\n beginTime?: number,\n endTime?: number,\n page?: number,\n rows?: number,\n recvWindow?: number\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\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\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 params: localVarQueryParameter,\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} [beginTime]\n * @param {number} [endTime]\n * @param {number} [page] default 1\n * @param {number} [rows] default 100, max 500\n * @param {number} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFiatPaymentsHistory: async (\n transactionType: string,\n beginTime?: number,\n endTime?: number,\n page?: number,\n rows?: number,\n recvWindow?: number\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\n if (transactionType !== undefined && transactionType !== null) {\n localVarQueryParameter['transactionType'] = transactionType;\n }\n\n if (beginTime !== undefined && beginTime !== null) {\n localVarQueryParameter['beginTime'] = beginTime;\n }\n\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n\n if (page !== undefined && page !== null) {\n localVarQueryParameter['page'] = page;\n }\n\n if (rows !== undefined && rows !== null) {\n localVarQueryParameter['rows'] = rows;\n }\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 params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * FiatApi - interface\n * @interface FiatApi\n */\nexport interface FiatApiInterface {\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: 90000\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\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}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly beginTime?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly endTime?: number;\n\n /**\n * default 1\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly page?: number;\n\n /**\n * default 100, max 500\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly rows?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatDepositWithdrawHistory\n */\n readonly recvWindow?: number;\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}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly beginTime?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly endTime?: number;\n\n /**\n * default 1\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly page?: number;\n\n /**\n * default 100, max 500\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly rows?: number;\n\n /**\n *\n * @type {number}\n * @memberof FiatApiGetFiatPaymentsHistory\n */\n readonly recvWindow?: number;\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 * 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: 90000\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.params,\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.params,\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 GetFiatDepositWithdrawHistoryRequest,\n GetFiatPaymentsHistoryRequest,\n} from './modules/fiat-api';\n\nimport type {\n GetFiatDepositWithdrawHistoryResponse,\n GetFiatPaymentsHistoryResponse,\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 params - Query 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 params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined);\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 params - Query 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 params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined, {\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: 90000\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 * @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 * @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","export { Fiat, ConfigurationFiat } from './fiat';\nexport * as FiatRestAPI from './rest-api';\n\nexport {\n FIAT_REST_API_PROD_URL,\n ConnectorClientError,\n RequiredError,\n UnauthorizedError,\n ForbiddenError,\n TooManyRequestsError,\n RateLimitBanError,\n ServerError,\n NetworkError,\n NotFoundError,\n BadRequestError,\n} from '@binance/common';\n"],"mappings":";;;;;;;AAAA,SAAS,UAAU,YAAY;AAC/B,SAAS,wBAAAA,uBAAsB,8BAA8B;;;ACAzD,WAAQ;AAER,cAAW;;;ACHf;AAAA;AAAA;AAAA;AAAA;;;ACaA;AAAA,EAII;AAAA,EACA;AAAA,OAEG;AASP,IAAM,2BAA2B,SAAU,eAAqC;AAC5E,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAkBH,+BAA+B,OAC3B,iBACA,WACA,SACA,MACA,MACA,eACuB;AAEvB,wBAAkB,iCAAiC,mBAAmB,eAAe;AAErF,YAAM,yBAAkD,CAAC;AAEzD,UAAI,oBAAoB,UAAa,oBAAoB,MAAM;AAC3D,+BAAuB,iBAAiB,IAAI;AAAA,MAChD;AAEA,UAAI,cAAc,UAAa,cAAc,MAAM;AAC/C,+BAAuB,WAAW,IAAI;AAAA,MAC1C;AAEA,UAAI,YAAY,UAAa,YAAY,MAAM;AAC3C,+BAAuB,SAAS,IAAI;AAAA,MACxC;AAEA,UAAI,SAAS,UAAa,SAAS,MAAM;AACrC,+BAAuB,MAAM,IAAI;AAAA,MACrC;AAEA,UAAI,SAAS,UAAa,SAAS,MAAM;AACrC,+BAAuB,MAAM,IAAI;AAAA,MACrC;AAEA,UAAI,eAAe,UAAa,eAAe,MAAM;AACjD,+BAAuB,YAAY,IAA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,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": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
@@ -44,12 +44,12 @@
44
44
  "prettier": "^3.3.3",
45
45
  "ts-jest": "^29.1.1",
46
46
  "ts-node": "^10.9.1",
47
- "tsup": "^7.2.0",
47
+ "tsup": "^8.4.0",
48
48
  "typescript": "^5.7.2",
49
49
  "typescript-eslint": "^8.24.0"
50
50
  },
51
51
  "dependencies": {
52
- "@binance/common": "1.0.0",
52
+ "@binance/common": "1.0.1",
53
53
  "axios": "^1.7.4"
54
54
  }
55
55
  }