@binance/c2c 4.0.0 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,237 +1,247 @@
1
- "use strict";
1
+ //#region rolldown:runtime
2
2
  var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name2 in all)
8
- __defProp(target, name2, { get: all[name2], enumerable: true });
3
+ var __export = (all) => {
4
+ let target = {};
5
+ for (var name$1 in all) __defProp(target, name$1, {
6
+ get: all[name$1],
7
+ enumerable: true
8
+ });
9
+ return target;
9
10
  };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
11
 
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- BadRequestError: () => import_common4.BadRequestError,
24
- C2C: () => C2C,
25
- C2CRestAPI: () => rest_api_exports,
26
- C2C_REST_API_PROD_URL: () => import_common4.C2C_REST_API_PROD_URL,
27
- ConnectorClientError: () => import_common4.ConnectorClientError,
28
- ForbiddenError: () => import_common4.ForbiddenError,
29
- NetworkError: () => import_common4.NetworkError,
30
- NotFoundError: () => import_common4.NotFoundError,
31
- RateLimitBanError: () => import_common4.RateLimitBanError,
32
- RequiredError: () => import_common4.RequiredError,
33
- ServerError: () => import_common4.ServerError,
34
- TooManyRequestsError: () => import_common4.TooManyRequestsError,
35
- UnauthorizedError: () => import_common4.UnauthorizedError
36
- });
37
- module.exports = __toCommonJS(index_exports);
12
+ //#endregion
13
+ let __binance_common = require("@binance/common");
38
14
 
39
- // src/c2c.ts
40
- var import_common3 = require("@binance/common");
41
-
42
- // package.json
15
+ //#region package.json
43
16
  var name = "@binance/c2c";
44
- var version = "4.0.0";
45
-
46
- // src/rest-api/index.ts
47
- var rest_api_exports = {};
48
- __export(rest_api_exports, {
49
- C2CApi: () => C2CApi,
50
- RestAPI: () => RestAPI
51
- });
17
+ var version = "4.0.2";
52
18
 
