@binance/rebate 3.0.1 → 3.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.mjs CHANGED
@@ -1,211 +1,164 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name2 in all)
4
- __defProp(target, name2, { get: all[name2], enumerable: true });
5
- };
6
-
7
- // src/rebate.ts
8
- import { buildUserAgent, ConfigurationRestAPI as ConfigurationRestAPI3, REBATE_REST_API_PROD_URL } from "@binance/common";
1
+ import { t as __export } from "./chunk.mjs";
2
+ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenError, NetworkError, NotFoundError, REBATE_REST_API_PROD_URL, REBATE_REST_API_PROD_URL as REBATE_REST_API_PROD_URL$1, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError, buildUserAgent, sendRequest } from "@binance/common";
9
3
 
10
- // package.json
4
+ //#region package.json
11
5
  var name = "@binance/rebate";
12
- var version = "3.0.1";
13
-
14
- // src/rest-api/index.ts
15
- var rest_api_exports = {};
16
- __export(rest_api_exports, {
17
- RebateApi: () => RebateApi,
18
- RestAPI: () => RestAPI
19
- });
6
+ var version = "3.0.2";
20
7
 
21
- // src/rest-api/modules/rebate-api.ts
22
- import {
23
- sendRequest
24
- } from "@binance/common";
25
- var RebateApiAxiosParamCreator = function(configuration) {
26
- return {
27
- /**
28
- * Get Spot Rebate History Records
29
- *
30
- * The max interval between startTime and endTime is 30 days.
31
- * If startTime and endTime are not sent, the recent 7 days' data will be returned.
32
- * The earliest startTime is supported on June 10, 2020
33
- * Return up to 200 records per request.
34
- *
35
- * Weight: 12000
36
- *
37
- * @summary Get Spot Rebate History Records (USER_DATA)
38
- * @param {number | bigint} [startTime]
39
- * @param {number | bigint} [endTime]
40
- * @param {number | bigint} [page] Default 1
41
- * @param {number | bigint} [recvWindow]
42
- *
43
- * @throws {RequiredError}
44
- */
45
- getSpotRebateHistoryRecords: async (startTime, endTime, page, recvWindow) => {
46
- const localVarQueryParameter = {};
47
- if (startTime !== void 0 && startTime !== null) {
48
- localVarQueryParameter["startTime"] = startTime;
49
- }
50
- if (endTime !== void 0 && endTime !== null) {
51
- localVarQueryParameter["endTime"] = endTime;
52
- }
53
- if (page !== void 0 && page !== null) {
54
- localVarQueryParameter["page"] = page;
55
- }
56
- if (recvWindow !== void 0 && recvWindow !== null) {
57
- localVarQueryParameter["recvWindow"] = recvWindow;
58
- }
59
- let _timeUnit;
60
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
61
- return {
62
- endpoint: "/sapi/v1/rebate/taxQuery",
63
- method: "GET",
64
- params: localVarQueryParameter,
65
- timeUnit: _timeUnit
66
- };
67
- }
68
- };
8
+ //#endregion
9
+ //#region src/rest-api/modules/rebate-api.ts
10
+ /**
11
+ * Binance Rebate REST API
12
+ *
13
+ * OpenAPI Specification for the Binance Rebate REST API
14
+ *
15
+ * The version of the OpenAPI document: 1.0.0
16
+ *
17
+ *
18
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
19
+ * https://openapi-generator.tech
20
+ * Do not edit the class manually.
21
+ */
22
+ /**
23
+ * RebateApi - axios parameter creator
24
+ */
25
+ const RebateApiAxiosParamCreator = function(configuration) {
26
+ return { getSpotRebateHistoryRecords: async (startTime, endTime, page, recvWindow) => {
27
+ const localVarQueryParameter = {};
28
+ if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
29
+ if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
30
+ if (page !== void 0 && page !== null) localVarQueryParameter["page"] = page;
31
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
32
+ let _timeUnit;
33
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
34
+ return {
35
+ endpoint: "/sapi/v1/rebate/taxQuery",
36
+ method: "GET",
37
+ params: localVarQueryParameter,
38
+ timeUnit: _timeUnit
39
+ };
40
+ } };
69
41
  };
42
+ /**
43
+ * RebateApi - object-oriented interface
44
+ * @class RebateApi
45
+ */
70
46
  var RebateApi = class {
71
- constructor(configuration) {
72
- this.configuration = configuration;
73
- this.localVarAxiosParamCreator = RebateApiAxiosParamCreator(configuration);
74
- }
75
- /**
76
- * Get Spot Rebate History Records
77
- *
78
- * The max interval between startTime and endTime is 30 days.
79
- * If startTime and endTime are not sent, the recent 7 days' data will be returned.
80
- * The earliest startTime is supported on June 10, 2020
81
- * Return up to 200 records per request.
82
- *
83
- * Weight: 12000
84
- *
85
- * @summary Get Spot Rebate History Records (USER_DATA)
86
- * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.
87
- * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}
88
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
89
- * @memberof RebateApi
90
- * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}
91
- */
92
- async getSpotRebateHistoryRecords(requestParameters = {}) {
93
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSpotRebateHistoryRecords(
94
- requestParameters?.startTime,
95
- requestParameters?.endTime,
96
- requestParameters?.page,
97
- requestParameters?.recvWindow
98
- );
99
- return sendRequest(
100
- this.configuration,
101
- localVarAxiosArgs.endpoint,
102
- localVarAxiosArgs.method,
103
- localVarAxiosArgs.params,
104
- localVarAxiosArgs?.timeUnit,
105
- { isSigned: true }
106
- );
107
- }
47
+ constructor(configuration) {
48
+ this.configuration = configuration;
49
+ this.localVarAxiosParamCreator = RebateApiAxiosParamCreator(configuration);
50
+ }
51
+ /**
52
+ * Get Spot Rebate History Records
53
+ *
54
+ * The max interval between startTime and endTime is 30 days.
55
+ * If startTime and endTime are not sent, the recent 7 days' data will be returned.
56
+ * The earliest startTime is supported on June 10, 2020
57
+ * Return up to 200 records per request.
58
+ *
59
+ * Weight: 12000
60
+ *
61
+ * @summary Get Spot Rebate History Records (USER_DATA)
62
+ * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.
63
+ * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}
64
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
65
+ * @memberof RebateApi
66
+ * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}
67
+ */
68
+ async getSpotRebateHistoryRecords(requestParameters = {}) {
69
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSpotRebateHistoryRecords(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.page, requestParameters?.recvWindow);
70
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
71
+ }
108
72
  };
109
73
 
110
- // src/rest-api/rest-api.ts
111
- import { sendRequest as sendRequest2 } from "@binance/common";
74
+ //#endregion
75
+ //#region src/rest-api/rest-api.ts
76
+ /**
77
+ * Binance Rebate REST API
78
+ *
79
+ * OpenAPI Specification for the Binance Rebate REST API
80
+ *
81
+ * The version of the OpenAPI document: 1.0.0
82
+ *
83
+ *
84
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
85
+ * https://openapi-generator.tech
86
+ * Do not edit the class manually.
87
+ */
112
88
  var RestAPI = class {
113
- constructor(configuration) {
114
- this.configuration = configuration;
115
- this.rebateApi = new RebateApi(configuration);
116
- }
117
- /**
118
- * Generic function to send a request.
119
- * @param endpoint - The API endpoint to call.
120
- * @param method - HTTP method to use (GET, POST, DELETE, etc.).
121
- * @param params - Query parameters for the request.
122
- *
123
- * @returns A promise resolving to the response data object.
124
- */
125
- sendRequest(endpoint, method, params = {}) {
126
- return sendRequest2(this.configuration, endpoint, method, params, void 0);
127
- }
128
- /**
129
- * Generic function to send a signed request.
130
- * @param endpoint - The API endpoint to call.
131
- * @param method - HTTP method to use (GET, POST, DELETE, etc.).
132
- * @param params - Query parameters for the request.
133
- *
134
- * @returns A promise resolving to the response data object.
135
- */
136
- sendSignedRequest(endpoint, method, params = {}) {
137
- return sendRequest2(this.configuration, endpoint, method, params, void 0, {
138
- isSigned: true
139
- });
140
- }
141
- /**
142
- * Get Spot Rebate History Records
143
- *
144
- * The max interval between startTime and endTime is 30 days.
145
- * If startTime and endTime are not sent, the recent 7 days' data will be returned.
146
- * The earliest startTime is supported on June 10, 2020
147
- * Return up to 200 records per request.
148
- *
149
- * Weight: 12000
150
- *
151
- * @summary Get Spot Rebate History Records (USER_DATA)
152
- * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.
153
- *
154
- * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}
155
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
156
- * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}
157
- */
158
- getSpotRebateHistoryRecords(requestParameters = {}) {
159
- return this.rebateApi.getSpotRebateHistoryRecords(requestParameters);
160
- }
89
+ constructor(configuration) {
90
+ this.configuration = configuration;
91
+ this.rebateApi = new RebateApi(configuration);
92
+ }
93
+ /**
94
+ * Generic function to send a request.
95
+ * @param endpoint - The API endpoint to call.
96
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
97
+ * @param params - Query parameters for the request.
98
+ *
99
+ * @returns A promise resolving to the response data object.
100
+ */
101
+ sendRequest(endpoint, method, params = {}) {
102
+ return sendRequest(this.configuration, endpoint, method, params, void 0);
103
+ }
104
+ /**
105
+ * Generic function to send a signed request.
106
+ * @param endpoint - The API endpoint to call.
107
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
108
+ * @param params - Query parameters for the request.
109
+ *
110
+ * @returns A promise resolving to the response data object.
111
+ */
112
+ sendSignedRequest(endpoint, method, params = {}) {
113
+ return sendRequest(this.configuration, endpoint, method, params, void 0, { isSigned: true });
114
+ }
115
+ /**
116
+ * Get Spot Rebate History Records
117
+ *
118
+ * The max interval between startTime and endTime is 30 days.
119
+ * If startTime and endTime are not sent, the recent 7 days' data will be returned.
120
+ * The earliest startTime is supported on June 10, 2020
121
+ * Return up to 200 records per request.
122
+ *
123
+ * Weight: 12000
124
+ *
125
+ * @summary Get Spot Rebate History Records (USER_DATA)
126
+ * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.
127
+ *
128
+ * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}
129
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
130
+ * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}
131
+ */
132
+ getSpotRebateHistoryRecords(requestParameters = {}) {
133
+ return this.rebateApi.getSpotRebateHistoryRecords(requestParameters);
134
+ }
161
135
  };
162
136
 
163
- // src/rebate.ts
137
+ //#endregion
138
+ //#region src/rest-api/index.ts
139
+ var rest_api_exports = /* @__PURE__ */ __export({
140
+ RebateApi: () => RebateApi,
141
+ RestAPI: () => RestAPI
142
+ });
143
+
144
+ //#endregion
145
+ //#region src/rebate.ts
164
146
  var Rebate = class {
165
- constructor(config) {
166
- const userAgent = buildUserAgent(name, version);
167
- if (config?.configurationRestAPI) {
168
- const configRestAPI = new ConfigurationRestAPI3(
169
- config.configurationRestAPI
170
- );
171
- configRestAPI.basePath = configRestAPI.basePath || REBATE_REST_API_PROD_URL;
172
- configRestAPI.baseOptions = configRestAPI.baseOptions || {};
173
- configRestAPI.baseOptions.headers = {
174
- ...configRestAPI.baseOptions.headers || {},
175
- "User-Agent": userAgent
176
- };
177
- this.restAPI = new RestAPI(configRestAPI);
178
- }
179
- }
147
+ constructor(config) {
148
+ const userAgent = buildUserAgent(name, version);
149
+ if (config?.configurationRestAPI) {
150
+ const configRestAPI = new ConfigurationRestAPI(config.configurationRestAPI);
151
+ configRestAPI.basePath = configRestAPI.basePath || REBATE_REST_API_PROD_URL$1;
152
+ configRestAPI.baseOptions = configRestAPI.baseOptions || {};
153
+ configRestAPI.baseOptions.headers = {
154
+ ...configRestAPI.baseOptions.headers || {},
155
+ "User-Agent": userAgent
156
+ };
157
+ this.restAPI = new RestAPI(configRestAPI);
158
+ }
159
+ }
180
160
  };
181
161
 
182
- // src/index.ts
183
- import {
184
- REBATE_REST_API_PROD_URL as REBATE_REST_API_PROD_URL2,
185
- ConnectorClientError,
186
- RequiredError,
187
- UnauthorizedError,
188
- ForbiddenError,
189
- TooManyRequestsError,
190
- RateLimitBanError,
191
- ServerError,
192
- NetworkError,
193
- NotFoundError,
194
- BadRequestError
195
- } from "@binance/common";
196
- export {
197
- BadRequestError,
198
- ConnectorClientError,
199
- ForbiddenError,
200
- NetworkError,
201
- NotFoundError,
202
- REBATE_REST_API_PROD_URL2 as REBATE_REST_API_PROD_URL,
203
- RateLimitBanError,
204
- Rebate,
205
- rest_api_exports as RebateRestAPI,
206
- RequiredError,
207
- ServerError,
208
- TooManyRequestsError,
209
- UnauthorizedError
210
- };
162
+ //#endregion
163
+ export { BadRequestError, ConfigurationRebate, ConnectorClientError, ForbiddenError, NetworkError, NotFoundError, REBATE_REST_API_PROD_URL, RateLimitBanError, Rebate, rest_api_exports as RebateRestAPI, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError };
211
164
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/rebate.ts","../package.json","../src/rest-api/index.ts","../src/rest-api/modules/rebate-api.ts","../src/rest-api/rest-api.ts","../src/index.ts"],"sourcesContent":["import { buildUserAgent, ConfigurationRestAPI, REBATE_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationRebate {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Rebate {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationRebate) {\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 || REBATE_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/rebate\",\n \"description\": \"Official Binance Rebate Connector - A lightweight library that provides a convenient interface to Binance's Rebate REST API.\",\n \"version\": \"3.0.1\",\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 \"Rebate\",\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 Rebate REST API\n *\n * OpenAPI Specification for the Binance Rebate 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 Rebate REST API\n *\n * OpenAPI Specification for the Binance Rebate 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 { GetSpotRebateHistoryRecordsResponse } from '../types';\n\n/**\n * RebateApi - axios parameter creator\n */\nconst RebateApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {number | bigint} [startTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [page] Default 1\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getSpotRebateHistoryRecords: async (\n startTime?: number | bigint,\n endTime?: number | bigint,\n page?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\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 (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/rebate/taxQuery',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * RebateApi - interface\n * @interface RebateApi\n */\nexport interface RebateApiInterface {\n /**\n * Get Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RebateApiInterface\n */\n getSpotRebateHistoryRecords(\n requestParameters?: GetSpotRebateHistoryRecordsRequest\n ): Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>;\n}\n\n/**\n * Request parameters for getSpotRebateHistoryRecords operation in RebateApi.\n * @interface GetSpotRebateHistoryRecordsRequest\n */\nexport interface GetSpotRebateHistoryRecordsRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly startTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly endTime?: number | bigint;\n\n /**\n * Default 1\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly page?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * RebateApi - object-oriented interface\n * @class RebateApi\n */\nexport class RebateApi implements RebateApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = RebateApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RebateApi\n * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}\n */\n public async getSpotRebateHistoryRecords(\n requestParameters: GetSpotRebateHistoryRecordsRequest = {}\n ): Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSpotRebateHistoryRecords(\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.page,\n requestParameters?.recvWindow\n );\n return sendRequest<GetSpotRebateHistoryRecordsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Rebate REST API\n *\n * OpenAPI Specification for the Binance Rebate 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 { RebateApi } from './modules/rebate-api';\n\nimport type { GetSpotRebateHistoryRecordsRequest } from './modules/rebate-api';\n\nimport type { GetSpotRebateHistoryRecordsResponse } from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private rebateApi: RebateApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.rebateApi = new RebateApi(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 Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}\n */\n getSpotRebateHistoryRecords(\n requestParameters: GetSpotRebateHistoryRecordsRequest = {}\n ): Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>> {\n return this.rebateApi.getSpotRebateHistoryRecords(requestParameters);\n }\n}\n","export { Rebate, ConfigurationRebate } from './rebate';\nexport * as RebateRestAPI from './rest-api';\n\nexport {\n REBATE_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":"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","names":["ConfigurationRestAPI","sendRequest","sendRequest","ConfigurationRestAPI","REBATE_REST_API_PROD_URL"]}
1
+ {"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","REBATE_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/rebate-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/rebate.ts"],"sourcesContent":["{\n \"name\": \"@binance/rebate\",\n \"description\": \"Official Binance Rebate Connector - A lightweight library that provides a convenient interface to Binance's Rebate REST API.\",\n \"version\": \"3.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 \"Rebate\",\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 Rebate REST API\n *\n * OpenAPI Specification for the Binance Rebate 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 { GetSpotRebateHistoryRecordsResponse } from '../types';\n\n/**\n * RebateApi - axios parameter creator\n */\nconst RebateApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {number | bigint} [startTime]\n * @param {number | bigint} [endTime]\n * @param {number | bigint} [page] Default 1\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getSpotRebateHistoryRecords: async (\n startTime?: number | bigint,\n endTime?: number | bigint,\n page?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\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 (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/rebate/taxQuery',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * RebateApi - interface\n * @interface RebateApi\n */\nexport interface RebateApiInterface {\n /**\n * Get Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RebateApiInterface\n */\n getSpotRebateHistoryRecords(\n requestParameters?: GetSpotRebateHistoryRecordsRequest\n ): Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>;\n}\n\n/**\n * Request parameters for getSpotRebateHistoryRecords operation in RebateApi.\n * @interface GetSpotRebateHistoryRecordsRequest\n */\nexport interface GetSpotRebateHistoryRecordsRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly startTime?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly endTime?: number | bigint;\n\n /**\n * Default 1\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly page?: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * RebateApi - object-oriented interface\n * @class RebateApi\n */\nexport class RebateApi implements RebateApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = RebateApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof RebateApi\n * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}\n */\n public async getSpotRebateHistoryRecords(\n requestParameters: GetSpotRebateHistoryRecordsRequest = {}\n ): Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSpotRebateHistoryRecords(\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.page,\n requestParameters?.recvWindow\n );\n return sendRequest<GetSpotRebateHistoryRecordsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Rebate REST API\n *\n * OpenAPI Specification for the Binance Rebate 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 { RebateApi } from './modules/rebate-api';\n\nimport type { GetSpotRebateHistoryRecordsRequest } from './modules/rebate-api';\n\nimport type { GetSpotRebateHistoryRecordsResponse } from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private rebateApi: RebateApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.rebateApi = new RebateApi(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 Spot Rebate History Records\n *\n * The max interval between startTime and endTime is 30 days.\n * If startTime and endTime are not sent, the recent 7 days' data will be returned.\n * The earliest startTime is supported on June 10, 2020\n * Return up to 200 records per request.\n *\n * Weight: 12000\n *\n * @summary Get Spot Rebate History Records (USER_DATA)\n * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}\n */\n getSpotRebateHistoryRecords(\n requestParameters: GetSpotRebateHistoryRecordsRequest = {}\n ): Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>> {\n return this.rebateApi.getSpotRebateHistoryRecords(requestParameters);\n }\n}\n","/**\n * Binance Rebate REST API\n *\n * OpenAPI Specification for the Binance Rebate 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, REBATE_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationRebate {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Rebate {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationRebate) {\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 || REBATE_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;;;;;;;;;;;;;;;;;;;ACsBf,MAAM,6BAA6B,SAAU,eAAqC;AAC9E,QAAO,EAmBH,6BAA6B,OACzB,WACA,SACA,MACA,eACuB;EACvB,MAAMA,yBAAkD,EAAE;AAE1D,MAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAG1C,MAAI,YAAY,UAAa,YAAY,KACrC,wBAAuB,aAAa;AAGxC,MAAI,SAAS,UAAa,SAAS,KAC/B,wBAAuB,UAAU;AAGrC,MAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;EAG3C,IAAIC;AACJ,MAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,SAAO;GACH,UAAU;GACV,QAAQ;GACR,QAAQ;GACR,UAAU;GACb;IAER;;;;;;AAmEL,IAAa,YAAb,MAAqD;CAIjD,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,4BAA4B,2BAA2B,cAAc;;;;;;;;;;;;;;;;;;;CAoB9E,MAAa,4BACT,oBAAwD,EAAE,EACG;EAC7D,MAAM,oBAAoB,MAAM,KAAK,0BAA0B,4BAC3D,mBAAmB,WACnB,mBAAmB,SACnB,mBAAmB,MACnB,mBAAmB,WACtB;AACD,SAAO,YACH,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,QAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;ACxKT,IAAa,UAAb,MAAqB;CAIjB,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,YAAY,IAAI,UAAU,cAAc;;;;;;;;;;CAWjD,YACI,UACA,QACA,SAAkC,EAAE,EACT;AAC3B,SAAO,YAAe,KAAK,eAAe,UAAU,QAAQ,QAAQ,OAAU;;;;;;;;;;CAWlF,kBACI,UACA,QACA,SAAkC,EAAE,EACT;AAC3B,SAAO,YAAe,KAAK,eAAe,UAAU,QAAQ,QAAQ,QAAW,EAC3E,UAAU,MACb,CAAC;;;;;;;;;;;;;;;;;;;CAoBN,4BACI,oBAAwD,EAAE,EACG;AAC7D,SAAO,KAAK,UAAU,4BAA4B,kBAAkB;;;;;;;;;;;;;AE3E5E,IAAa,SAAb,MAAoB;CAGhB,YAAY,QAA6B;EACrC,MAAM,YAAY,eAAe,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAI,qBACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@binance/rebate",
3
3
  "description": "Official Binance Rebate Connector - A lightweight library that provides a convenient interface to Binance's Rebate REST API.",
4
- "version": "3.0.1",
4
+ "version": "3.0.2",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
@@ -13,7 +13,7 @@
13
13
  },
14
14
  "scripts": {
15
15
  "prepublishOnly": "npm run build",
16
- "build": "npm run clean && tsup",
16
+ "build": "npm run clean && tsdown",
17
17
  "typecheck": "tsc --noEmit",
18
18
  "clean": "rm -rf dist",
19
19
  "test": "npx jest --maxWorkers=4 --bail",
@@ -51,12 +51,12 @@
51
51
  "prettier": "^3.3.3",
52
52
  "ts-jest": "^29.1.1",
53
53
  "ts-node": "^10.9.1",
54
- "tsup": "^8.4.0",
54
+ "tsdown": "^0.16.5",
55
55
  "typescript": "^5.7.2",
56
56
  "typescript-eslint": "^8.24.0"
57
57
  },
58
58
  "dependencies": {
59
- "@binance/common": "2.0.0",
59
+ "@binance/common": "2.0.1",
60
60
  "axios": "^1.7.4"
61
61
  }
62
62
  }