@binance/rebate 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs ADDED
@@ -0,0 +1,211 @@
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 { platform, arch } from "os";
9
+ import { ConfigurationRestAPI as ConfigurationRestAPI3, REBATE_REST_API_PROD_URL } from "@binance/common";
10
+
11
+ // package.json
12
+ var name = "@binance/rebate";
13
+ var version = "1.0.0";
14
+
15
+ // src/rest-api/index.ts
16
+ var rest_api_exports = {};
17
+ __export(rest_api_exports, {
18
+ RebateApi: () => RebateApi,
19
+ RestAPI: () => RestAPI
20
+ });
21
+
22
+ // src/rest-api/modules/rebate-api.ts
23
+ import {
24
+ sendRequest
25
+ } from "@binance/common";
26
+ var RebateApiAxiosParamCreator = function(configuration) {
27
+ return {
28
+ /**
29
+ * Get Spot Rebate History Records
30
+ *
31
+ * The max interval between startTime and endTime is 30 days.
32
+ * If startTime and endTime are not sent, the recent 7 days' data will be returned.
33
+ * The earliest startTime is supported on June 10, 2020
34
+ * Return up to 200 records per request.
35
+ *
36
+ * Weight: 12000
37
+ *
38
+ * @summary Get Spot Rebate History Records (USER_DATA)
39
+ * @param {number} [startTime]
40
+ * @param {number} [endTime]
41
+ * @param {number} [page] Default 1
42
+ * @param {number} [recvWindow]
43
+ *
44
+ * @throws {RequiredError}
45
+ */
46
+ getSpotRebateHistoryRecords: async (startTime, endTime, page, recvWindow) => {
47
+ const localVarQueryParameter = {};
48
+ if (startTime !== void 0 && startTime !== null) {
49
+ localVarQueryParameter["startTime"] = startTime;
50
+ }
51
+ if (endTime !== void 0 && endTime !== null) {
52
+ localVarQueryParameter["endTime"] = endTime;
53
+ }
54
+ if (page !== void 0 && page !== null) {
55
+ localVarQueryParameter["page"] = page;
56
+ }
57
+ if (recvWindow !== void 0 && recvWindow !== null) {
58
+ localVarQueryParameter["recvWindow"] = recvWindow;
59
+ }
60
+ let _timeUnit;
61
+ if ("timeUnit" in configuration)
62
+ _timeUnit = configuration.timeUnit;
63
+ return {
64
+ endpoint: "/sapi/v1/rebate/taxQuery",
65
+ method: "GET",
66
+ params: localVarQueryParameter,
67
+ timeUnit: _timeUnit
68
+ };
69
+ }
70
+ };
71
+ };
72
+ var RebateApi = class {
73
+ constructor(configuration) {
74
+ this.configuration = configuration;
75
+ this.localVarAxiosParamCreator = RebateApiAxiosParamCreator(configuration);
76
+ }
77
+ /**
78
+ * Get Spot Rebate History Records
79
+ *
80
+ * The max interval between startTime and endTime is 30 days.
81
+ * If startTime and endTime are not sent, the recent 7 days' data will be returned.
82
+ * The earliest startTime is supported on June 10, 2020
83
+ * Return up to 200 records per request.
84
+ *
85
+ * Weight: 12000
86
+ *
87
+ * @summary Get Spot Rebate History Records (USER_DATA)
88
+ * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.
89
+ * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}
90
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
91
+ * @memberof RebateApi
92
+ * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}
93
+ */
94
+ async getSpotRebateHistoryRecords(requestParameters = {}) {
95
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSpotRebateHistoryRecords(
96
+ requestParameters?.startTime,
97
+ requestParameters?.endTime,
98
+ requestParameters?.page,
99
+ requestParameters?.recvWindow
100
+ );
101
+ return sendRequest(
102
+ this.configuration,
103
+ localVarAxiosArgs.endpoint,
104
+ localVarAxiosArgs.method,
105
+ localVarAxiosArgs.params,
106
+ localVarAxiosArgs?.timeUnit,
107
+ { isSigned: true }
108
+ );
109
+ }
110
+ };
111
+
112
+ // src/rest-api/rest-api.ts
113
+ import { sendRequest as sendRequest2 } from "@binance/common";
114
+ var RestAPI = class {
115
+ constructor(configuration) {
116
+ this.configuration = configuration;
117
+ this.rebateApi = new RebateApi(configuration);
118
+ }
119
+ /**
120
+ * Generic function to send a request.
121
+ * @param endpoint - The API endpoint to call.
122
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
123
+ * @param params - Query parameters for the request.
124
+ *
125
+ * @returns A promise resolving to the response data object.
126
+ */
127
+ sendRequest(endpoint, method, params = {}) {
128
+ return sendRequest2(this.configuration, endpoint, method, params, void 0);
129
+ }
130
+ /**
131
+ * Generic function to send a signed request.
132
+ * @param endpoint - The API endpoint to call.
133
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
134
+ * @param params - Query parameters for the request.
135
+ *
136
+ * @returns A promise resolving to the response data object.
137
+ */
138
+ sendSignedRequest(endpoint, method, params = {}) {
139
+ return sendRequest2(this.configuration, endpoint, method, params, void 0, {
140
+ isSigned: true
141
+ });
142
+ }
143
+ /**
144
+ * Get Spot Rebate History Records
145
+ *
146
+ * The max interval between startTime and endTime is 30 days.
147
+ * If startTime and endTime are not sent, the recent 7 days' data will be returned.
148
+ * The earliest startTime is supported on June 10, 2020
149
+ * Return up to 200 records per request.
150
+ *
151
+ * Weight: 12000
152
+ *
153
+ * @summary Get Spot Rebate History Records (USER_DATA)
154
+ * @param {GetSpotRebateHistoryRecordsRequest} requestParameters Request parameters.
155
+ * @returns {Promise<RestApiResponse<GetSpotRebateHistoryRecordsResponse>>}
156
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
157
+ * @see {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records Binance API Documentation}
158
+ */
159
+ getSpotRebateHistoryRecords(requestParameters = {}) {
160
+ return this.rebateApi.getSpotRebateHistoryRecords(requestParameters);
161
+ }
162
+ };
163
+
164
+ // src/rebate.ts
165
+ var Rebate = class {
166
+ constructor(config) {
167
+ if (config?.configurationRestAPI) {
168
+ const configRestAPI = new ConfigurationRestAPI3(config.configurationRestAPI);
169
+ configRestAPI.basePath = configRestAPI.basePath || REBATE_REST_API_PROD_URL;
170
+ configRestAPI.baseOptions = configRestAPI.baseOptions || {};
171
+ configRestAPI.baseOptions.headers = {
172
+ ...configRestAPI.baseOptions.headers || {},
173
+ "User-Agent": `${name}/${version} (Node.js/${process.version}; ${platform()}; ${arch()})`
174
+ };
175
+ this.restAPI = new RestAPI(configRestAPI);
176
+ }
177
+ }
178
+ };
179
+
180
+ // src/index.ts
181
+ import {
182
+ REBATE_REST_API_PROD_URL as REBATE_REST_API_PROD_URL2,
183
+ REBATE_REST_API_TESTNET_URL,
184
+ ConnectorClientError,
185
+ RequiredError,
186
+ UnauthorizedError,
187
+ ForbiddenError,
188
+ TooManyRequestsError,
189
+ RateLimitBanError,
190
+ ServerError,
191
+ NetworkError,
192
+ NotFoundError,
193
+ BadRequestError
194
+ } from "@binance/common";
195
+ export {
196
+ BadRequestError,
197
+ ConnectorClientError,
198
+ ForbiddenError,
199
+ NetworkError,
200
+ NotFoundError,
201
+ REBATE_REST_API_PROD_URL2 as REBATE_REST_API_PROD_URL,
202
+ REBATE_REST_API_TESTNET_URL,
203
+ RateLimitBanError,
204
+ Rebate,
205
+ rest_api_exports as RebateRestAPI,
206
+ RequiredError,
207
+ ServerError,
208
+ TooManyRequestsError,
209
+ UnauthorizedError
210
+ };
211
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +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 { platform, arch } from 'os';\nimport { 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 if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(config.configurationRestAPI);\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': `${name}/${version} (Node.js/${process.version}; ${platform()}; ${arch()})`,\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\": \"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 \"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 \"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 Rebate REST API\n *\n * OpenAPI Specification for the Binance Public 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 Public Rebate REST API\n *\n * OpenAPI Specification for the Binance Public 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} [startTime]\n * @param {number} [endTime]\n * @param {number} [page] Default 1\n * @param {number} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getSpotRebateHistoryRecords: async (\n startTime?: number,\n endTime?: number,\n page?: number,\n recvWindow?: number\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}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly startTime?: number;\n\n /**\n *\n * @type {number}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly endTime?: number;\n\n /**\n * Default 1\n * @type {number}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly page?: number;\n\n /**\n *\n * @type {number}\n * @memberof RebateApiGetSpotRebateHistoryRecords\n */\n readonly recvWindow?: number;\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 Public Rebate REST API\n *\n * OpenAPI Specification for the Binance Public 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 * @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 REBATE_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":"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","names":["ConfigurationRestAPI","sendRequest","sendRequest","ConfigurationRestAPI","REBATE_REST_API_PROD_URL"]}
package/package.json ADDED
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "@binance/rebate",
3
+ "description": "Official Binance Rebate Connector - A lightweight library that provides a convenient interface to Binance's Rebate REST API.",
4
+ "version": "1.0.0",
5
+ "main": "./dist/index.js",
6
+ "module": "./dist/index.mjs",
7
+ "types": "./dist/index.d.ts",
8
+ "scripts": {
9
+ "prepublishOnly": "npm run build",
10
+ "build": "tsup",
11
+ "typecheck": "tsc --noEmit",
12
+ "clean": "rm -rf dist",
13
+ "test": "npx jest --maxWorkers=4 --bail",
14
+ "test:watch": "npx jest --watch",
15
+ "format": "npx prettier --ignore-path .prettierignore --write .",
16
+ "lint": "npx eslint '**/*.ts' --fix"
17
+ },
18
+ "keywords": [
19
+ "Binance",
20
+ "API",
21
+ "Rebate",
22
+ "Connector",
23
+ "REST",
24
+ "Trading"
25
+ ],
26
+ "author": "Binance",
27
+ "license": "MIT",
28
+ "repository": {
29
+ "type": "git",
30
+ "url": "https://github.com/binance/binance-connector-js.git"
31
+ },
32
+ "bugs": {
33
+ "url": "https://github.com/binance/binance-connector-js/issues"
34
+ },
35
+ "homepage": "https://github.com/binance/binance-connector-js#readme",
36
+ "files": [
37
+ "dist"
38
+ ],
39
+ "devDependencies": {
40
+ "@types/jest": "^29.5.4",
41
+ "@types/node": "^20.17.24",
42
+ "eslint": "8.57.0",
43
+ "jest": "^29.6.4",
44
+ "prettier": "^3.3.3",
45
+ "ts-jest": "^29.1.1",
46
+ "ts-node": "^10.9.1",
47
+ "tsup": "^7.2.0",
48
+ "typescript": "^5.7.2",
49
+ "typescript-eslint": "^8.24.0"
50
+ },
51
+ "dependencies": {
52
+ "@binance/common": "1.0.0",
53
+ "axios": "^1.7.4"
54
+ }
55
+ }