53
- // src/rest-api/modules/c2-capi.ts
54
- var import_common = require("@binance/common");
55
- var C2CApiAxiosParamCreator = function(configuration) {
56
- return {
57
- /**
58
- * Get C2C Trade History
59
- *
60
- * The max interval between startTimestamp and endTimestamp is 30 days.
61
- * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be returned.
62
- * You can only view data from the past 6 months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder
63
- *
64
- * Weight: 1
65
- *
66
- * @summary Get C2C Trade History (USER_DATA)
67
- * @param {string} [tradeType] BUY, SELL
68
- * @param {number | bigint} [startTimestamp]
69
- * @param {number | bigint} [endTimestamp]
70
- * @param {number | bigint} [page] Default 1
71
- * @param {number | bigint} [rows] default 100, max 100
72
- * @param {number | bigint} [recvWindow]
73
- *
74
- * @throws {RequiredError}
75
- */
76
- getC2CTradeHistory: async (tradeType, startTimestamp, endTimestamp, page, rows, recvWindow) => {
77
- const localVarQueryParameter = {};
78
- if (tradeType !== void 0 && tradeType !== null) {
79
- localVarQueryParameter["tradeType"] = tradeType;
80
- }
81
- if (startTimestamp !== void 0 && startTimestamp !== null) {
82
- localVarQueryParameter["startTimestamp"] = startTimestamp;
83
- }
84
- if (endTimestamp !== void 0 && endTimestamp !== null) {
85
- localVarQueryParameter["endTimestamp"] = endTimestamp;
86
- }
87
- if (page !== void 0 && page !== null) {
88
- localVarQueryParameter["page"] = page;
89
- }
90
- if (rows !== void 0 && rows !== null) {
91
- localVarQueryParameter["rows"] = rows;
92
- }
93
- if (recvWindow !== void 0 && recvWindow !== null) {
94
- localVarQueryParameter["recvWindow"] = recvWindow;
95
- }
96
- let _timeUnit;
97
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
98
- return {
99
- endpoint: "/sapi/v1/c2c/orderMatch/listUserOrderHistory",
100
- method: "GET",
101
- params: localVarQueryParameter,
102
- timeUnit: _timeUnit
103
- };
104
- }
105
- };
19
+ //#endregion
20
+ //#region src/rest-api/modules/c2-capi.ts
21
+ /**
22
+ * Binance C2C REST API
23
+ *
24
+ * OpenAPI Specification for the Binance C2C REST API
25
+ *
26
+ * The version of the OpenAPI document: 1.0.0
27
+ *
28
+ *
29
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
30
+ * https://openapi-generator.tech
31
+ * Do not edit the class manually.
32
+ */
33
+ /**
34
+ * C2CApi - axios parameter creator
35
+ */
36
+ const C2CApiAxiosParamCreator = function(configuration) {
37
+ return { getC2CTradeHistory: async (tradeType, startTimestamp, endTimestamp, page, rows, recvWindow) => {
38
+ const localVarQueryParameter = {};
39
+ if (tradeType !== void 0 && tradeType !== null) localVarQueryParameter["tradeType"] = tradeType;
40
+ if (startTimestamp !== void 0 && startTimestamp !== null) localVarQueryParameter["startTimestamp"] = startTimestamp;
41
+ if (endTimestamp !== void 0 && endTimestamp !== null) localVarQueryParameter["endTimestamp"] = endTimestamp;
42
+ if (page !== void 0 && page !== null) localVarQueryParameter["page"] = page;
43
+ if (rows !== void 0 && rows !== null) localVarQueryParameter["rows"] = rows;
44
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
45
+ let _timeUnit;
46
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
47
+ return {
48
+ endpoint: "/sapi/v1/c2c/orderMatch/listUserOrderHistory",
49
+ method: "GET",
50
+ params: localVarQueryParameter,
51
+ timeUnit: _timeUnit
52
+ };
53
+ } };
106
54
  };
55
+ /**
56
+ * C2CApi - object-oriented interface
57
+ * @class C2CApi
58
+ */
107
59
  var C2CApi = class {
108
- constructor(configuration) {
109
- this.configuration = configuration;
110
- this.localVarAxiosParamCreator = C2CApiAxiosParamCreator(configuration);
111
- }
112
- /**
113
- * Get C2C Trade History
114
- *
115
- * The max interval between startTimestamp and endTimestamp is 30 days.
116
- * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be returned.
117
- * You can only view data from the past 6 months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder
118
- *
119
- * Weight: 1
120
- *
121
- * @summary Get C2C Trade History (USER_DATA)
122
- * @param {GetC2CTradeHistoryRequest} requestParameters Request parameters.
123
- * @returns {Promise<RestApiResponse<GetC2CTradeHistoryResponse>>}
124
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
125
- * @memberof C2CApi
126
- * @see {@link https://developers.binance.com/docs/c2c/rest-api/Get-C2C-Trade-History Binance API Documentation}
127
- */
128
- async getC2CTradeHistory(requestParameters = {}) {
129
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getC2CTradeHistory(
130
- requestParameters?.tradeType,
131
- requestParameters?.startTimestamp,
132
- requestParameters?.endTimestamp,
133
- requestParameters?.page,
134
- requestParameters?.rows,
135
- requestParameters?.recvWindow
136
- );
137
- return (0, import_common.sendRequest)(
138
- this.configuration,
139
- localVarAxiosArgs.endpoint,
140
- localVarAxiosArgs.method,
141
- localVarAxiosArgs.params,
142
- localVarAxiosArgs?.timeUnit,
143
- { isSigned: true }
144
- );
145
- }
60
+ constructor(configuration) {
61
+ this.configuration = configuration;
62
+ this.localVarAxiosParamCreator = C2CApiAxiosParamCreator(configuration);
63
+ }
64
+ /**
65
+ * Get C2C Trade History
66
+ *
67
+ * The max interval between startTimestamp and endTimestamp is 30 days.
68
+ * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be returned.
69
+ * You can only view data from the past 6 months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder
70
+ *
71
+ * Weight: 1
72
+ *
73
+ * @summary Get C2C Trade History (USER_DATA)
74
+ * @param {GetC2CTradeHistoryRequest} requestParameters Request parameters.
75
+ * @returns {Promise<RestApiResponse<GetC2CTradeHistoryResponse>>}
76
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
77
+ * @memberof C2CApi
78
+ * @see {@link https://developers.binance.com/docs/c2c/rest-api/Get-C2C-Trade-History Binance API Documentation}
79
+ */
80
+ async getC2CTradeHistory(requestParameters = {}) {
81
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getC2CTradeHistory(requestParameters?.tradeType, requestParameters?.startTimestamp, requestParameters?.endTimestamp, requestParameters?.page, requestParameters?.rows, requestParameters?.recvWindow);
82
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
83
+ }
146
84
  };
147
85
 
148
- // src/rest-api/rest-api.ts
149
- var import_common2 = require("@binance/common");
86
+ //#endregion
87
+ //#region src/rest-api/rest-api.ts
88
+ /**
89
+ * Binance C2C REST API
90
+ *
91
+ * OpenAPI Specification for the Binance C2C REST API
92
+ *
93
+ * The version of the OpenAPI document: 1.0.0
94
+ *
95
+ *
96
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
97
+ * https://openapi-generator.tech
98
+ * Do not edit the class manually.
99
+ */
150
100
  var RestAPI = class {
151
- constructor(configuration) {
152
- this.configuration = configuration;
153
- this.c2CApi = new C2CApi(configuration);
154
- }
155
- /**
156
- * Generic function to send a request.
157
- * @param endpoint - The API endpoint to call.
158
- * @param method - HTTP method to use (GET, POST, DELETE, etc.).
159
- * @param params - Query parameters for the request.
160
- *
161
- * @returns A promise resolving to the response data object.
162
- */
163
- sendRequest(endpoint, method, params = {}) {
164
- return (0, import_common2.sendRequest)(this.configuration, endpoint, method, params, void 0);
165
- }
166
- /**
167
- * Generic function to send a signed request.
168
- * @param endpoint - The API endpoint to call.
169
- * @param method - HTTP method to use (GET, POST, DELETE, etc.).
170
- * @param params - Query parameters for the request.
171
- *
172
- * @returns A promise resolving to the response data object.
173
- */
174
- sendSignedRequest(endpoint, method, params = {}) {
175
- return (0, import_common2.sendRequest)(this.configuration, endpoint, method, params, void 0, {
176
- isSigned: true
177
- });
178
- }
179
- /**
180
- * Get C2C Trade History
181
- *
182
- * The max interval between startTimestamp and endTimestamp is 30 days.
183
- * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be returned.
184
- * You can only view data from the past 6 months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder
185
- *
186
- * Weight: 1
187
- *
188
- * @summary Get C2C Trade History (USER_DATA)
189
- * @param {GetC2CTradeHistoryRequest} requestParameters Request parameters.
190
- *
191
- * @returns {Promise<RestApiResponse<GetC2CTradeHistoryResponse>>}
192
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
193
- * @see {@link https://developers.binance.com/docs/c2c/rest-api/Get-C2C-Trade-History Binance API Documentation}
194
- */
195
- getC2CTradeHistory(requestParameters = {}) {
196
- return this.c2CApi.getC2CTradeHistory(requestParameters);
197
- }
101
+ constructor(configuration) {
102
+ this.configuration = configuration;
103
+ this.c2CApi = new C2CApi(configuration);
104
+ }
105
+ /**
106
+ * Generic function to send a request.
107
+ * @param endpoint - The API endpoint to call.
108
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
109
+ * @param params - Query parameters for the request.
110
+ *
111
+ * @returns A promise resolving to the response data object.
112
+ */
113
+ sendRequest(endpoint, method, params = {}) {
114
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, params, void 0);
115
+ }
116
+ /**
117
+ * Generic function to send a signed request.
118
+ * @param endpoint - The API endpoint to call.
119
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
120
+ * @param params - Query parameters for the request.
121
+ *
122
+ * @returns A promise resolving to the response data object.
123
+ */
124
+ sendSignedRequest(endpoint, method, params = {}) {
125
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, params, void 0, { isSigned: true });
126
+ }
127
+ /**
128
+ * Get C2C Trade History
129
+ *
130
+ * The max interval between startTimestamp and endTimestamp is 30 days.
131
+ * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be returned.
132
+ * You can only view data from the past 6 months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder
133
+ *
134
+ * Weight: 1
135
+ *
136
+ * @summary Get C2C Trade History (USER_DATA)
137
+ * @param {GetC2CTradeHistoryRequest} requestParameters Request parameters.
138
+ *
139
+ * @returns {Promise<RestApiResponse<GetC2CTradeHistoryResponse>>}
140
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
141
+ * @see {@link https://developers.binance.com/docs/c2c/rest-api/Get-C2C-Trade-History Binance API Documentation}
142
+ */
143
+ getC2CTradeHistory(requestParameters = {}) {
144
+ return this.c2CApi.getC2CTradeHistory(requestParameters);
145
+ }
198
146
  };
