@binance/copy-trading 3.1.17 → 4.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.d.mts +45 -33
- package/dist/index.d.ts +45 -33
- package/dist/index.js +25 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +25 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -3,9 +3,9 @@ import { BadRequestError, COPY_TRADING_REST_API_PROD_URL, ConfigurationRestAPI,
|
|
|
3
3
|
//#region src/rest-api/types/get-futures-lead-trader-status-response-data.d.ts
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Copy Trading REST API
|
|
7
7
|
*
|
|
8
|
-
*
|
|
8
|
+
* Automate lead trading via the Copy Trading API.
|
|
9
9
|
*
|
|
10
10
|
* The version of the OpenAPI document: 1.0.0
|
|
11
11
|
*
|
|
@@ -21,13 +21,13 @@ import { BadRequestError, COPY_TRADING_REST_API_PROD_URL, ConfigurationRestAPI,
|
|
|
21
21
|
*/
|
|
22
22
|
interface GetFuturesLeadTraderStatusResponseData {
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Whether the user is a futures lead trader
|
|
25
25
|
* @type {boolean}
|
|
26
26
|
* @memberof GetFuturesLeadTraderStatusResponseData
|
|
27
27
|
*/
|
|
28
28
|
isLeadTrader?: boolean;
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
30
|
+
* Server timestamp in milliseconds
|
|
31
31
|
* @type {number | bigint}
|
|
32
32
|
* @memberof GetFuturesLeadTraderStatusResponseData
|
|
33
33
|
*/
|
|
@@ -43,13 +43,13 @@ interface GetFuturesLeadTraderStatusResponseData {
|
|
|
43
43
|
*/
|
|
44
44
|
interface GetFuturesLeadTraderStatusResponse {
|
|
45
45
|
/**
|
|
46
|
-
*
|
|
46
|
+
* API response code. \"000000\" indicates success.
|
|
47
47
|
* @type {string}
|
|
48
48
|
* @memberof GetFuturesLeadTraderStatusResponse
|
|
49
49
|
*/
|
|
50
50
|
code?: string;
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* Response message.
|
|
53
53
|
* @type {string}
|
|
54
54
|
* @memberof GetFuturesLeadTraderStatusResponse
|
|
55
55
|
*/
|
|
@@ -61,7 +61,7 @@ interface GetFuturesLeadTraderStatusResponse {
|
|
|
61
61
|
*/
|
|
62
62
|
data?: GetFuturesLeadTraderStatusResponseData;
|
|
63
63
|
/**
|
|
64
|
-
*
|
|
64
|
+
* Whether request is successful
|
|
65
65
|
* @type {boolean}
|
|
66
66
|
* @memberof GetFuturesLeadTraderStatusResponse
|
|
67
67
|
*/
|
|
@@ -70,9 +70,9 @@ interface GetFuturesLeadTraderStatusResponse {
|
|
|
70
70
|
//#endregion
|
|
71
71
|
//#region src/rest-api/types/get-futures-lead-trading-symbol-whitelist-response-data-inner.d.ts
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* Copy Trading REST API
|
|
74
74
|
*
|
|
75
|
-
*
|
|
75
|
+
* Automate lead trading via the Copy Trading API.
|
|
76
76
|
*
|
|
77
77
|
* The version of the OpenAPI document: 1.0.0
|
|
78
78
|
*
|
|
@@ -88,19 +88,19 @@ interface GetFuturesLeadTraderStatusResponse {
|
|
|
88
88
|
*/
|
|
89
89
|
interface GetFuturesLeadTradingSymbolWhitelistResponseDataInner {
|
|
90
90
|
/**
|
|
91
|
-
*
|
|
91
|
+
* Trading symbol
|
|
92
92
|
* @type {string}
|
|
93
93
|
* @memberof GetFuturesLeadTradingSymbolWhitelistResponseDataInner
|
|
94
94
|
*/
|
|
95
95
|
symbol?: string;
|
|
96
96
|
/**
|
|
97
|
-
*
|
|
97
|
+
* Base asset
|
|
98
98
|
* @type {string}
|
|
99
99
|
* @memberof GetFuturesLeadTradingSymbolWhitelistResponseDataInner
|
|
100
100
|
*/
|
|
101
101
|
baseAsset?: string;
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* Quote asset
|
|
104
104
|
* @type {string}
|
|
105
105
|
* @memberof GetFuturesLeadTradingSymbolWhitelistResponseDataInner
|
|
106
106
|
*/
|
|
@@ -115,19 +115,19 @@ interface GetFuturesLeadTradingSymbolWhitelistResponseDataInner {
|
|
|
115
115
|
*/
|
|
116
116
|
interface GetFuturesLeadTradingSymbolWhitelistResponse {
|
|
117
117
|
/**
|
|
118
|
-
*
|
|
118
|
+
* API response code. \"000000\" indicates success.
|
|
119
119
|
* @type {string}
|
|
120
120
|
* @memberof GetFuturesLeadTradingSymbolWhitelistResponse
|
|
121
121
|
*/
|
|
122
122
|
code?: string;
|
|
123
123
|
/**
|
|
124
|
-
*
|
|
124
|
+
* Response message.
|
|
125
125
|
* @type {string}
|
|
126
126
|
* @memberof GetFuturesLeadTradingSymbolWhitelistResponse
|
|
127
127
|
*/
|
|
128
128
|
message?: string;
|
|
129
129
|
/**
|
|
130
|
-
*
|
|
130
|
+
* Whitelisted symbols for futures lead trading
|
|
131
131
|
* @type {Array<GetFuturesLeadTradingSymbolWhitelistResponseDataInner>}
|
|
132
132
|
* @memberof GetFuturesLeadTradingSymbolWhitelistResponse
|
|
133
133
|
*/
|
|
@@ -143,9 +143,11 @@ interface FutureCopyTradingApiInterface {
|
|
|
143
143
|
/**
|
|
144
144
|
* Get Futures Lead Trader Status
|
|
145
145
|
*
|
|
146
|
-
* Weight:
|
|
146
|
+
* Weight(IP): 1
|
|
147
|
+
*
|
|
148
|
+
* Security Type: TRADE
|
|
147
149
|
*
|
|
148
|
-
* @summary Get Futures Lead Trader Status(TRADE)
|
|
150
|
+
* @summary Get Futures Lead Trader Status (TRADE)
|
|
149
151
|
* @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.
|
|
150
152
|
*
|
|
151
153
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -155,9 +157,11 @@ interface FutureCopyTradingApiInterface {
|
|
|
155
157
|
/**
|
|
156
158
|
* Get Futures Lead Trading Symbol Whitelist
|
|
157
159
|
*
|
|
158
|
-
* Weight:
|
|
160
|
+
* Weight(IP): 1
|
|
161
|
+
*
|
|
162
|
+
* Security Type: USER_DATA
|
|
159
163
|
*
|
|
160
|
-
* @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)
|
|
164
|
+
* @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)
|
|
161
165
|
* @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.
|
|
162
166
|
*
|
|
163
167
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -171,7 +175,7 @@ interface FutureCopyTradingApiInterface {
|
|
|
171
175
|
*/
|
|
172
176
|
interface GetFuturesLeadTraderStatusRequest {
|
|
173
177
|
/**
|
|
174
|
-
*
|
|
178
|
+
* Request validity window in milliseconds
|
|
175
179
|
* @type {number | bigint}
|
|
176
180
|
* @memberof FutureCopyTradingApiGetFuturesLeadTraderStatus
|
|
177
181
|
*/
|
|
@@ -183,7 +187,7 @@ interface GetFuturesLeadTraderStatusRequest {
|
|
|
183
187
|
*/
|
|
184
188
|
interface GetFuturesLeadTradingSymbolWhitelistRequest {
|
|
185
189
|
/**
|
|
186
|
-
*
|
|
190
|
+
* Request validity window in milliseconds
|
|
187
191
|
* @type {number | bigint}
|
|
188
192
|
* @memberof FutureCopyTradingApiGetFuturesLeadTradingSymbolWhitelist
|
|
189
193
|
*/
|
|
@@ -200,27 +204,31 @@ declare class FutureCopyTradingApi implements FutureCopyTradingApiInterface {
|
|
|
200
204
|
/**
|
|
201
205
|
* Get Futures Lead Trader Status
|
|
202
206
|
*
|
|
203
|
-
* Weight:
|
|
207
|
+
* Weight(IP): 1
|
|
204
208
|
*
|
|
205
|
-
*
|
|
209
|
+
* Security Type: TRADE
|
|
210
|
+
*
|
|
211
|
+
* @summary Get Futures Lead Trader Status (TRADE)
|
|
206
212
|
* @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.
|
|
207
213
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}
|
|
208
214
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
209
215
|
* @memberof FutureCopyTradingApi
|
|
210
|
-
* @see {@link https://developers.binance.com/docs/
|
|
216
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status Binance API Documentation}
|
|
211
217
|
*/
|
|
212
218
|
getFuturesLeadTraderStatus(requestParameters?: GetFuturesLeadTraderStatusRequest): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>;
|
|
213
219
|
/**
|
|
214
220
|
* Get Futures Lead Trading Symbol Whitelist
|
|
215
221
|
*
|
|
216
|
-
* Weight:
|
|
222
|
+
* Weight(IP): 1
|
|
223
|
+
*
|
|
224
|
+
* Security Type: USER_DATA
|
|
217
225
|
*
|
|
218
|
-
* @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)
|
|
226
|
+
* @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)
|
|
219
227
|
* @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.
|
|
220
228
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}
|
|
221
229
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
222
230
|
* @memberof FutureCopyTradingApi
|
|
223
|
-
* @see {@link https://developers.binance.com/docs/
|
|
231
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist Binance API Documentation}
|
|
224
232
|
*/
|
|
225
233
|
getFuturesLeadTradingSymbolWhitelist(requestParameters?: GetFuturesLeadTradingSymbolWhitelistRequest): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>;
|
|
226
234
|
}
|
|
@@ -253,27 +261,31 @@ declare class RestAPI {
|
|
|
253
261
|
/**
|
|
254
262
|
* Get Futures Lead Trader Status
|
|
255
263
|
*
|
|
256
|
-
* Weight:
|
|
264
|
+
* Weight(IP): 1
|
|
257
265
|
*
|
|
258
|
-
*
|
|
266
|
+
* Security Type: TRADE
|
|
267
|
+
*
|
|
268
|
+
* @summary Get Futures Lead Trader Status (TRADE)
|
|
259
269
|
* @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.
|
|
260
270
|
*
|
|
261
271
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}
|
|
262
272
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
263
|
-
* @see {@link https://developers.binance.com/docs/
|
|
273
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status Binance API Documentation}
|
|
264
274
|
*/
|
|
265
275
|
getFuturesLeadTraderStatus(requestParameters?: GetFuturesLeadTraderStatusRequest): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>;
|
|
266
276
|
/**
|
|
267
277
|
* Get Futures Lead Trading Symbol Whitelist
|
|
268
278
|
*
|
|
269
|
-
* Weight:
|
|
279
|
+
* Weight(IP): 1
|
|
280
|
+
*
|
|
281
|
+
* Security Type: USER_DATA
|
|
270
282
|
*
|
|
271
|
-
* @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)
|
|
283
|
+
* @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)
|
|
272
284
|
* @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.
|
|
273
285
|
*
|
|
274
286
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}
|
|
275
287
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
276
|
-
* @see {@link https://developers.binance.com/docs/
|
|
288
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist Binance API Documentation}
|
|
277
289
|
*/
|
|
278
290
|
getFuturesLeadTradingSymbolWhitelist(requestParameters?: GetFuturesLeadTradingSymbolWhitelistRequest): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>;
|
|
279
291
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ import { BadRequestError, COPY_TRADING_REST_API_PROD_URL, ConfigurationRestAPI,
|
|
|
5
5
|
//#endregion
|
|
6
6
|
//#region src/rest-api/types/get-futures-lead-trader-status-response-data.d.ts
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Copy Trading REST API
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* Automate lead trading via the Copy Trading API.
|
|
11
11
|
*
|
|
12
12
|
* The version of the OpenAPI document: 1.0.0
|
|
13
13
|
*
|
|
@@ -23,13 +23,13 @@ import { BadRequestError, COPY_TRADING_REST_API_PROD_URL, ConfigurationRestAPI,
|
|
|
23
23
|
*/
|
|
24
24
|
interface GetFuturesLeadTraderStatusResponseData {
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Whether the user is a futures lead trader
|
|
27
27
|
* @type {boolean}
|
|
28
28
|
* @memberof GetFuturesLeadTraderStatusResponseData
|
|
29
29
|
*/
|
|
30
30
|
isLeadTrader?: boolean;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Server timestamp in milliseconds
|
|
33
33
|
* @type {number | bigint}
|
|
34
34
|
* @memberof GetFuturesLeadTraderStatusResponseData
|
|
35
35
|
*/
|
|
@@ -44,13 +44,13 @@ interface GetFuturesLeadTraderStatusResponseData {
|
|
|
44
44
|
*/
|
|
45
45
|
interface GetFuturesLeadTraderStatusResponse {
|
|
46
46
|
/**
|
|
47
|
-
*
|
|
47
|
+
* API response code. \"000000\" indicates success.
|
|
48
48
|
* @type {string}
|
|
49
49
|
* @memberof GetFuturesLeadTraderStatusResponse
|
|
50
50
|
*/
|
|
51
51
|
code?: string;
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* Response message.
|
|
54
54
|
* @type {string}
|
|
55
55
|
* @memberof GetFuturesLeadTraderStatusResponse
|
|
56
56
|
*/
|
|
@@ -62,7 +62,7 @@ interface GetFuturesLeadTraderStatusResponse {
|
|
|
62
62
|
*/
|
|
63
63
|
data?: GetFuturesLeadTraderStatusResponseData;
|
|
64
64
|
/**
|
|
65
|
-
*
|
|
65
|
+
* Whether request is successful
|
|
66
66
|
* @type {boolean}
|
|
67
67
|
* @memberof GetFuturesLeadTraderStatusResponse
|
|
68
68
|
*/
|
|
@@ -71,9 +71,9 @@ interface GetFuturesLeadTraderStatusResponse {
|
|
|
71
71
|
//#endregion
|
|
72
72
|
//#region src/rest-api/types/get-futures-lead-trading-symbol-whitelist-response-data-inner.d.ts
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
74
|
+
* Copy Trading REST API
|
|
75
75
|
*
|
|
76
|
-
*
|
|
76
|
+
* Automate lead trading via the Copy Trading API.
|
|
77
77
|
*
|
|
78
78
|
* The version of the OpenAPI document: 1.0.0
|
|
79
79
|
*
|
|
@@ -89,19 +89,19 @@ interface GetFuturesLeadTraderStatusResponse {
|
|
|
89
89
|
*/
|
|
90
90
|
interface GetFuturesLeadTradingSymbolWhitelistResponseDataInner {
|
|
91
91
|
/**
|
|
92
|
-
*
|
|
92
|
+
* Trading symbol
|
|
93
93
|
* @type {string}
|
|
94
94
|
* @memberof GetFuturesLeadTradingSymbolWhitelistResponseDataInner
|
|
95
95
|
*/
|
|
96
96
|
symbol?: string;
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
98
|
+
* Base asset
|
|
99
99
|
* @type {string}
|
|
100
100
|
* @memberof GetFuturesLeadTradingSymbolWhitelistResponseDataInner
|
|
101
101
|
*/
|
|
102
102
|
baseAsset?: string;
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
104
|
+
* Quote asset
|
|
105
105
|
* @type {string}
|
|
106
106
|
* @memberof GetFuturesLeadTradingSymbolWhitelistResponseDataInner
|
|
107
107
|
*/
|
|
@@ -116,19 +116,19 @@ interface GetFuturesLeadTradingSymbolWhitelistResponseDataInner {
|
|
|
116
116
|
*/
|
|
117
117
|
interface GetFuturesLeadTradingSymbolWhitelistResponse {
|
|
118
118
|
/**
|
|
119
|
-
*
|
|
119
|
+
* API response code. \"000000\" indicates success.
|
|
120
120
|
* @type {string}
|
|
121
121
|
* @memberof GetFuturesLeadTradingSymbolWhitelistResponse
|
|
122
122
|
*/
|
|
123
123
|
code?: string;
|
|
124
124
|
/**
|
|
125
|
-
*
|
|
125
|
+
* Response message.
|
|
126
126
|
* @type {string}
|
|
127
127
|
* @memberof GetFuturesLeadTradingSymbolWhitelistResponse
|
|
128
128
|
*/
|
|
129
129
|
message?: string;
|
|
130
130
|
/**
|
|
131
|
-
*
|
|
131
|
+
* Whitelisted symbols for futures lead trading
|
|
132
132
|
* @type {Array<GetFuturesLeadTradingSymbolWhitelistResponseDataInner>}
|
|
133
133
|
* @memberof GetFuturesLeadTradingSymbolWhitelistResponse
|
|
134
134
|
*/
|
|
@@ -144,9 +144,11 @@ interface FutureCopyTradingApiInterface {
|
|
|
144
144
|
/**
|
|
145
145
|
* Get Futures Lead Trader Status
|
|
146
146
|
*
|
|
147
|
-
* Weight:
|
|
147
|
+
* Weight(IP): 1
|
|
148
|
+
*
|
|
149
|
+
* Security Type: TRADE
|
|
148
150
|
*
|
|
149
|
-
* @summary Get Futures Lead Trader Status(TRADE)
|
|
151
|
+
* @summary Get Futures Lead Trader Status (TRADE)
|
|
150
152
|
* @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.
|
|
151
153
|
*
|
|
152
154
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -156,9 +158,11 @@ interface FutureCopyTradingApiInterface {
|
|
|
156
158
|
/**
|
|
157
159
|
* Get Futures Lead Trading Symbol Whitelist
|
|
158
160
|
*
|
|
159
|
-
* Weight:
|
|
161
|
+
* Weight(IP): 1
|
|
162
|
+
*
|
|
163
|
+
* Security Type: USER_DATA
|
|
160
164
|
*
|
|
161
|
-
* @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)
|
|
165
|
+
* @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)
|
|
162
166
|
* @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.
|
|
163
167
|
*
|
|
164
168
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
@@ -172,7 +176,7 @@ interface FutureCopyTradingApiInterface {
|
|
|
172
176
|
*/
|
|
173
177
|
interface GetFuturesLeadTraderStatusRequest {
|
|
174
178
|
/**
|
|
175
|
-
*
|
|
179
|
+
* Request validity window in milliseconds
|
|
176
180
|
* @type {number | bigint}
|
|
177
181
|
* @memberof FutureCopyTradingApiGetFuturesLeadTraderStatus
|
|
178
182
|
*/
|
|
@@ -184,7 +188,7 @@ interface GetFuturesLeadTraderStatusRequest {
|
|
|
184
188
|
*/
|
|
185
189
|
interface GetFuturesLeadTradingSymbolWhitelistRequest {
|
|
186
190
|
/**
|
|
187
|
-
*
|
|
191
|
+
* Request validity window in milliseconds
|
|
188
192
|
* @type {number | bigint}
|
|
189
193
|
* @memberof FutureCopyTradingApiGetFuturesLeadTradingSymbolWhitelist
|
|
190
194
|
*/
|
|
@@ -201,27 +205,31 @@ declare class FutureCopyTradingApi implements FutureCopyTradingApiInterface {
|
|
|
201
205
|
/**
|
|
202
206
|
* Get Futures Lead Trader Status
|
|
203
207
|
*
|
|
204
|
-
* Weight:
|
|
208
|
+
* Weight(IP): 1
|
|
205
209
|
*
|
|
206
|
-
*
|
|
210
|
+
* Security Type: TRADE
|
|
211
|
+
*
|
|
212
|
+
* @summary Get Futures Lead Trader Status (TRADE)
|
|
207
213
|
* @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.
|
|
208
214
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}
|
|
209
215
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
210
216
|
* @memberof FutureCopyTradingApi
|
|
211
|
-
* @see {@link https://developers.binance.com/docs/
|
|
217
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status Binance API Documentation}
|
|
212
218
|
*/
|
|
213
219
|
getFuturesLeadTraderStatus(requestParameters?: GetFuturesLeadTraderStatusRequest): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>;
|
|
214
220
|
/**
|
|
215
221
|
* Get Futures Lead Trading Symbol Whitelist
|
|
216
222
|
*
|
|
217
|
-
* Weight:
|
|
223
|
+
* Weight(IP): 1
|
|
224
|
+
*
|
|
225
|
+
* Security Type: USER_DATA
|
|
218
226
|
*
|
|
219
|
-
* @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)
|
|
227
|
+
* @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)
|
|
220
228
|
* @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.
|
|
221
229
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}
|
|
222
230
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
223
231
|
* @memberof FutureCopyTradingApi
|
|
224
|
-
* @see {@link https://developers.binance.com/docs/
|
|
232
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist Binance API Documentation}
|
|
225
233
|
*/
|
|
226
234
|
getFuturesLeadTradingSymbolWhitelist(requestParameters?: GetFuturesLeadTradingSymbolWhitelistRequest): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>;
|
|
227
235
|
}
|
|
@@ -254,27 +262,31 @@ declare class RestAPI {
|
|
|
254
262
|
/**
|
|
255
263
|
* Get Futures Lead Trader Status
|
|
256
264
|
*
|
|
257
|
-
* Weight:
|
|
265
|
+
* Weight(IP): 1
|
|
258
266
|
*
|
|
259
|
-
*
|
|
267
|
+
* Security Type: TRADE
|
|
268
|
+
*
|
|
269
|
+
* @summary Get Futures Lead Trader Status (TRADE)
|
|
260
270
|
* @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.
|
|
261
271
|
*
|
|
262
272
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}
|
|
263
273
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
264
|
-
* @see {@link https://developers.binance.com/docs/
|
|
274
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status Binance API Documentation}
|
|
265
275
|
*/
|
|
266
276
|
getFuturesLeadTraderStatus(requestParameters?: GetFuturesLeadTraderStatusRequest): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>;
|
|
267
277
|
/**
|
|
268
278
|
* Get Futures Lead Trading Symbol Whitelist
|
|
269
279
|
*
|
|
270
|
-
* Weight:
|
|
280
|
+
* Weight(IP): 1
|
|
281
|
+
*
|
|
282
|
+
* Security Type: USER_DATA
|
|
271
283
|
*
|
|
272
|
-
* @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)
|
|
284
|
+
* @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)
|
|
273
285
|
* @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.
|
|
274
286
|
*
|
|
275
287
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}
|
|
276
288
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
277
|
-
* @see {@link https://developers.binance.com/docs/
|
|
289
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist Binance API Documentation}
|
|
278
290
|
*/
|
|
279
291
|
getFuturesLeadTradingSymbolWhitelist(requestParameters?: GetFuturesLeadTradingSymbolWhitelistRequest): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>;
|
|
280
292
|
}
|
package/dist/index.js
CHANGED
|
@@ -14,14 +14,14 @@ let __binance_common = require("@binance/common");
|
|
|
14
14
|
|
|
15
15
|
//#region package.json
|
|
16
16
|
var name = "@binance/copy-trading";
|
|
17
|
-
var version = "
|
|
17
|
+
var version = "4.0.0";
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/rest-api/modules/future-copy-trading-api.ts
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Copy Trading REST API
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* Automate lead trading via the Copy Trading API.
|
|
25
25
|
*
|
|
26
26
|
* The version of the OpenAPI document: 1.0.0
|
|
27
27
|
*
|
|
@@ -81,14 +81,16 @@ var FutureCopyTradingApi = class {
|
|
|
81
81
|
/**
|
|
82
82
|
* Get Futures Lead Trader Status
|
|
83
83
|
*
|
|
84
|
-
* Weight:
|
|
84
|
+
* Weight(IP): 1
|
|
85
85
|
*
|
|
86
|
-
*
|
|
86
|
+
* Security Type: TRADE
|
|
87
|
+
*
|
|
88
|
+
* @summary Get Futures Lead Trader Status (TRADE)
|
|
87
89
|
* @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.
|
|
88
90
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}
|
|
89
91
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
90
92
|
* @memberof FutureCopyTradingApi
|
|
91
|
-
* @see {@link https://developers.binance.com/docs/
|
|
93
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status Binance API Documentation}
|
|
92
94
|
*/
|
|
93
95
|
async getFuturesLeadTraderStatus(requestParameters = {}) {
|
|
94
96
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFuturesLeadTraderStatus(requestParameters?.recvWindow);
|
|
@@ -97,14 +99,16 @@ var FutureCopyTradingApi = class {
|
|
|
97
99
|
/**
|
|
98
100
|
* Get Futures Lead Trading Symbol Whitelist
|
|
99
101
|
*
|
|
100
|
-
* Weight:
|
|
102
|
+
* Weight(IP): 1
|
|
103
|
+
*
|
|
104
|
+
* Security Type: USER_DATA
|
|
101
105
|
*
|
|
102
|
-
* @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)
|
|
106
|
+
* @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)
|
|
103
107
|
* @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.
|
|
104
108
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}
|
|
105
109
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
106
110
|
* @memberof FutureCopyTradingApi
|
|
107
|
-
* @see {@link https://developers.binance.com/docs/
|
|
111
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist Binance API Documentation}
|
|
108
112
|
*/
|
|
109
113
|
async getFuturesLeadTradingSymbolWhitelist(requestParameters = {}) {
|
|
110
114
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFuturesLeadTradingSymbolWhitelist(requestParameters?.recvWindow);
|
|
@@ -115,9 +119,9 @@ var FutureCopyTradingApi = class {
|
|
|
115
119
|
//#endregion
|
|
116
120
|
//#region src/rest-api/rest-api.ts
|
|
117
121
|
/**
|
|
118
|
-
*
|
|
122
|
+
* Copy Trading REST API
|
|
119
123
|
*
|
|
120
|
-
*
|
|
124
|
+
* Automate lead trading via the Copy Trading API.
|
|
121
125
|
*
|
|
122
126
|
* The version of the OpenAPI document: 1.0.0
|
|
123
127
|
*
|
|
@@ -158,14 +162,16 @@ var RestAPI = class {
|
|
|
158
162
|
/**
|
|
159
163
|
* Get Futures Lead Trader Status
|
|
160
164
|
*
|
|
161
|
-
* Weight:
|
|
165
|
+
* Weight(IP): 1
|
|
162
166
|
*
|
|
163
|
-
*
|
|
167
|
+
* Security Type: TRADE
|
|
168
|
+
*
|
|
169
|
+
* @summary Get Futures Lead Trader Status (TRADE)
|
|
164
170
|
* @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.
|
|
165
171
|
*
|
|
166
172
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}
|
|
167
173
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
168
|
-
* @see {@link https://developers.binance.com/docs/
|
|
174
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status Binance API Documentation}
|
|
169
175
|
*/
|
|
170
176
|
getFuturesLeadTraderStatus(requestParameters = {}) {
|
|
171
177
|
return this.futureCopyTradingApi.getFuturesLeadTraderStatus(requestParameters);
|
|
@@ -173,14 +179,16 @@ var RestAPI = class {
|
|
|
173
179
|
/**
|
|
174
180
|
* Get Futures Lead Trading Symbol Whitelist
|
|
175
181
|
*
|
|
176
|
-
* Weight:
|
|
182
|
+
* Weight(IP): 1
|
|
183
|
+
*
|
|
184
|
+
* Security Type: USER_DATA
|
|
177
185
|
*
|
|
178
|
-
* @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)
|
|
186
|
+
* @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)
|
|
179
187
|
* @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.
|
|
180
188
|
*
|
|
181
189
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}
|
|
182
190
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
183
|
-
* @see {@link https://developers.binance.com/docs/
|
|
191
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist Binance API Documentation}
|
|
184
192
|
*/
|
|
185
193
|
getFuturesLeadTradingSymbolWhitelist(requestParameters = {}) {
|
|
186
194
|
return this.futureCopyTradingApi.getFuturesLeadTradingSymbolWhitelist(requestParameters);
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","COPY_TRADING_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/future-copy-trading-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/copy-trading.ts"],"sourcesContent":["{\n \"name\": \"@binance/copy-trading\",\n \"description\": \"Official Binance Copy Trading Connector - A lightweight library that provides a convenient interface to Binance's Copy Trading REST API.\",\n \"version\": \"3.1.17\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Copy Trading\",\n \"Connector\",\n \"REST\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.4.1\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Copy Trading REST API\n *\n * OpenAPI Specification for the Binance Copy Trading 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 {\n GetFuturesLeadTraderStatusResponse,\n GetFuturesLeadTradingSymbolWhitelistResponse,\n} from '../types';\n\n/**\n * FutureCopyTradingApi - axios parameter creator\n */\nconst FutureCopyTradingApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Futures Lead Trader Status\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trader Status(TRADE)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFuturesLeadTraderStatus: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\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/copyTrading/futures/userStatus',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFuturesLeadTradingSymbolWhitelist: async (\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\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/copyTrading/futures/leadSymbol',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * FutureCopyTradingApi - interface\n * @interface FutureCopyTradingApi\n */\nexport interface FutureCopyTradingApiInterface {\n /**\n * Get Futures Lead Trader Status\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trader Status(TRADE)\n * @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApiInterface\n */\n getFuturesLeadTraderStatus(\n requestParameters?: GetFuturesLeadTraderStatusRequest\n ): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>;\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)\n * @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApiInterface\n */\n getFuturesLeadTradingSymbolWhitelist(\n requestParameters?: GetFuturesLeadTradingSymbolWhitelistRequest\n ): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>;\n}\n\n/**\n * Request parameters for getFuturesLeadTraderStatus operation in FutureCopyTradingApi.\n * @interface GetFuturesLeadTraderStatusRequest\n */\nexport interface GetFuturesLeadTraderStatusRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof FutureCopyTradingApiGetFuturesLeadTraderStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getFuturesLeadTradingSymbolWhitelist operation in FutureCopyTradingApi.\n * @interface GetFuturesLeadTradingSymbolWhitelistRequest\n */\nexport interface GetFuturesLeadTradingSymbolWhitelistRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof FutureCopyTradingApiGetFuturesLeadTradingSymbolWhitelist\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * FutureCopyTradingApi - object-oriented interface\n * @class FutureCopyTradingApi\n */\nexport class FutureCopyTradingApi implements FutureCopyTradingApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = FutureCopyTradingApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Futures Lead Trader Status\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trader Status(TRADE)\n * @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApi\n * @see {@link https://developers.binance.com/docs/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status Binance API Documentation}\n */\n public async getFuturesLeadTraderStatus(\n requestParameters: GetFuturesLeadTraderStatusRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFuturesLeadTraderStatus(\n requestParameters?.recvWindow\n );\n return sendRequest<GetFuturesLeadTraderStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)\n * @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApi\n * @see {@link https://developers.binance.com/docs/copy_trading/future-copy-trading/Get-Futures-Lead-Trading-Symbol-Whitelist Binance API Documentation}\n */\n public async getFuturesLeadTradingSymbolWhitelist(\n requestParameters: GetFuturesLeadTradingSymbolWhitelistRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.getFuturesLeadTradingSymbolWhitelist(\n requestParameters?.recvWindow\n );\n return sendRequest<GetFuturesLeadTradingSymbolWhitelistResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Copy Trading REST API\n *\n * OpenAPI Specification for the Binance Copy Trading 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 { FutureCopyTradingApi } from './modules/future-copy-trading-api';\n\nimport type {\n GetFuturesLeadTraderStatusRequest,\n GetFuturesLeadTradingSymbolWhitelistRequest,\n} from './modules/future-copy-trading-api';\n\nimport type {\n GetFuturesLeadTraderStatusResponse,\n GetFuturesLeadTradingSymbolWhitelistResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private futureCopyTradingApi: FutureCopyTradingApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.futureCopyTradingApi = new FutureCopyTradingApi(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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined\n );\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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Get Futures Lead Trader Status\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trader Status(TRADE)\n * @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status Binance API Documentation}\n */\n getFuturesLeadTraderStatus(\n requestParameters: GetFuturesLeadTraderStatusRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>> {\n return this.futureCopyTradingApi.getFuturesLeadTraderStatus(requestParameters);\n }\n\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)\n * @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/copy_trading/future-copy-trading/Get-Futures-Lead-Trading-Symbol-Whitelist Binance API Documentation}\n */\n getFuturesLeadTradingSymbolWhitelist(\n requestParameters: GetFuturesLeadTradingSymbolWhitelistRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>> {\n return this.futureCopyTradingApi.getFuturesLeadTradingSymbolWhitelist(requestParameters);\n }\n}\n","/**\n * Binance Copy Trading REST API\n *\n * OpenAPI Specification for the Binance Copy Trading REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import {\n buildUserAgent,\n ConfigurationRestAPI,\n COPY_TRADING_REST_API_PROD_URL,\n} from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationCopyTrading {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class CopyTrading {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationCopyTrading) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || COPY_TRADING_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;ACyBf,MAAM,wCAAwC,SAAU,eAAqC;AACzF,QAAO;EAWH,4BAA4B,OAAO,eAAuD;GACtF,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;GAG3C,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,cAAc;IACd,UAAU;IACb;;EAYL,sCAAsC,OAClC,eACuB;GACvB,MAAMH,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;GAG3C,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,cAAc;IACd,UAAU;IACb;;EAER;;;;;;AAoEL,IAAa,uBAAb,MAA2E;CAIvE,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,4BAA4B,sCAAsC,cAAc;;;;;;;;;;;;;;CAezF,MAAa,2BACT,oBAAuD,EAAE,EACG;EAC5D,MAAM,oBAAoB,MAAM,KAAK,0BAA0B,2BAC3D,mBAAmB,WACtB;AACD,2CACI,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,aAClB,kBAAkB,YAClB,kBAAkB,cAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;CAeL,MAAa,qCACT,oBAAiE,EAAE,EACG;EACtE,MAAM,oBACF,MAAM,KAAK,0BAA0B,qCACjC,mBAAmB,WACtB;AACL,2CACI,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,aAClB,kBAAkB,YAClB,kBAAkB,cAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;AC3MT,IAAa,UAAb,MAAqB;CAIjB,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,uBAAuB,IAAI,qBAAqB,cAAc;;;;;;;;;;;CAYvE,YACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,2CACI,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,OACH;;;;;;;;;;;CAYL,kBACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,2CACI,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;CAeL,2BACI,oBAAuD,EAAE,EACG;AAC5D,SAAO,KAAK,qBAAqB,2BAA2B,kBAAkB;;;;;;;;;;;;;;CAelF,qCACI,oBAAiE,EAAE,EACG;AACtE,SAAO,KAAK,qBAAqB,qCAAqC,kBAAkB;;;;;;;;;;;;;AE7GhG,IAAa,cAAb,MAAyB;CAGrB,YAAY,QAAkC;EAC1C,MAAM,iDAA2B,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAIC,sCACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","COPY_TRADING_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/future-copy-trading-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/copy-trading.ts"],"sourcesContent":["{\n \"name\": \"@binance/copy-trading\",\n \"description\": \"Official Binance Copy Trading Connector - A lightweight library that provides a convenient interface to Binance's Copy Trading REST API.\",\n \"version\": \"4.0.0\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Copy Trading\",\n \"Connector\",\n \"REST\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.5.8\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.4.3\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Copy Trading REST API\n *\n * Automate lead trading via the Copy Trading 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 */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n GetFuturesLeadTraderStatusResponse,\n GetFuturesLeadTradingSymbolWhitelistResponse,\n} from '../types';\n\n/**\n * FutureCopyTradingApi - axios parameter creator\n */\nconst FutureCopyTradingApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Futures Lead Trader Status\n *\n * Weight(IP): 1\n *\n * Security Type: TRADE\n *\n * @summary Get Futures Lead Trader Status (TRADE)\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getFuturesLeadTraderStatus: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\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/copyTrading/futures/userStatus',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getFuturesLeadTradingSymbolWhitelist: async (\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\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/copyTrading/futures/leadSymbol',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * FutureCopyTradingApi - interface\n * @interface FutureCopyTradingApi\n */\nexport interface FutureCopyTradingApiInterface {\n /**\n * Get Futures Lead Trader Status\n *\n * Weight(IP): 1\n *\n * Security Type: TRADE\n *\n * @summary Get Futures Lead Trader Status (TRADE)\n * @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApiInterface\n */\n getFuturesLeadTraderStatus(\n requestParameters?: GetFuturesLeadTraderStatusRequest\n ): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>;\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)\n * @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApiInterface\n */\n getFuturesLeadTradingSymbolWhitelist(\n requestParameters?: GetFuturesLeadTradingSymbolWhitelistRequest\n ): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>;\n}\n\n/**\n * Request parameters for getFuturesLeadTraderStatus operation in FutureCopyTradingApi.\n * @interface GetFuturesLeadTraderStatusRequest\n */\nexport interface GetFuturesLeadTraderStatusRequest {\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof FutureCopyTradingApiGetFuturesLeadTraderStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getFuturesLeadTradingSymbolWhitelist operation in FutureCopyTradingApi.\n * @interface GetFuturesLeadTradingSymbolWhitelistRequest\n */\nexport interface GetFuturesLeadTradingSymbolWhitelistRequest {\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof FutureCopyTradingApiGetFuturesLeadTradingSymbolWhitelist\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * FutureCopyTradingApi - object-oriented interface\n * @class FutureCopyTradingApi\n */\nexport class FutureCopyTradingApi implements FutureCopyTradingApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = FutureCopyTradingApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Futures Lead Trader Status\n *\n * Weight(IP): 1\n *\n * Security Type: TRADE\n *\n * @summary Get Futures Lead Trader Status (TRADE)\n * @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApi\n * @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status Binance API Documentation}\n */\n public async getFuturesLeadTraderStatus(\n requestParameters: GetFuturesLeadTraderStatusRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFuturesLeadTraderStatus(\n requestParameters?.recvWindow\n );\n return sendRequest<GetFuturesLeadTraderStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)\n * @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApi\n * @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist Binance API Documentation}\n */\n public async getFuturesLeadTradingSymbolWhitelist(\n requestParameters: GetFuturesLeadTradingSymbolWhitelistRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.getFuturesLeadTradingSymbolWhitelist(\n requestParameters?.recvWindow\n );\n return sendRequest<GetFuturesLeadTradingSymbolWhitelistResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Copy Trading REST API\n *\n * Automate lead trading via the Copy Trading 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 { FutureCopyTradingApi } from './modules/future-copy-trading-api';\n\nimport type {\n GetFuturesLeadTraderStatusRequest,\n GetFuturesLeadTradingSymbolWhitelistRequest,\n} from './modules/future-copy-trading-api';\n\nimport type {\n GetFuturesLeadTraderStatusResponse,\n GetFuturesLeadTradingSymbolWhitelistResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private futureCopyTradingApi: FutureCopyTradingApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.futureCopyTradingApi = new FutureCopyTradingApi(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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined\n );\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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Get Futures Lead Trader Status\n *\n * Weight(IP): 1\n *\n * Security Type: TRADE\n *\n * @summary Get Futures Lead Trader Status (TRADE)\n * @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status Binance API Documentation}\n */\n getFuturesLeadTraderStatus(\n requestParameters: GetFuturesLeadTraderStatusRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>> {\n return this.futureCopyTradingApi.getFuturesLeadTraderStatus(requestParameters);\n }\n\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)\n * @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist Binance API Documentation}\n */\n getFuturesLeadTradingSymbolWhitelist(\n requestParameters: GetFuturesLeadTradingSymbolWhitelistRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>> {\n return this.futureCopyTradingApi.getFuturesLeadTradingSymbolWhitelist(requestParameters);\n }\n}\n","/**\n * Copy Trading REST API\n *\n * Automate lead trading via the Copy Trading API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import {\n buildUserAgent,\n ConfigurationRestAPI,\n COPY_TRADING_REST_API_PROD_URL,\n} from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationCopyTrading {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class CopyTrading {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationCopyTrading) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || COPY_TRADING_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;ACwBf,MAAM,wCAAwC,SAAU,eAAqC;AACzF,QAAO;EAaH,4BAA4B,OAAO,eAAuD;GACtF,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;GAG3C,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,cAAc;IACd,UAAU;IACb;;EAcL,sCAAsC,OAClC,eACuB;GACvB,MAAMH,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;GAG3C,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,cAAc;IACd,UAAU;IACb;;EAER;;;;;;AAwEL,IAAa,uBAAb,MAA2E;CAIvE,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,4BAA4B,sCAAsC,cAAc;;;;;;;;;;;;;;;;CAiBzF,MAAa,2BACT,oBAAuD,EAAE,EACG;EAC5D,MAAM,oBAAoB,MAAM,KAAK,0BAA0B,2BAC3D,mBAAmB,WACtB;AACD,2CACI,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,aAClB,kBAAkB,YAClB,kBAAkB,cAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;CAiBL,MAAa,qCACT,oBAAiE,EAAE,EACG;EACtE,MAAM,oBACF,MAAM,KAAK,0BAA0B,qCACjC,mBAAmB,WACtB;AACL,2CACI,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,aAClB,kBAAkB,YAClB,kBAAkB,cAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;ACtNT,IAAa,UAAb,MAAqB;CAIjB,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,uBAAuB,IAAI,qBAAqB,cAAc;;;;;;;;;;;CAYvE,YACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,2CACI,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,OACH;;;;;;;;;;;CAYL,kBACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,2CACI,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;CAiBL,2BACI,oBAAuD,EAAE,EACG;AAC5D,SAAO,KAAK,qBAAqB,2BAA2B,kBAAkB;;;;;;;;;;;;;;;;CAiBlF,qCACI,oBAAiE,EAAE,EACG;AACtE,SAAO,KAAK,qBAAqB,qCAAqC,kBAAkB;;;;;;;;;;;;;AEjHhG,IAAa,cAAb,MAAyB;CAGrB,YAAY,QAAkC;EAC1C,MAAM,iDAA2B,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAIC,sCACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
|
package/dist/index.mjs
CHANGED
|
@@ -3,14 +3,14 @@ import { BadRequestError, COPY_TRADING_REST_API_PROD_URL, COPY_TRADING_REST_API_
|
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
5
|
var name = "@binance/copy-trading";
|
|
6
|
-
var version = "
|
|
6
|
+
var version = "4.0.0";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/rest-api/modules/future-copy-trading-api.ts
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Copy Trading REST API
|
|
12
12
|
*
|
|
13
|
-
*
|
|
13
|
+
* Automate lead trading via the Copy Trading API.
|
|
14
14
|
*
|
|
15
15
|
* The version of the OpenAPI document: 1.0.0
|
|
16
16
|
*
|
|
@@ -70,14 +70,16 @@ var FutureCopyTradingApi = class {
|
|
|
70
70
|
/**
|
|
71
71
|
* Get Futures Lead Trader Status
|
|
72
72
|
*
|
|
73
|
-
* Weight:
|
|
73
|
+
* Weight(IP): 1
|
|
74
74
|
*
|
|
75
|
-
*
|
|
75
|
+
* Security Type: TRADE
|
|
76
|
+
*
|
|
77
|
+
* @summary Get Futures Lead Trader Status (TRADE)
|
|
76
78
|
* @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.
|
|
77
79
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}
|
|
78
80
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
79
81
|
* @memberof FutureCopyTradingApi
|
|
80
|
-
* @see {@link https://developers.binance.com/docs/
|
|
82
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status Binance API Documentation}
|
|
81
83
|
*/
|
|
82
84
|
async getFuturesLeadTraderStatus(requestParameters = {}) {
|
|
83
85
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFuturesLeadTraderStatus(requestParameters?.recvWindow);
|
|
@@ -86,14 +88,16 @@ var FutureCopyTradingApi = class {
|
|
|
86
88
|
/**
|
|
87
89
|
* Get Futures Lead Trading Symbol Whitelist
|
|
88
90
|
*
|
|
89
|
-
* Weight:
|
|
91
|
+
* Weight(IP): 1
|
|
92
|
+
*
|
|
93
|
+
* Security Type: USER_DATA
|
|
90
94
|
*
|
|
91
|
-
* @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)
|
|
95
|
+
* @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)
|
|
92
96
|
* @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.
|
|
93
97
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}
|
|
94
98
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
95
99
|
* @memberof FutureCopyTradingApi
|
|
96
|
-
* @see {@link https://developers.binance.com/docs/
|
|
100
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist Binance API Documentation}
|
|
97
101
|
*/
|
|
98
102
|
async getFuturesLeadTradingSymbolWhitelist(requestParameters = {}) {
|
|
99
103
|
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFuturesLeadTradingSymbolWhitelist(requestParameters?.recvWindow);
|
|
@@ -104,9 +108,9 @@ var FutureCopyTradingApi = class {
|
|
|
104
108
|
//#endregion
|
|
105
109
|
//#region src/rest-api/rest-api.ts
|
|
106
110
|
/**
|
|
107
|
-
*
|
|
111
|
+
* Copy Trading REST API
|
|
108
112
|
*
|
|
109
|
-
*
|
|
113
|
+
* Automate lead trading via the Copy Trading API.
|
|
110
114
|
*
|
|
111
115
|
* The version of the OpenAPI document: 1.0.0
|
|
112
116
|
*
|
|
@@ -147,14 +151,16 @@ var RestAPI = class {
|
|
|
147
151
|
/**
|
|
148
152
|
* Get Futures Lead Trader Status
|
|
149
153
|
*
|
|
150
|
-
* Weight:
|
|
154
|
+
* Weight(IP): 1
|
|
151
155
|
*
|
|
152
|
-
*
|
|
156
|
+
* Security Type: TRADE
|
|
157
|
+
*
|
|
158
|
+
* @summary Get Futures Lead Trader Status (TRADE)
|
|
153
159
|
* @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.
|
|
154
160
|
*
|
|
155
161
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}
|
|
156
162
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
157
|
-
* @see {@link https://developers.binance.com/docs/
|
|
163
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status Binance API Documentation}
|
|
158
164
|
*/
|
|
159
165
|
getFuturesLeadTraderStatus(requestParameters = {}) {
|
|
160
166
|
return this.futureCopyTradingApi.getFuturesLeadTraderStatus(requestParameters);
|
|
@@ -162,14 +168,16 @@ var RestAPI = class {
|
|
|
162
168
|
/**
|
|
163
169
|
* Get Futures Lead Trading Symbol Whitelist
|
|
164
170
|
*
|
|
165
|
-
* Weight:
|
|
171
|
+
* Weight(IP): 1
|
|
172
|
+
*
|
|
173
|
+
* Security Type: USER_DATA
|
|
166
174
|
*
|
|
167
|
-
* @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)
|
|
175
|
+
* @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)
|
|
168
176
|
* @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.
|
|
169
177
|
*
|
|
170
178
|
* @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}
|
|
171
179
|
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
172
|
-
* @see {@link https://developers.binance.com/docs/
|
|
180
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist Binance API Documentation}
|
|
173
181
|
*/
|
|
174
182
|
getFuturesLeadTradingSymbolWhitelist(requestParameters = {}) {
|
|
175
183
|
return this.futureCopyTradingApi.getFuturesLeadTradingSymbolWhitelist(requestParameters);
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","COPY_TRADING_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/future-copy-trading-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/copy-trading.ts"],"sourcesContent":["{\n \"name\": \"@binance/copy-trading\",\n \"description\": \"Official Binance Copy Trading Connector - A lightweight library that provides a convenient interface to Binance's Copy Trading REST API.\",\n \"version\": \"3.1.17\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Copy Trading\",\n \"Connector\",\n \"REST\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.4.1\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Copy Trading REST API\n *\n * OpenAPI Specification for the Binance Copy Trading 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 {\n GetFuturesLeadTraderStatusResponse,\n GetFuturesLeadTradingSymbolWhitelistResponse,\n} from '../types';\n\n/**\n * FutureCopyTradingApi - axios parameter creator\n */\nconst FutureCopyTradingApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Futures Lead Trader Status\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trader Status(TRADE)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFuturesLeadTraderStatus: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\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/copyTrading/futures/userStatus',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)\n * @param {number | bigint} [recvWindow]\n *\n * @throws {RequiredError}\n */\n getFuturesLeadTradingSymbolWhitelist: async (\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\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/copyTrading/futures/leadSymbol',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * FutureCopyTradingApi - interface\n * @interface FutureCopyTradingApi\n */\nexport interface FutureCopyTradingApiInterface {\n /**\n * Get Futures Lead Trader Status\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trader Status(TRADE)\n * @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApiInterface\n */\n getFuturesLeadTraderStatus(\n requestParameters?: GetFuturesLeadTraderStatusRequest\n ): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>;\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)\n * @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApiInterface\n */\n getFuturesLeadTradingSymbolWhitelist(\n requestParameters?: GetFuturesLeadTradingSymbolWhitelistRequest\n ): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>;\n}\n\n/**\n * Request parameters for getFuturesLeadTraderStatus operation in FutureCopyTradingApi.\n * @interface GetFuturesLeadTraderStatusRequest\n */\nexport interface GetFuturesLeadTraderStatusRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof FutureCopyTradingApiGetFuturesLeadTraderStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getFuturesLeadTradingSymbolWhitelist operation in FutureCopyTradingApi.\n * @interface GetFuturesLeadTradingSymbolWhitelistRequest\n */\nexport interface GetFuturesLeadTradingSymbolWhitelistRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof FutureCopyTradingApiGetFuturesLeadTradingSymbolWhitelist\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * FutureCopyTradingApi - object-oriented interface\n * @class FutureCopyTradingApi\n */\nexport class FutureCopyTradingApi implements FutureCopyTradingApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = FutureCopyTradingApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Futures Lead Trader Status\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trader Status(TRADE)\n * @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApi\n * @see {@link https://developers.binance.com/docs/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status Binance API Documentation}\n */\n public async getFuturesLeadTraderStatus(\n requestParameters: GetFuturesLeadTraderStatusRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFuturesLeadTraderStatus(\n requestParameters?.recvWindow\n );\n return sendRequest<GetFuturesLeadTraderStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)\n * @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApi\n * @see {@link https://developers.binance.com/docs/copy_trading/future-copy-trading/Get-Futures-Lead-Trading-Symbol-Whitelist Binance API Documentation}\n */\n public async getFuturesLeadTradingSymbolWhitelist(\n requestParameters: GetFuturesLeadTradingSymbolWhitelistRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.getFuturesLeadTradingSymbolWhitelist(\n requestParameters?.recvWindow\n );\n return sendRequest<GetFuturesLeadTradingSymbolWhitelistResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Copy Trading REST API\n *\n * OpenAPI Specification for the Binance Copy Trading 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 { FutureCopyTradingApi } from './modules/future-copy-trading-api';\n\nimport type {\n GetFuturesLeadTraderStatusRequest,\n GetFuturesLeadTradingSymbolWhitelistRequest,\n} from './modules/future-copy-trading-api';\n\nimport type {\n GetFuturesLeadTraderStatusResponse,\n GetFuturesLeadTradingSymbolWhitelistResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private futureCopyTradingApi: FutureCopyTradingApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.futureCopyTradingApi = new FutureCopyTradingApi(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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined\n );\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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Get Futures Lead Trader Status\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trader Status(TRADE)\n * @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/copy_trading/future-copy-trading/Get-Futures-Lead-Trader-Status Binance API Documentation}\n */\n getFuturesLeadTraderStatus(\n requestParameters: GetFuturesLeadTraderStatusRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>> {\n return this.futureCopyTradingApi.getFuturesLeadTraderStatus(requestParameters);\n }\n\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight: 20\n *\n * @summary Get Futures Lead Trading Symbol Whitelist(USER_DATA)\n * @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/copy_trading/future-copy-trading/Get-Futures-Lead-Trading-Symbol-Whitelist Binance API Documentation}\n */\n getFuturesLeadTradingSymbolWhitelist(\n requestParameters: GetFuturesLeadTradingSymbolWhitelistRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>> {\n return this.futureCopyTradingApi.getFuturesLeadTradingSymbolWhitelist(requestParameters);\n }\n}\n","/**\n * Binance Copy Trading REST API\n *\n * OpenAPI Specification for the Binance Copy Trading REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import {\n buildUserAgent,\n ConfigurationRestAPI,\n COPY_TRADING_REST_API_PROD_URL,\n} from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationCopyTrading {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class CopyTrading {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationCopyTrading) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || COPY_TRADING_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;ACyBf,MAAM,wCAAwC,SAAU,eAAqC;AACzF,QAAO;EAWH,4BAA4B,OAAO,eAAuD;GACtF,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;GAG3C,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,cAAc;IACd,UAAU;IACb;;EAYL,sCAAsC,OAClC,eACuB;GACvB,MAAMH,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;GAG3C,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,cAAc;IACd,UAAU;IACb;;EAER;;;;;;AAoEL,IAAa,uBAAb,MAA2E;CAIvE,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,4BAA4B,sCAAsC,cAAc;;;;;;;;;;;;;;CAezF,MAAa,2BACT,oBAAuD,EAAE,EACG;EAC5D,MAAM,oBAAoB,MAAM,KAAK,0BAA0B,2BAC3D,mBAAmB,WACtB;AACD,SAAO,YACH,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,aAClB,kBAAkB,YAClB,kBAAkB,cAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;CAeL,MAAa,qCACT,oBAAiE,EAAE,EACG;EACtE,MAAM,oBACF,MAAM,KAAK,0BAA0B,qCACjC,mBAAmB,WACtB;AACL,SAAO,YACH,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,aAClB,kBAAkB,YAClB,kBAAkB,cAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;AC3MT,IAAa,UAAb,MAAqB;CAIjB,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,uBAAuB,IAAI,qBAAqB,cAAc;;;;;;;;;;;CAYvE,YACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,SAAO,YACH,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,OACH;;;;;;;;;;;CAYL,kBACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,SAAO,YACH,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;CAeL,2BACI,oBAAuD,EAAE,EACG;AAC5D,SAAO,KAAK,qBAAqB,2BAA2B,kBAAkB;;;;;;;;;;;;;;CAelF,qCACI,oBAAiE,EAAE,EACG;AACtE,SAAO,KAAK,qBAAqB,qCAAqC,kBAAkB;;;;;;;;;;;;;AE7GhG,IAAa,cAAb,MAAyB;CAGrB,YAAY,QAAkC;EAC1C,MAAM,YAAY,eAAe,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAI,qBACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
|
|
1
|
+
{"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","COPY_TRADING_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/future-copy-trading-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/copy-trading.ts"],"sourcesContent":["{\n \"name\": \"@binance/copy-trading\",\n \"description\": \"Official Binance Copy Trading Connector - A lightweight library that provides a convenient interface to Binance's Copy Trading REST API.\",\n \"version\": \"4.0.0\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsdown\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Copy Trading\",\n \"Connector\",\n \"REST\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.5.8\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.4.3\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Copy Trading REST API\n *\n * Automate lead trading via the Copy Trading 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 */\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n GetFuturesLeadTraderStatusResponse,\n GetFuturesLeadTradingSymbolWhitelistResponse,\n} from '../types';\n\n/**\n * FutureCopyTradingApi - axios parameter creator\n */\nconst FutureCopyTradingApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Futures Lead Trader Status\n *\n * Weight(IP): 1\n *\n * Security Type: TRADE\n *\n * @summary Get Futures Lead Trader Status (TRADE)\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getFuturesLeadTraderStatus: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\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/copyTrading/futures/userStatus',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)\n * @param {number | bigint} [recvWindow] Request validity window in milliseconds\n *\n * @throws {RequiredError}\n */\n getFuturesLeadTradingSymbolWhitelist: async (\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\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/copyTrading/futures/leadSymbol',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * FutureCopyTradingApi - interface\n * @interface FutureCopyTradingApi\n */\nexport interface FutureCopyTradingApiInterface {\n /**\n * Get Futures Lead Trader Status\n *\n * Weight(IP): 1\n *\n * Security Type: TRADE\n *\n * @summary Get Futures Lead Trader Status (TRADE)\n * @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApiInterface\n */\n getFuturesLeadTraderStatus(\n requestParameters?: GetFuturesLeadTraderStatusRequest\n ): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>;\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)\n * @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApiInterface\n */\n getFuturesLeadTradingSymbolWhitelist(\n requestParameters?: GetFuturesLeadTradingSymbolWhitelistRequest\n ): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>;\n}\n\n/**\n * Request parameters for getFuturesLeadTraderStatus operation in FutureCopyTradingApi.\n * @interface GetFuturesLeadTraderStatusRequest\n */\nexport interface GetFuturesLeadTraderStatusRequest {\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof FutureCopyTradingApiGetFuturesLeadTraderStatus\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getFuturesLeadTradingSymbolWhitelist operation in FutureCopyTradingApi.\n * @interface GetFuturesLeadTradingSymbolWhitelistRequest\n */\nexport interface GetFuturesLeadTradingSymbolWhitelistRequest {\n /**\n * Request validity window in milliseconds\n * @type {number | bigint}\n * @memberof FutureCopyTradingApiGetFuturesLeadTradingSymbolWhitelist\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * FutureCopyTradingApi - object-oriented interface\n * @class FutureCopyTradingApi\n */\nexport class FutureCopyTradingApi implements FutureCopyTradingApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = FutureCopyTradingApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Futures Lead Trader Status\n *\n * Weight(IP): 1\n *\n * Security Type: TRADE\n *\n * @summary Get Futures Lead Trader Status (TRADE)\n * @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApi\n * @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status Binance API Documentation}\n */\n public async getFuturesLeadTraderStatus(\n requestParameters: GetFuturesLeadTraderStatusRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getFuturesLeadTraderStatus(\n requestParameters?.recvWindow\n );\n return sendRequest<GetFuturesLeadTraderStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)\n * @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof FutureCopyTradingApi\n * @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist Binance API Documentation}\n */\n public async getFuturesLeadTradingSymbolWhitelist(\n requestParameters: GetFuturesLeadTradingSymbolWhitelistRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.getFuturesLeadTradingSymbolWhitelist(\n requestParameters?.recvWindow\n );\n return sendRequest<GetFuturesLeadTradingSymbolWhitelistResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Copy Trading REST API\n *\n * Automate lead trading via the Copy Trading 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 { FutureCopyTradingApi } from './modules/future-copy-trading-api';\n\nimport type {\n GetFuturesLeadTraderStatusRequest,\n GetFuturesLeadTradingSymbolWhitelistRequest,\n} from './modules/future-copy-trading-api';\n\nimport type {\n GetFuturesLeadTraderStatusResponse,\n GetFuturesLeadTradingSymbolWhitelistResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private futureCopyTradingApi: FutureCopyTradingApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.futureCopyTradingApi = new FutureCopyTradingApi(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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined\n );\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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined,\n { isSigned: true }\n );\n }\n\n /**\n * Get Futures Lead Trader Status\n *\n * Weight(IP): 1\n *\n * Security Type: TRADE\n *\n * @summary Get Futures Lead Trader Status (TRADE)\n * @param {GetFuturesLeadTraderStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trader-status Binance API Documentation}\n */\n getFuturesLeadTraderStatus(\n requestParameters: GetFuturesLeadTraderStatusRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTraderStatusResponse>> {\n return this.futureCopyTradingApi.getFuturesLeadTraderStatus(requestParameters);\n }\n\n /**\n * Get Futures Lead Trading Symbol Whitelist\n *\n * Weight(IP): 1\n *\n * Security Type: USER_DATA\n *\n * @summary Get Futures Lead Trading Symbol Whitelist (USER_DATA)\n * @param {GetFuturesLeadTradingSymbolWhitelistRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-copy-trading/api/rest-api/future-copy-trading#get-futures-lead-trading-symbol-whitelist Binance API Documentation}\n */\n getFuturesLeadTradingSymbolWhitelist(\n requestParameters: GetFuturesLeadTradingSymbolWhitelistRequest = {}\n ): Promise<RestApiResponse<GetFuturesLeadTradingSymbolWhitelistResponse>> {\n return this.futureCopyTradingApi.getFuturesLeadTradingSymbolWhitelist(requestParameters);\n }\n}\n","/**\n * Copy Trading REST API\n *\n * Automate lead trading via the Copy Trading API.\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","import {\n buildUserAgent,\n ConfigurationRestAPI,\n COPY_TRADING_REST_API_PROD_URL,\n} from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationCopyTrading {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class CopyTrading {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationCopyTrading) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || COPY_TRADING_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n"],"mappings":";;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;ACwBf,MAAM,wCAAwC,SAAU,eAAqC;AACzF,QAAO;EAaH,4BAA4B,OAAO,eAAuD;GACtF,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;GAG3C,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,cAAc;IACd,UAAU;IACb;;EAcL,sCAAsC,OAClC,eACuB;GACvB,MAAMH,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;GAG3C,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,cAAc;IACd,UAAU;IACb;;EAER;;;;;;AAwEL,IAAa,uBAAb,MAA2E;CAIvE,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,4BAA4B,sCAAsC,cAAc;;;;;;;;;;;;;;;;CAiBzF,MAAa,2BACT,oBAAuD,EAAE,EACG;EAC5D,MAAM,oBAAoB,MAAM,KAAK,0BAA0B,2BAC3D,mBAAmB,WACtB;AACD,SAAO,YACH,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,aAClB,kBAAkB,YAClB,kBAAkB,cAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;CAiBL,MAAa,qCACT,oBAAiE,EAAE,EACG;EACtE,MAAM,oBACF,MAAM,KAAK,0BAA0B,qCACjC,mBAAmB,WACtB;AACL,SAAO,YACH,KAAK,eACL,kBAAkB,UAClB,kBAAkB,QAClB,kBAAkB,aAClB,kBAAkB,YAClB,kBAAkB,cAClB,mBAAmB,UACnB,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;;;ACtNT,IAAa,UAAb,MAAqB;CAIjB,YAAY,eAAqC;AAC7C,OAAK,gBAAgB;AACrB,OAAK,uBAAuB,IAAI,qBAAqB,cAAc;;;;;;;;;;;CAYvE,YACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,SAAO,YACH,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,OACH;;;;;;;;;;;CAYL,kBACI,UACA,QACA,cAAuC,EAAE,EACzC,aAAsC,EAAE,EACb;AAC3B,SAAO,YACH,KAAK,eACL,UACA,QACA,aACA,YACA,QACA,QACA,EAAE,UAAU,MAAM,CACrB;;;;;;;;;;;;;;;;CAiBL,2BACI,oBAAuD,EAAE,EACG;AAC5D,SAAO,KAAK,qBAAqB,2BAA2B,kBAAkB;;;;;;;;;;;;;;;;CAiBlF,qCACI,oBAAiE,EAAE,EACG;AACtE,SAAO,KAAK,qBAAqB,qCAAqC,kBAAkB;;;;;;;;;;;;;AEjHhG,IAAa,cAAb,MAAyB;CAGrB,YAAY,QAAkC;EAC1C,MAAM,YAAY,eAAe,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAI,qBACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@binance/copy-trading",
|
|
3
3
|
"description": "Official Binance Copy Trading Connector - A lightweight library that provides a convenient interface to Binance's Copy Trading REST API.",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "4.0.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@types/node": "^20.17.24",
|
|
47
47
|
"eslint": "8.57.0",
|
|
48
48
|
"jest": "^29.6.4",
|
|
49
|
-
"json-with-bigint": "^3.
|
|
49
|
+
"json-with-bigint": "^3.5.8",
|
|
50
50
|
"prettier": "^3.3.3",
|
|
51
51
|
"ts-jest": "^29.1.1",
|
|
52
52
|
"ts-node": "^10.9.1",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"typescript-eslint": "^8.24.0"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@binance/common": "2.4.
|
|
58
|
+
"@binance/common": "2.4.3",
|
|
59
59
|
"axios": "^1.7.4"
|
|
60
60
|
}
|
|
61
61
|
}
|