@binance/rebate 1.0.0 → 2.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/README.md +0 -15
- package/dist/index.d.mts +15 -57
- package/dist/index.d.ts +15 -57
- package/dist/index.js +5 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -3
package/README.md
CHANGED
|
@@ -139,21 +139,6 @@ The REST API provides detailed error types to help you handle issues effectively
|
|
|
139
139
|
|
|
140
140
|
See the [Error Handling example](./docs/rest-api/error-handling.md) for detailed usage.
|
|
141
141
|
|
|
142
|
-
#### Testnet
|
|
143
|
-
|
|
144
|
-
For testing purposes, `/sapi/v1/rebate/*` endpoints can be used in the [Testnet](https://testnet.binance.vision/). Update the `basePath` in your configuration:
|
|
145
|
-
|
|
146
|
-
```typescript
|
|
147
|
-
import { Rebate, RebateRestAPI, REBATE_REST_API_TESTNET_URL } from '@binance/rebate';
|
|
148
|
-
|
|
149
|
-
const configurationRestAPI = {
|
|
150
|
-
apiKey: 'your-api-key',
|
|
151
|
-
apiSecret: 'your-api-secret',
|
|
152
|
-
basePath: REBATE_REST_API_TESTNET_URL,
|
|
153
|
-
};
|
|
154
|
-
const client = new Rebate({ configurationRestAPI });
|
|
155
|
-
```
|
|
156
|
-
|
|
157
142
|
If `basePath` is not provided, it defaults to `https://api.binance.com`.
|
|
158
143
|
|
|
159
144
|
## Testing
|
package/dist/index.d.mts
CHANGED
|
@@ -1,42 +1,10 @@
|
|
|
1
1
|
import { RestApiResponse, ConfigurationRestAPI } from '@binance/common';
|
|
2
|
-
export { BadRequestError, ConnectorClientError, ForbiddenError, NetworkError, NotFoundError, REBATE_REST_API_PROD_URL,
|
|
2
|
+
export { BadRequestError, ConnectorClientError, ForbiddenError, NetworkError, NotFoundError, REBATE_REST_API_PROD_URL, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError } from '@binance/common';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Binance
|
|
5
|
+
* Binance Rebate REST API
|
|
6
6
|
*
|
|
7
|
-
* OpenAPI Specification for the Binance
|
|
8
|
-
*
|
|
9
|
-
* The version of the OpenAPI document: 1.0.0
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
13
|
-
* https://openapi-generator.tech
|
|
14
|
-
* Do not edit the class manually.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @interface BadRequest
|
|
20
|
-
*/
|
|
21
|
-
interface BadRequest {
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @type {number}
|
|
25
|
-
* @memberof BadRequest
|
|
26
|
-
*/
|
|
27
|
-
code: number;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof BadRequest
|
|
32
|
-
*/
|
|
33
|
-
message: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Binance Public Rebate REST API
|
|
38
|
-
*
|
|
39
|
-
* OpenAPI Specification for the Binance Public Rebate REST API
|
|
7
|
+
* OpenAPI Specification for the Binance Rebate REST API
|
|
40
8
|
*
|
|
41
9
|
* The version of the OpenAPI document: 1.0.0
|
|
42
10
|
*
|
|
@@ -78,9 +46,9 @@ interface GetSpotRebateHistoryRecordsResponseDataDataInner {
|
|
|
78
46
|
}
|
|
79
47
|
|
|
80
48
|
/**
|
|
81
|
-
* Binance
|
|
49
|
+
* Binance Rebate REST API
|
|
82
50
|
*
|
|
83
|
-
* OpenAPI Specification for the Binance
|
|
51
|
+
* OpenAPI Specification for the Binance Rebate REST API
|
|
84
52
|
*
|
|
85
53
|
* The version of the OpenAPI document: 1.0.0
|
|
86
54
|
*
|
|
@@ -123,9 +91,9 @@ interface GetSpotRebateHistoryRecordsResponseData {
|
|
|
123
91
|
}
|
|
124
92
|
|
|
125
93
|
/**
|
|
126
|
-
* Binance
|
|
94
|
+
* Binance Rebate REST API
|
|
127
95
|
*
|
|
128
|
-
* OpenAPI Specification for the Binance
|
|
96
|
+
* OpenAPI Specification for the Binance Rebate REST API
|
|
129
97
|
*
|
|
130
98
|
* The version of the OpenAPI document: 1.0.0
|
|
131
99
|
*
|
|
@@ -168,9 +136,9 @@ interface GetSpotRebateHistoryRecordsResponse {
|
|
|
168
136
|
}
|
|
169
137
|
|
|
170
138
|
/**
|
|
171
|
-
* Binance
|
|
139
|
+
* Binance Rebate REST API
|
|
172
140
|
*
|
|
173
|
-
* OpenAPI Specification for the Binance
|
|
141
|
+
* OpenAPI Specification for the Binance Rebate REST API
|
|
174
142
|
*
|
|
175
143
|
* The version of the OpenAPI document: 1.0.0
|
|
176
144
|
*
|
|
@@ -262,9 +230,9 @@ declare class RebateApi implements RebateApiInterface {
|
|
|
262
230
|
}
|
|
263
231
|
|
|
264
232
|
/**
|
|
265
|
-
* Binance
|
|
233
|
+
* Binance Rebate REST API
|
|
266
234
|
*
|
|
267
|
-
* OpenAPI Specification for the Binance
|
|
235
|
+
* OpenAPI Specification for the Binance Rebate REST API
|
|
268
236
|
*
|
|
269
237
|
* The version of the OpenAPI document: 1.0.0
|
|
270
238
|
*
|
|
@@ -316,9 +284,9 @@ declare class RestAPI {
|
|
|
316
284
|
}
|
|
317
285
|
|
|
318
286
|
/**
|
|
319
|
-
* Binance
|
|
287
|
+
* Binance Rebate REST API
|
|
320
288
|
*
|
|
321
|
-
* OpenAPI Specification for the Binance
|
|
289
|
+
* OpenAPI Specification for the Binance Rebate REST API
|
|
322
290
|
*
|
|
323
291
|
* The version of the OpenAPI document: 1.0.0
|
|
324
292
|
*
|
|
@@ -328,7 +296,6 @@ declare class RestAPI {
|
|
|
328
296
|
* Do not edit the class manually.
|
|
329
297
|
*/
|
|
330
298
|
|
|
331
|
-
type index_BadRequest = BadRequest;
|
|
332
299
|
type index_GetSpotRebateHistoryRecordsRequest = GetSpotRebateHistoryRecordsRequest;
|
|
333
300
|
type index_GetSpotRebateHistoryRecordsResponse = GetSpotRebateHistoryRecordsResponse;
|
|
334
301
|
type index_GetSpotRebateHistoryRecordsResponseData = GetSpotRebateHistoryRecordsResponseData;
|
|
@@ -339,16 +306,7 @@ type index_RebateApiInterface = RebateApiInterface;
|
|
|
339
306
|
type index_RestAPI = RestAPI;
|
|
340
307
|
declare const index_RestAPI: typeof RestAPI;
|
|
341
308
|
declare namespace index {
|
|
342
|
-
export {
|
|
343
|
-
index_BadRequest as BadRequest,
|
|
344
|
-
index_GetSpotRebateHistoryRecordsRequest as GetSpotRebateHistoryRecordsRequest,
|
|
345
|
-
index_GetSpotRebateHistoryRecordsResponse as GetSpotRebateHistoryRecordsResponse,
|
|
346
|
-
index_GetSpotRebateHistoryRecordsResponseData as GetSpotRebateHistoryRecordsResponseData,
|
|
347
|
-
index_GetSpotRebateHistoryRecordsResponseDataDataInner as GetSpotRebateHistoryRecordsResponseDataDataInner,
|
|
348
|
-
index_RebateApi as RebateApi,
|
|
349
|
-
index_RebateApiInterface as RebateApiInterface,
|
|
350
|
-
index_RestAPI as RestAPI,
|
|
351
|
-
};
|
|
309
|
+
export { type index_GetSpotRebateHistoryRecordsRequest as GetSpotRebateHistoryRecordsRequest, type index_GetSpotRebateHistoryRecordsResponse as GetSpotRebateHistoryRecordsResponse, type index_GetSpotRebateHistoryRecordsResponseData as GetSpotRebateHistoryRecordsResponseData, type index_GetSpotRebateHistoryRecordsResponseDataDataInner as GetSpotRebateHistoryRecordsResponseDataDataInner, index_RebateApi as RebateApi, type index_RebateApiInterface as RebateApiInterface, index_RestAPI as RestAPI };
|
|
352
310
|
}
|
|
353
311
|
|
|
354
312
|
interface ConfigurationRebate {
|
|
@@ -359,4 +317,4 @@ declare class Rebate {
|
|
|
359
317
|
constructor(config: ConfigurationRebate);
|
|
360
318
|
}
|
|
361
319
|
|
|
362
|
-
export { ConfigurationRebate, Rebate, index as RebateRestAPI };
|
|
320
|
+
export { type ConfigurationRebate, Rebate, index as RebateRestAPI };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,42 +1,10 @@
|
|
|
1
1
|
import { RestApiResponse, ConfigurationRestAPI } from '@binance/common';
|
|
2
|
-
export { BadRequestError, ConnectorClientError, ForbiddenError, NetworkError, NotFoundError, REBATE_REST_API_PROD_URL,
|
|
2
|
+
export { BadRequestError, ConnectorClientError, ForbiddenError, NetworkError, NotFoundError, REBATE_REST_API_PROD_URL, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError } from '@binance/common';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Binance
|
|
5
|
+
* Binance Rebate REST API
|
|
6
6
|
*
|
|
7
|
-
* OpenAPI Specification for the Binance
|
|
8
|
-
*
|
|
9
|
-
* The version of the OpenAPI document: 1.0.0
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
13
|
-
* https://openapi-generator.tech
|
|
14
|
-
* Do not edit the class manually.
|
|
15
|
-
*/
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @interface BadRequest
|
|
20
|
-
*/
|
|
21
|
-
interface BadRequest {
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @type {number}
|
|
25
|
-
* @memberof BadRequest
|
|
26
|
-
*/
|
|
27
|
-
code: number;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof BadRequest
|
|
32
|
-
*/
|
|
33
|
-
message: string;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Binance Public Rebate REST API
|
|
38
|
-
*
|
|
39
|
-
* OpenAPI Specification for the Binance Public Rebate REST API
|
|
7
|
+
* OpenAPI Specification for the Binance Rebate REST API
|
|
40
8
|
*
|
|
41
9
|
* The version of the OpenAPI document: 1.0.0
|
|
42
10
|
*
|
|
@@ -78,9 +46,9 @@ interface GetSpotRebateHistoryRecordsResponseDataDataInner {
|
|
|
78
46
|
}
|
|
79
47
|
|
|
80
48
|
/**
|
|
81
|
-
* Binance
|
|
49
|
+
* Binance Rebate REST API
|
|
82
50
|
*
|
|
83
|
-
* OpenAPI Specification for the Binance
|
|
51
|
+
* OpenAPI Specification for the Binance Rebate REST API
|
|
84
52
|
*
|
|
85
53
|
* The version of the OpenAPI document: 1.0.0
|
|
86
54
|
*
|
|
@@ -123,9 +91,9 @@ interface GetSpotRebateHistoryRecordsResponseData {
|
|
|
123
91
|
}
|
|
124
92
|
|
|
125
93
|
/**
|
|
126
|
-
* Binance
|
|
94
|
+
* Binance Rebate REST API
|
|
127
95
|
*
|
|
128
|
-
* OpenAPI Specification for the Binance
|
|
96
|
+
* OpenAPI Specification for the Binance Rebate REST API
|
|
129
97
|
*
|
|
130
98
|
* The version of the OpenAPI document: 1.0.0
|
|
131
99
|
*
|
|
@@ -168,9 +136,9 @@ interface GetSpotRebateHistoryRecordsResponse {
|
|
|
168
136
|
}
|
|
169
137
|
|
|
170
138
|
/**
|
|
171
|
-
* Binance
|
|
139
|
+
* Binance Rebate REST API
|
|
172
140
|
*
|
|
173
|
-
* OpenAPI Specification for the Binance
|
|
141
|
+
* OpenAPI Specification for the Binance Rebate REST API
|
|
174
142
|
*
|
|
175
143
|
* The version of the OpenAPI document: 1.0.0
|
|
176
144
|
*
|
|
@@ -262,9 +230,9 @@ declare class RebateApi implements RebateApiInterface {
|
|
|
262
230
|
}
|
|
263
231
|
|
|
264
232
|
/**
|
|
265
|
-
* Binance
|
|
233
|
+
* Binance Rebate REST API
|
|
266
234
|
*
|
|
267
|
-
* OpenAPI Specification for the Binance
|
|
235
|
+
* OpenAPI Specification for the Binance Rebate REST API
|
|
268
236
|
*
|
|
269
237
|
* The version of the OpenAPI document: 1.0.0
|
|
270
238
|
*
|
|
@@ -316,9 +284,9 @@ declare class RestAPI {
|
|
|
316
284
|
}
|
|
317
285
|
|
|
318
286
|
/**
|
|
319
|
-
* Binance
|
|
287
|
+
* Binance Rebate REST API
|
|
320
288
|
*
|
|
321
|
-
* OpenAPI Specification for the Binance
|
|
289
|
+
* OpenAPI Specification for the Binance Rebate REST API
|
|
322
290
|
*
|
|
323
291
|
* The version of the OpenAPI document: 1.0.0
|
|
324
292
|
*
|
|
@@ -328,7 +296,6 @@ declare class RestAPI {
|
|
|
328
296
|
* Do not edit the class manually.
|
|
329
297
|
*/
|
|
330
298
|
|
|
331
|
-
type index_BadRequest = BadRequest;
|
|
332
299
|
type index_GetSpotRebateHistoryRecordsRequest = GetSpotRebateHistoryRecordsRequest;
|
|
333
300
|
type index_GetSpotRebateHistoryRecordsResponse = GetSpotRebateHistoryRecordsResponse;
|
|
334
301
|
type index_GetSpotRebateHistoryRecordsResponseData = GetSpotRebateHistoryRecordsResponseData;
|
|
@@ -339,16 +306,7 @@ type index_RebateApiInterface = RebateApiInterface;
|
|
|
339
306
|
type index_RestAPI = RestAPI;
|
|
340
307
|
declare const index_RestAPI: typeof RestAPI;
|
|
341
308
|
declare namespace index {
|
|
342
|
-
export {
|
|
343
|
-
index_BadRequest as BadRequest,
|
|
344
|
-
index_GetSpotRebateHistoryRecordsRequest as GetSpotRebateHistoryRecordsRequest,
|
|
345
|
-
index_GetSpotRebateHistoryRecordsResponse as GetSpotRebateHistoryRecordsResponse,
|
|
346
|
-
index_GetSpotRebateHistoryRecordsResponseData as GetSpotRebateHistoryRecordsResponseData,
|
|
347
|
-
index_GetSpotRebateHistoryRecordsResponseDataDataInner as GetSpotRebateHistoryRecordsResponseDataDataInner,
|
|
348
|
-
index_RebateApi as RebateApi,
|
|
349
|
-
index_RebateApiInterface as RebateApiInterface,
|
|
350
|
-
index_RestAPI as RestAPI,
|
|
351
|
-
};
|
|
309
|
+
export { type index_GetSpotRebateHistoryRecordsRequest as GetSpotRebateHistoryRecordsRequest, type index_GetSpotRebateHistoryRecordsResponse as GetSpotRebateHistoryRecordsResponse, type index_GetSpotRebateHistoryRecordsResponseData as GetSpotRebateHistoryRecordsResponseData, type index_GetSpotRebateHistoryRecordsResponseDataDataInner as GetSpotRebateHistoryRecordsResponseDataDataInner, index_RebateApi as RebateApi, type index_RebateApiInterface as RebateApiInterface, index_RestAPI as RestAPI };
|
|
352
310
|
}
|
|
353
311
|
|
|
354
312
|
interface ConfigurationRebate {
|
|
@@ -359,4 +317,4 @@ declare class Rebate {
|
|
|
359
317
|
constructor(config: ConfigurationRebate);
|
|
360
318
|
}
|
|
361
319
|
|
|
362
|
-
export { ConfigurationRebate, Rebate, index as RebateRestAPI };
|
|
320
|
+
export { type ConfigurationRebate, Rebate, index as RebateRestAPI };
|
package/dist/index.js
CHANGED
|
@@ -18,15 +18,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
|
|
20
20
|
// src/index.ts
|
|
21
|
-
var
|
|
22
|
-
__export(
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
23
|
BadRequestError: () => import_common4.BadRequestError,
|
|
24
24
|
ConnectorClientError: () => import_common4.ConnectorClientError,
|
|
25
25
|
ForbiddenError: () => import_common4.ForbiddenError,
|
|
26
26
|
NetworkError: () => import_common4.NetworkError,
|
|
27
27
|
NotFoundError: () => import_common4.NotFoundError,
|
|
28
28
|
REBATE_REST_API_PROD_URL: () => import_common4.REBATE_REST_API_PROD_URL,
|
|
29
|
-
REBATE_REST_API_TESTNET_URL: () => import_common4.REBATE_REST_API_TESTNET_URL,
|
|
30
29
|
RateLimitBanError: () => import_common4.RateLimitBanError,
|
|
31
30
|
Rebate: () => Rebate,
|
|
32
31
|
RebateRestAPI: () => rest_api_exports,
|
|
@@ -35,7 +34,7 @@ __export(src_exports, {
|
|
|
35
34
|
TooManyRequestsError: () => import_common4.TooManyRequestsError,
|
|
36
35
|
UnauthorizedError: () => import_common4.UnauthorizedError
|
|
37
36
|
});
|
|
38
|
-
module.exports = __toCommonJS(
|
|
37
|
+
module.exports = __toCommonJS(index_exports);
|
|
39
38
|
|
|
40
39
|
// src/rebate.ts
|
|
41
40
|
var import_os = require("os");
|
|
@@ -43,7 +42,7 @@ var import_common3 = require("@binance/common");
|
|
|
43
42
|
|
|
44
43
|
// package.json
|
|
45
44
|
var name = "@binance/rebate";
|
|
46
|
-
var version = "
|
|
45
|
+
var version = "2.0.0";
|
|
47
46
|
|
|
48
47
|
// src/rest-api/index.ts
|
|
49
48
|
var rest_api_exports = {};
|
|
@@ -89,8 +88,7 @@ var RebateApiAxiosParamCreator = function(configuration) {
|
|
|
89
88
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
90
89
|
}
|
|
91
90
|
let _timeUnit;
|
|
92
|
-
if ("timeUnit" in configuration)
|
|
93
|
-
_timeUnit = configuration.timeUnit;
|
|
91
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
94
92
|
return {
|
|
95
93
|
endpoint: "/sapi/v1/rebate/taxQuery",
|
|
96
94
|
method: "GET",
|
|
@@ -218,7 +216,6 @@ var import_common4 = require("@binance/common");
|
|
|
218
216
|
NetworkError,
|
|
219
217
|
NotFoundError,
|
|
220
218
|
REBATE_REST_API_PROD_URL,
|
|
221
|
-
REBATE_REST_API_TESTNET_URL,
|
|
222
219
|
RateLimitBanError,
|
|
223
220
|
Rebate,
|
|
224
221
|
RebateRestAPI,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/rebate.ts","../package.json","../src/rest-api/index.ts","../src/rest-api/modules/rebate-api.ts","../src/rest-api/rest-api.ts"],"sourcesContent":["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","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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,gBAA+B;AAC/B,IAAAA,iBAA+D;;;ACA3D,WAAQ;AAER,cAAW;;;ACHf;AAAA;AAAA;AAAA;AAAA;;;ACaA,oBAMO;AAMP,IAAM,6BAA6B,SAAU,eAAqC;AAC9E,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAmBH,6BAA6B,OACzB,WACA,SACA,MACA,eACuB;AACvB,YAAM,yBAAkD,CAAC;AAEzD,UAAI,cAAc,UAAa,cAAc,MAAM;AAC/C,+BAAuB,WAAW,IAAI;AAAA,MAC1C;AAEA,UAAI,YAAY,UAAa,YAAY,MAAM;AAC3C,+BAAuB,SAAS,IAAI;AAAA,MACxC;AAEA,UAAI,SAAS,UAAa,SAAS,MAAM;AACrC,+BAAuB,MAAM,IAAI;AAAA,MACrC;AAEA,UAAI,eAAe,UAAa,eAAe,MAAM;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AAQ,QAAQ,QAAW;AAAA,MAC3E,UAAU;AAAA,IACd,CAAC;AAAA,EACL;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAkBA,4BACI,oBAAwD,CAAC,GACI;AAC7D,WAAO,KAAK,UAAU,4BAA4B,iBAAiB;AAAA,EACvE;AACJ;;;AJ3EO,IAAM,SAAN,MAAa;AAAA,EAGhB,YAAY,QAA6B;AACrC,QAAI,QAAQ,sBAAsB;AAC9B,YAAM,gBAAgB,IAAI,oCAAqB,OAAO,oBAAoB;AAC1E,oBAAc,WAAW,cAAc,YAAY;AACnD,oBAAc,cAAc,cAAc,eAAe,CAAC;AAC1D,oBAAc,YAAY,UAAU;AAAA,QAChC,GAAI,cAAc,YAAY,WAAW,CAAC;AAAA,QAC1C,cAAc,GAAG,IAAI,IAAI,OAAO,aAAa,QAAQ,OAAO,SAAK,oBAAS,CAAC,SAAK,gBAAK,CAAC;AAAA,MAC1F;AACA,WAAK,UAAU,IAAI,QAAQ,aAAa;AAAA,IAC5C;AAAA,EACJ;AACJ;;;ADrBA,IAAAC,iBAaO;","names":["import_common","import_common","import_common"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/rebate.ts","../package.json","../src/rest-api/index.ts","../src/rest-api/modules/rebate-api.ts","../src/rest-api/rest-api.ts"],"sourcesContent":["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","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\": \"2.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\": \"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\": \"^8.4.0\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"1.0.2\",\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} [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 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 * @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"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,gBAA+B;AAC/B,IAAAA,iBAA+D;;;ACA3D,WAAQ;AAER,cAAW;;;ACHf;AAAA;AAAA;AAAA;AAAA;;;ACaA,oBAMO;AAMP,IAAM,6BAA6B,SAAU,eAAqC;AAC9E,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAmBH,6BAA6B,OACzB,WACA,SACA,MACA,eACuB;AACvB,YAAM,yBAAkD,CAAC;AAEzD,UAAI,cAAc,UAAa,cAAc,MAAM;AAC/C,+BAAuB,WAAW,IAAI;AAAA,MAC1C;AAEA,UAAI,YAAY,UAAa,YAAY,MAAM;AAC3C,+BAAuB,SAAS,IAAI;AAAA,MACxC;AAEA,UAAI,SAAS,UAAa,SAAS,MAAM;AACrC,+BAAuB,MAAM,IAAI;AAAA,MACrC;AAEA,UAAI,eAAe,UAAa,eAAe,MAAM;AACjD,+BAAuB,YAAY,IAAI;AAAA,MAC3C;AAEA,UAAI;AACJ,UAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,aAAO;AAAA,QACH,UAAU;AAAA,QACV,QAAQ;AAAA,QACR,QAAQ;AAAA,QACR,UAAU;AAAA,MACd;AAAA,I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CAAC,GACI;AAC7D,WAAO,KAAK,UAAU,4BAA4B,iBAAiB;AAAA,EACvE;AACJ;;;AJ3EO,IAAM,SAAN,MAAa;AAAA,EAGhB,YAAY,QAA6B;AACrC,QAAI,QAAQ,sBAAsB;AAC9B,YAAM,gBAAgB,IAAI,oCAAqB,OAAO,oBAAoB;AAC1E,oBAAc,WAAW,cAAc,YAAY;AACnD,oBAAc,cAAc,cAAc,eAAe,CAAC;AAC1D,oBAAc,YAAY,UAAU;AAAA,QAChC,GAAI,cAAc,YAAY,WAAW,CAAC;AAAA,QAC1C,cAAc,GAAG,IAAI,IAAI,OAAO,aAAa,QAAQ,OAAO,SAAK,oBAAS,CAAC,SAAK,gBAAK,CAAC;AAAA,MAC1F;AACA,WAAK,UAAU,IAAI,QAAQ,aAAa;AAAA,IAC5C;AAAA,EACJ;AACJ;;;ADrBA,IAAAC,iBAYO;","names":["import_common","import_common","import_common"]}
|
package/dist/index.mjs
CHANGED
|
@@ -10,7 +10,7 @@ import { ConfigurationRestAPI as ConfigurationRestAPI3, REBATE_REST_API_PROD_URL
|
|
|
10
10
|
|
|
11
11
|
// package.json
|
|
12
12
|
var name = "@binance/rebate";
|
|
13
|
-
var version = "
|
|
13
|
+
var version = "2.0.0";
|
|
14
14
|
|
|
15
15
|
// src/rest-api/index.ts
|
|
16
16
|
var rest_api_exports = {};
|
|
@@ -58,8 +58,7 @@ var RebateApiAxiosParamCreator = function(configuration) {
|
|
|
58
58
|
localVarQueryParameter["recvWindow"] = recvWindow;
|
|
59
59
|
}
|
|
60
60
|
let _timeUnit;
|
|
61
|
-
if ("timeUnit" in configuration)
|
|
62
|
-
_timeUnit = configuration.timeUnit;
|
|
61
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
63
62
|
return {
|
|
64
63
|
endpoint: "/sapi/v1/rebate/taxQuery",
|
|
65
64
|
method: "GET",
|
|
@@ -180,7 +179,6 @@ var Rebate = class {
|
|
|
180
179
|
// src/index.ts
|
|
181
180
|
import {
|
|
182
181
|
REBATE_REST_API_PROD_URL as REBATE_REST_API_PROD_URL2,
|
|
183
|
-
REBATE_REST_API_TESTNET_URL,
|
|
184
182
|
ConnectorClientError,
|
|
185
183
|
RequiredError,
|
|
186
184
|
UnauthorizedError,
|
|
@@ -199,7 +197,6 @@ export {
|
|
|
199
197
|
NetworkError,
|
|
200
198
|
NotFoundError,
|
|
201
199
|
REBATE_REST_API_PROD_URL2 as REBATE_REST_API_PROD_URL,
|
|
202
|
-
REBATE_REST_API_TESTNET_URL,
|
|
203
200
|
RateLimitBanError,
|
|
204
201
|
Rebate,
|
|
205
202
|
rest_api_exports as RebateRestAPI,
|
package/dist/index.mjs.map
CHANGED
|
@@ -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 { 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":";;;;;;;AAAA,SAAS,UAAU,YAAY;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K,SAAS,CAAC,KAAK,KAAK,CAAC;AAAA,MAC1F;AACA,WAAK,UAAU,IAAI,QAAQ,aAAa;AAAA,IAC5C;AAAA,EACJ;AACJ;;;AKrBA;AAAA,EACI,4BAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;","names":["ConfigurationRestAPI","sendRequest","sendRequest","ConfigurationRestAPI","REBATE_REST_API_PROD_URL"]}
|
|
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\": \"2.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\": \"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\": \"^8.4.0\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"1.0.2\",\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} [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 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 * @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":";;;;;;;AAAA,SAAS,UAAU,YAAY;AAC/B,SAAS,wBAAAA,uBAAsB,gCAAgC;;;ACA3D,WAAQ;AAER,cAAW;;;ACHf;AAA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a;AAAA,IAC5C;AAAA,EACJ;AACJ;;;AKrBA;AAAA,EACI,4BAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;","names":["ConfigurationRestAPI","sendRequest","sendRequest","ConfigurationRestAPI","REBATE_REST_API_PROD_URL"]}
|
package/package.json
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
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": "
|
|
4
|
+
"version": "2.0.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"require": "./dist/index.js",
|
|
11
|
+
"import": "./dist/index.mjs"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
8
14
|
"scripts": {
|
|
9
15
|
"prepublishOnly": "npm run build",
|
|
10
16
|
"build": "tsup",
|
|
@@ -44,12 +50,12 @@
|
|
|
44
50
|
"prettier": "^3.3.3",
|
|
45
51
|
"ts-jest": "^29.1.1",
|
|
46
52
|
"ts-node": "^10.9.1",
|
|
47
|
-
"tsup": "^
|
|
53
|
+
"tsup": "^8.4.0",
|
|
48
54
|
"typescript": "^5.7.2",
|
|
49
55
|
"typescript-eslint": "^8.24.0"
|
|
50
56
|
},
|
|
51
57
|
"dependencies": {
|
|
52
|
-
"@binance/common": "1.0.
|
|
58
|
+
"@binance/common": "1.0.2",
|
|
53
59
|
"axios": "^1.7.4"
|
|
54
60
|
}
|
|
55
61
|
}
|