199
147
 
200
- // src/c2c.ts
148
+ //#endregion
149
+ //#region src/rest-api/index.ts
150
+ var rest_api_exports = /* @__PURE__ */ __export({
151
+ C2CApi: () => C2CApi,
152
+ RestAPI: () => RestAPI
153
+ });
154
+
155
+ //#endregion
156
+ //#region src/c2c.ts
201
157
  var C2C = class {
202
- constructor(config) {
203
- const userAgent = (0, import_common3.buildUserAgent)(name, version);
204
- if (config?.configurationRestAPI) {
205
- const configRestAPI = new import_common3.ConfigurationRestAPI(
206
- config.configurationRestAPI
207
- );
208
- configRestAPI.basePath = configRestAPI.basePath || import_common3.C2C_REST_API_PROD_URL;
209
- configRestAPI.baseOptions = configRestAPI.baseOptions || {};
210
- configRestAPI.baseOptions.headers = {
211
- ...configRestAPI.baseOptions.headers || {},
212
- "User-Agent": userAgent
213
- };
214
- this.restAPI = new RestAPI(configRestAPI);
215
- }
216
- }
158
+ constructor(config) {
159
+ const userAgent = (0, __binance_common.buildUserAgent)(name, version);
160
+ if (config?.configurationRestAPI) {
161
+ const configRestAPI = new __binance_common.ConfigurationRestAPI(config.configurationRestAPI);
162
+ configRestAPI.basePath = configRestAPI.basePath || __binance_common.C2C_REST_API_PROD_URL;
163
+ configRestAPI.baseOptions = configRestAPI.baseOptions || {};
164
+ configRestAPI.baseOptions.headers = {
165
+ ...configRestAPI.baseOptions.headers || {},
166
+ "User-Agent": userAgent
167
+ };
168
+ this.restAPI = new RestAPI(configRestAPI);
169
+ }
170
+ }
217
171
  };
218
172
 
219
- // src/index.ts
220
- var import_common4 = require("@binance/common");
221
- // Annotate the CommonJS export names for ESM import in node:
222
- 0 && (module.exports = {
223
- BadRequestError,
224
- C2C,
225
- C2CRestAPI,
226
- C2C_REST_API_PROD_URL,
227
- ConnectorClientError,
228
- ForbiddenError,
229
- NetworkError,
230
- NotFoundError,
231
- RateLimitBanError,
232
- RequiredError,
233
- ServerError,
234
- TooManyRequestsError,
235
- UnauthorizedError
173
+ //#endregion
174
+ Object.defineProperty(exports, 'BadRequestError', {
175
+ enumerable: true,
176
+ get: function () {
177
+ return __binance_common.BadRequestError;
178
+ }
179
+ });
180
+ exports.C2C = C2C;
181
+ Object.defineProperty(exports, 'C2CRestAPI', {
182
+ enumerable: true,
183
+ get: function () {
184
+ return rest_api_exports;
185
+ }
186
+ });
187
+ Object.defineProperty(exports, 'C2C_REST_API_PROD_URL', {
188
+ enumerable: true,
189
+ get: function () {
190
+ return __binance_common.C2C_REST_API_PROD_URL;
191
+ }
192
+ });
193
+ Object.defineProperty(exports, 'ConnectorClientError', {
194
+ enumerable: true,
195
+ get: function () {
196
+ return __binance_common.ConnectorClientError;
197
+ }
198
+ });
199
+ Object.defineProperty(exports, 'ForbiddenError', {
200
+ enumerable: true,
201
+ get: function () {
202
+ return __binance_common.ForbiddenError;
203
+ }
204
+ });
205
+ Object.defineProperty(exports, 'NetworkError', {
206
+ enumerable: true,
207
+ get: function () {
208
+ return __binance_common.NetworkError;
209
+ }
210
+ });
211
+ Object.defineProperty(exports, 'NotFoundError', {
212
+ enumerable: true,
213
+ get: function () {
214
+ return __binance_common.NotFoundError;
215
+ }
216
+ });
217
+ Object.defineProperty(exports, 'RateLimitBanError', {
218
+ enumerable: true,
219
+ get: function () {
220
+ return __binance_common.RateLimitBanError;
221
+ }
222
+ });
223
+ Object.defineProperty(exports, 'RequiredError', {
224
+ enumerable: true,
225
+ get: function () {
226
+ return __binance_common.RequiredError;
227
+ }
228
+ });
229
+ Object.defineProperty(exports, 'ServerError', {
230
+ enumerable: true,
231
+ get: function () {
232
+ return __binance_common.ServerError;
233
+ }
234
+ });
235
+ Object.defineProperty(exports, 'TooManyRequestsError', {
236
+ enumerable: true,
237
+ get: function () {
238
+ return __binance_common.TooManyRequestsError;
239
+ }
240
+ });
241
+ Object.defineProperty(exports, 'UnauthorizedError', {
242
+ enumerable: true,
243
+ get: function () {
244
+ return __binance_common.UnauthorizedError;
245
+ }
236
246
  });
237
247
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/c2c.ts","../package.json","../src/rest-api/index.ts","../src/rest-api/modules/c2-capi.ts","../src/rest-api/rest-api.ts"],"sourcesContent":["export { C2C, ConfigurationC2C } from './c2c';\nexport * as C2CRestAPI from './rest-api';\n\nexport {\n C2C_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 { buildUserAgent, ConfigurationRestAPI, C2C_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationC2C {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class C2C {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationC2C) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || C2C_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n","{\n \"name\": \"@binance/c2c\",\n \"description\": \"Official Binance C2C Connector - A lightweight library that provides a convenient interface to Binance's C2C REST API.\",\n \"version\": \"4.0.0\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && 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 \"C2C\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsup\": \"^8.4.0\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.0.0\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance C2C REST API\n *\n * OpenAPI Specification for the Binance C2C 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 C2C REST API\n *\n * OpenAPI Specification for the Binance C2C 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 sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetC2CTradeHistoryResponse } from '../types';\n\n/**\n * C2CApi - axios parameter creator\n */\nconst C2CApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get C2C Trade History\n *\n * The max interval between startTimestamp and endTimestamp is 30 days.\n * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be returned.\n * You can only view data from the past 6 months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder\n *\n * Weight: 1\n *\n * @summary Get C2C Trade History (USER_DATA)\n * @param {string} [tradeType] BUY, SELL\n * @param {number | bigint} [startTimestamp]\n * @param {number | bigint} [endTimestamp]\n * @param {number | bigint} [page] Default 1\n * @param {number | bigint} [rows] default 100, max 100\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getC2CTradeHistory: async (\n tradeType?: string,\n startTimestamp?: number | bigint,\n endTimestamp?: number | bigint,\n page?: number | bigint,\n rows?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (tradeType !== undefined && tradeType !== null) {\n localVarQueryParameter['tradeType'] = tradeType;\n }\n\n if (startTimestamp !== undefined && startTimestamp !== null) {\n localVarQueryParameter['startTimestamp'] = startTimestamp;\n }\n\n if (endTimestamp !== undefined && endTimestamp !== null) {\n localVarQueryParameter['endTimestamp'] = endTimestamp;\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/c2c/orderMatch/listUserOrderHistory',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * C2CApi - interface\n * @interface C2CApi\n */\nexport interface C2CApiInterface {\n /**\n * Get C2C Trade History\n *\n * The max interval between startTimestamp and endTimestamp is 30 days.\n * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be returned.\n * You can only view data from the past 6 months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder\n *\n * Weight: 1\n *\n * @summary Get C2C Trade History (USER_DATA)\n * @param {GetC2CTradeHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof C2CApiInterface\n */\n getC2CTradeHistory(\n requestParameters?: GetC2CTradeHistoryRequest\n ): Promise<RestApiResponse<GetC2CTradeHistoryResponse>>;\n}\n\n/**\n * Request parameters for getC2CTradeHistory operation in C2CApi.\n * @interface GetC2CTradeHistoryRequest\n */\nexport interface GetC2CTradeHistoryRequest {\n /**\n * BUY, SELL\n * @type {string}\n * @memberof C2CApiGetC2CTradeHistory\n */\n readonly tradeType?: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof C2CApiGetC2CTradeHistory\n */\n readonly startTimestamp?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof C2CApiGetC2CTradeHistory\n */\n readonly endTimestamp?: number | bigint;\n\n /**\n * Default 1\n * @type {number | bigint}\n * @memberof C2CApiGetC2CTradeHistory\n */\n readonly page?: number | bigint;\n\n /**\n * default 100, max 100\n * @type {number | bigint}\n * @memberof C2CApiGetC2CTradeHistory\n */\n readonly rows?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof C2CApiGetC2CTradeHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * C2CApi - object-oriented interface\n * @class C2CApi\n */\nexport class C2CApi implements C2CApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = C2CApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get C2C Trade History\n *\n * The max interval between startTimestamp and endTimestamp is 30 days.\n * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be returned.\n * You can only view data from the past 6 months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder\n *\n * Weight: 1\n *\n * @summary Get C2C Trade History (USER_DATA)\n * @param {GetC2CTradeHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetC2CTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof C2CApi\n * @see {@link https://developers.binance.com/docs/c2c/rest-api/Get-C2C-Trade-History Binance API Documentation}\n */\n public async getC2CTradeHistory(\n requestParameters: GetC2CTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetC2CTradeHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getC2CTradeHistory(\n requestParameters?.tradeType,\n requestParameters?.startTimestamp,\n requestParameters?.endTimestamp,\n requestParameters?.page,\n requestParameters?.rows,\n requestParameters?.recvWindow\n );\n return sendRequest<GetC2CTradeHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance C2C REST API\n *\n * OpenAPI Specification for the Binance C2C 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 { C2CApi } from './modules/c2-capi';\n\nimport type { GetC2CTradeHistoryRequest } from './modules/c2-capi';\n\nimport type { GetC2CTradeHistoryResponse } from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private c2CApi: C2CApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.c2CApi = new C2CApi(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 C2C Trade History\n *\n * The max interval between startTimestamp and endTimestamp is 30 days.\n * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be returned.\n * You can only view data from the past 6 months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder\n *\n * Weight: 1\n *\n * @summary Get C2C Trade History (USER_DATA)\n * @param {GetC2CTradeHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetC2CTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/c2c/rest-api/Get-C2C-Trade-History Binance API Documentation}\n */\n getC2CTradeHistory(\n requestParameters: GetC2CTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetC2CTradeHistoryResponse>> {\n return this.c2CApi.getC2CTradeHistory(requestParameters);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,iBAA4E;;;ACCxE,WAAQ;AAER,cAAW;;;ACHf;AAAA;AAAA;AAAA;AAAA;;;ACaA,oBAMO;AAMP,IAAM,0BAA0B,SAAU,eAAqC;AAC3E,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,I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BAYO;","names":["import_common","import_common","import_common"]}
1
+ {"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","C2C_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/c2-capi.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/c2c.ts"],"sourcesContent":["{\n \"name\": \"@binance/c2c\",\n \"description\": \"Official Binance C2C Connector - A lightweight library that provides a convenient interface to Binance's C2C REST API.\",\n \"version\": \"4.0.2\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"C2C\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.0.1\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance C2C REST API\n *\n * OpenAPI Specification for the Binance C2C 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 sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetC2CTradeHistoryResponse } from '../types';\n\n/**\n * C2CApi - axios parameter creator\n */\nconst C2CApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get C2C Trade History\n *\n * The max interval between startTimestamp and endTimestamp is 30 days.\n * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be returned.\n * You can only view data from the past 6 months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder\n *\n * Weight: 1\n *\n * @summary Get C2C Trade History (USER_DATA)\n * @param {string} [tradeType] BUY, SELL\n * @param {number | bigint} [startTimestamp]\n * @param {number | bigint} [endTimestamp]\n * @param {number | bigint} [page] Default 1\n * @param {number | bigint} [rows] default 100, max 100\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getC2CTradeHistory: async (\n tradeType?: string,\n startTimestamp?: number | bigint,\n endTimestamp?: number | bigint,\n page?: number | bigint,\n rows?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (tradeType !== undefined && tradeType !== null) {\n localVarQueryParameter['tradeType'] = tradeType;\n }\n\n if (startTimestamp !== undefined && startTimestamp !== null) {\n localVarQueryParameter['startTimestamp'] = startTimestamp;\n }\n\n if (endTimestamp !== undefined && endTimestamp !== null) {\n localVarQueryParameter['endTimestamp'] = endTimestamp;\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/c2c/orderMatch/listUserOrderHistory',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * C2CApi - interface\n * @interface C2CApi\n */\nexport interface C2CApiInterface {\n /**\n * Get C2C Trade History\n *\n * The max interval between startTimestamp and endTimestamp is 30 days.\n * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be returned.\n * You can only view data from the past 6 months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder\n *\n * Weight: 1\n *\n * @summary Get C2C Trade History (USER_DATA)\n * @param {GetC2CTradeHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof C2CApiInterface\n */\n getC2CTradeHistory(\n requestParameters?: GetC2CTradeHistoryRequest\n ): Promise<RestApiResponse<GetC2CTradeHistoryResponse>>;\n}\n\n/**\n * Request parameters for getC2CTradeHistory operation in C2CApi.\n * @interface GetC2CTradeHistoryRequest\n */\nexport interface GetC2CTradeHistoryRequest {\n /**\n * BUY, SELL\n * @type {string}\n * @memberof C2CApiGetC2CTradeHistory\n */\n readonly tradeType?: string;\n\n /**\n *\n * @type {number | bigint}\n * @memberof C2CApiGetC2CTradeHistory\n */\n readonly startTimestamp?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof C2CApiGetC2CTradeHistory\n */\n readonly endTimestamp?: number | bigint;\n\n /**\n * Default 1\n * @type {number | bigint}\n * @memberof C2CApiGetC2CTradeHistory\n */\n readonly page?: number | bigint;\n\n /**\n * default 100, max 100\n * @type {number | bigint}\n * @memberof C2CApiGetC2CTradeHistory\n */\n readonly rows?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof C2CApiGetC2CTradeHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * C2CApi - object-oriented interface\n * @class C2CApi\n */\nexport class C2CApi implements C2CApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = C2CApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get C2C Trade History\n *\n * The max interval between startTimestamp and endTimestamp is 30 days.\n * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be returned.\n * You can only view data from the past 6 months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder\n *\n * Weight: 1\n *\n * @summary Get C2C Trade History (USER_DATA)\n * @param {GetC2CTradeHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetC2CTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof C2CApi\n * @see {@link https://developers.binance.com/docs/c2c/rest-api/Get-C2C-Trade-History Binance API Documentation}\n */\n public async getC2CTradeHistory(\n requestParameters: GetC2CTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetC2CTradeHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getC2CTradeHistory(\n requestParameters?.tradeType,\n requestParameters?.startTimestamp,\n requestParameters?.endTimestamp,\n requestParameters?.page,\n requestParameters?.rows,\n requestParameters?.recvWindow\n );\n return sendRequest<GetC2CTradeHistoryResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance C2C REST API\n *\n * OpenAPI Specification for the Binance C2C 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 { C2CApi } from './modules/c2-capi';\n\nimport type { GetC2CTradeHistoryRequest } from './modules/c2-capi';\n\nimport type { GetC2CTradeHistoryResponse } from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private c2CApi: C2CApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.c2CApi = new C2CApi(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 C2C Trade History\n *\n * The max interval between startTimestamp and endTimestamp is 30 days.\n * If startTimestamp and endTimestamp are not sent, the recent 30 days' data will be returned.\n * You can only view data from the past 6 months. To see all C2C orders, please check https://c2c.binance.com/en/fiatOrder\n *\n * Weight: 1\n *\n * @summary Get C2C Trade History (USER_DATA)\n * @param {GetC2CTradeHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetC2CTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/c2c/rest-api/Get-C2C-Trade-History Binance API Documentation}\n */\n getC2CTradeHistory(\n requestParameters: GetC2CTradeHistoryRequest = {}\n ): Promise<RestApiResponse<GetC2CTradeHistoryResponse>> {\n return this.c2CApi.getC2CTradeHistory(requestParameters);\n }\n}\n","/**\n * Binance C2C REST API\n *\n * OpenAPI Specification for the Binance C2C REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import { buildUserAgent, ConfigurationRestAPI, C2C_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationC2C {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class C2C {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationC2C) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || C2C_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;WACY;cAEG;;;;;;;;;;;;;;;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