-
Notifications
You must be signed in to change notification settings - Fork 209
Expand file tree
/
Copy pathrest-api.ts
More file actions
2313 lines (2211 loc) · 113 KB
/
rest-api.ts
File metadata and controls
2313 lines (2211 loc) · 113 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* Binance Derivatives Trading USDS Futures REST API
*
* OpenAPI Specification for the Binance Derivatives Trading USDS Futures REST API
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';
import { AccountApi } from './modules/account-api';
import { ConvertApi } from './modules/convert-api';
import { MarketDataApi } from './modules/market-data-api';
import { PortfolioMarginEndpointsApi } from './modules/portfolio-margin-endpoints-api';
import { TradeApi } from './modules/trade-api';
import { UserDataStreamsApi } from './modules/user-data-streams-api';
import type {
AccountInformationV2Request,
AccountInformationV3Request,
FuturesAccountBalanceV2Request,
FuturesAccountBalanceV3Request,
FuturesAccountConfigurationRequest,
FuturesTradingQuantitativeRulesIndicatorsRequest,
GetBnbBurnStatusRequest,
GetCurrentMultiAssetsModeRequest,
GetCurrentPositionModeRequest,
GetDownloadIdForFuturesOrderHistoryRequest,
GetDownloadIdForFuturesTradeHistoryRequest,
GetDownloadIdForFuturesTransactionHistoryRequest,
GetFuturesOrderHistoryDownloadLinkByIdRequest,
GetFuturesTradeDownloadLinkByIdRequest,
GetFuturesTransactionHistoryDownloadLinkByIdRequest,
GetIncomeHistoryRequest,
NotionalAndLeverageBracketsRequest,
QueryUserRateLimitRequest,
SymbolConfigurationRequest,
ToggleBnbBurnOnFuturesTradeRequest,
UserCommissionRateRequest,
} from './modules/account-api';
import type {
AcceptTheOfferedQuoteRequest,
ListAllConvertPairsRequest,
OrderStatusRequest,
SendQuoteRequestRequest,
} from './modules/convert-api';
import type {
AdlRiskRequest,
BasisRequest,
CompositeIndexSymbolInformationRequest,
CompressedAggregateTradesListRequest,
ContinuousContractKlineCandlestickDataRequest,
GetFundingRateHistoryRequest,
IndexPriceKlineCandlestickDataRequest,
KlineCandlestickDataRequest,
LongShortRatioRequest,
MarkPriceRequest,
MarkPriceKlineCandlestickDataRequest,
MultiAssetsModeAssetIndexRequest,
OldTradesLookupRequest,
OpenInterestRequest,
OpenInterestStatisticsRequest,
OrderBookRequest,
PremiumIndexKlineDataRequest,
QuarterlyContractSettlementPriceRequest,
QueryIndexPriceConstituentsRequest,
QueryInsuranceFundBalanceSnapshotRequest,
RecentTradesListRequest,
RpiOrderBookRequest,
SymbolOrderBookTickerRequest,
SymbolPriceTickerRequest,
SymbolPriceTickerV2Request,
TakerBuySellVolumeRequest,
Ticker24hrPriceChangeStatisticsRequest,
TopTraderLongShortRatioAccountsRequest,
TopTraderLongShortRatioPositionsRequest,
} from './modules/market-data-api';
import type { ClassicPortfolioMarginAccountInformationRequest } from './modules/portfolio-margin-endpoints-api';
import type {
AccountTradeListRequest,
AllOrdersRequest,
AutoCancelAllOpenOrdersRequest,
CancelAlgoOrderRequest,
CancelAllAlgoOpenOrdersRequest,
CancelAllOpenOrdersRequest,
CancelMultipleOrdersRequest,
CancelOrderRequest,
ChangeInitialLeverageRequest,
ChangeMarginTypeRequest,
ChangeMultiAssetsModeRequest,
ChangePositionModeRequest,
CurrentAllAlgoOpenOrdersRequest,
CurrentAllOpenOrdersRequest,
FuturesTradfiPerpsContractRequest,
GetOrderModifyHistoryRequest,
GetPositionMarginChangeHistoryRequest,
ModifyIsolatedPositionMarginRequest,
ModifyMultipleOrdersRequest,
ModifyOrderRequest,
NewAlgoOrderRequest,
NewOrderRequest,
PlaceMultipleOrdersRequest,
PositionAdlQuantileEstimationRequest,
PositionInformationV2Request,
PositionInformationV3Request,
QueryAlgoOrderRequest,
QueryAllAlgoOrdersRequest,
QueryCurrentOpenOrderRequest,
QueryOrderRequest,
TestOrderRequest,
UsersForceOrdersRequest,
} from './modules/trade-api';
import type {} from './modules/user-data-streams-api';
import type {
AccountInformationV2Response,
AccountInformationV3Response,
FuturesAccountBalanceV2Response,
FuturesAccountBalanceV3Response,
FuturesAccountConfigurationResponse,
FuturesTradingQuantitativeRulesIndicatorsResponse,
GetBnbBurnStatusResponse,
GetCurrentMultiAssetsModeResponse,
GetCurrentPositionModeResponse,
GetDownloadIdForFuturesOrderHistoryResponse,
GetDownloadIdForFuturesTradeHistoryResponse,
GetDownloadIdForFuturesTransactionHistoryResponse,
GetFuturesOrderHistoryDownloadLinkByIdResponse,
GetFuturesTradeDownloadLinkByIdResponse,
GetFuturesTransactionHistoryDownloadLinkByIdResponse,
GetIncomeHistoryResponse,
NotionalAndLeverageBracketsResponse,
QueryUserRateLimitResponse,
SymbolConfigurationResponse,
ToggleBnbBurnOnFuturesTradeResponse,
UserCommissionRateResponse,
} from './types';
import type {
AcceptTheOfferedQuoteResponse,
ListAllConvertPairsResponse,
OrderStatusResponse,
SendQuoteRequestResponse,
} from './types';
import type {
AdlRiskResponse,
BasisResponse,
CheckServerTimeResponse,
CompositeIndexSymbolInformationResponse,
CompressedAggregateTradesListResponse,
ContinuousContractKlineCandlestickDataResponse,
ExchangeInformationResponse,
GetFundingRateHistoryResponse,
GetFundingRateInfoResponse,
IndexPriceKlineCandlestickDataResponse,
KlineCandlestickDataResponse,
LongShortRatioResponse,
MarkPriceResponse,
MarkPriceKlineCandlestickDataResponse,
MultiAssetsModeAssetIndexResponse,
OldTradesLookupResponse,
OpenInterestResponse,
OpenInterestStatisticsResponse,
OrderBookResponse,
PremiumIndexKlineDataResponse,
QuarterlyContractSettlementPriceResponse,
QueryIndexPriceConstituentsResponse,
QueryInsuranceFundBalanceSnapshotResponse,
RecentTradesListResponse,
RpiOrderBookResponse,
SymbolOrderBookTickerResponse,
SymbolPriceTickerResponse,
SymbolPriceTickerV2Response,
TakerBuySellVolumeResponse,
Ticker24hrPriceChangeStatisticsResponse,
TopTraderLongShortRatioAccountsResponse,
TopTraderLongShortRatioPositionsResponse,
TradingScheduleResponse,
} from './types';
import type { ClassicPortfolioMarginAccountInformationResponse } from './types';
import type {
AccountTradeListResponse,
AllOrdersResponse,
AutoCancelAllOpenOrdersResponse,
CancelAlgoOrderResponse,
CancelAllAlgoOpenOrdersResponse,
CancelAllOpenOrdersResponse,
CancelMultipleOrdersResponse,
CancelOrderResponse,
ChangeInitialLeverageResponse,
ChangeMarginTypeResponse,
ChangeMultiAssetsModeResponse,
ChangePositionModeResponse,
CurrentAllAlgoOpenOrdersResponse,
CurrentAllOpenOrdersResponse,
GetOrderModifyHistoryResponse,
GetPositionMarginChangeHistoryResponse,
ModifyIsolatedPositionMarginResponse,
ModifyMultipleOrdersResponse,
ModifyOrderResponse,
NewAlgoOrderResponse,
NewOrderResponse,
PlaceMultipleOrdersResponse,
PositionAdlQuantileEstimationResponse,
PositionInformationV2Response,
PositionInformationV3Response,
QueryAlgoOrderResponse,
QueryAllAlgoOrdersResponse,
QueryCurrentOpenOrderResponse,
QueryOrderResponse,
TestOrderResponse,
UsersForceOrdersResponse,
} from './types';
import type { KeepaliveUserDataStreamResponse, StartUserDataStreamResponse } from './types';
export class RestAPI {
private configuration: ConfigurationRestAPI;
private accountApi: AccountApi;
private convertApi: ConvertApi;
private marketDataApi: MarketDataApi;
private portfolioMarginEndpointsApi: PortfolioMarginEndpointsApi;
private tradeApi: TradeApi;
private userDataStreamsApi: UserDataStreamsApi;
constructor(configuration: ConfigurationRestAPI) {
this.configuration = configuration;
this.accountApi = new AccountApi(configuration);
this.convertApi = new ConvertApi(configuration);
this.marketDataApi = new MarketDataApi(configuration);
this.portfolioMarginEndpointsApi = new PortfolioMarginEndpointsApi(configuration);
this.tradeApi = new TradeApi(configuration);
this.userDataStreamsApi = new UserDataStreamsApi(configuration);
}
/**
* Generic function to send a request.
* @param endpoint - The API endpoint to call.
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
* @param queryParams - Query parameters for the request.
* @param bodyParams - Body parameters for the request.
*
* @returns A promise resolving to the response data object.
*/
sendRequest<T>(
endpoint: string,
method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',
queryParams: Record<string, unknown> = {},
bodyParams: Record<string, unknown> = {}
): Promise<RestApiResponse<T>> {
return sendRequest<T>(
this.configuration,
endpoint,
method,
queryParams,
bodyParams,
undefined
);
}
/**
* Generic function to send a signed request.
* @param endpoint - The API endpoint to call.
* @param method - HTTP method to use (GET, POST, DELETE, etc.).
* @param queryParams - Query parameters for the request.
* @param bodyParams - Body parameters for the request.
*
* @returns A promise resolving to the response data object.
*/
sendSignedRequest<T>(
endpoint: string,
method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',
queryParams: Record<string, unknown> = {},
bodyParams: Record<string, unknown> = {}
): Promise<RestApiResponse<T>> {
return sendRequest<T>(
this.configuration,
endpoint,
method,
queryParams,
bodyParams,
undefined,
{ isSigned: true }
);
}
/**
* Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail.
*
* Weight: 5
*
* @summary Account Information V2(USER_DATA)
* @param {AccountInformationV2Request} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<AccountInformationV2Response>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V2 Binance API Documentation}
*/
accountInformationV2(
requestParameters: AccountInformationV2Request = {}
): Promise<RestApiResponse<AccountInformationV2Response>> {
return this.accountApi.accountInformationV2(requestParameters);
}
/**
* Get current account information. User in single-asset/ multi-assets mode will see different value, see comments in response section for detail.
*
* Weight: 5
*
* @summary Account Information V3(USER_DATA)
* @param {AccountInformationV3Request} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<AccountInformationV3Response>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Information-V3 Binance API Documentation}
*/
accountInformationV3(
requestParameters: AccountInformationV3Request = {}
): Promise<RestApiResponse<AccountInformationV3Response>> {
return this.accountApi.accountInformationV3(requestParameters);
}
/**
* Query account balance info
*
* Weight: 5
*
* @summary Futures Account Balance V2 (USER_DATA)
* @param {FuturesAccountBalanceV2Request} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<FuturesAccountBalanceV2Response>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V2 Binance API Documentation}
*/
futuresAccountBalanceV2(
requestParameters: FuturesAccountBalanceV2Request = {}
): Promise<RestApiResponse<FuturesAccountBalanceV2Response>> {
return this.accountApi.futuresAccountBalanceV2(requestParameters);
}
/**
* Query account balance info
*
* Weight: 5
*
* @summary Futures Account Balance V3 (USER_DATA)
* @param {FuturesAccountBalanceV3Request} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<FuturesAccountBalanceV3Response>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Futures-Account-Balance-V3 Binance API Documentation}
*/
futuresAccountBalanceV3(
requestParameters: FuturesAccountBalanceV3Request = {}
): Promise<RestApiResponse<FuturesAccountBalanceV3Response>> {
return this.accountApi.futuresAccountBalanceV3(requestParameters);
}
/**
* Query account configuration
*
* Weight: 5
*
* @summary Futures Account Configuration(USER_DATA)
* @param {FuturesAccountConfigurationRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<FuturesAccountConfigurationResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Account-Config Binance API Documentation}
*/
futuresAccountConfiguration(
requestParameters: FuturesAccountConfigurationRequest = {}
): Promise<RestApiResponse<FuturesAccountConfigurationResponse>> {
return this.accountApi.futuresAccountConfiguration(requestParameters);
}
/**
* Futures trading quantitative rules indicators, for more information on this, please refer to the [Futures Trading Quantitative Rules](https://www.binance.com/en/support/faq/4f462ebe6ff445d4a170be7d9e897272)
*
* Weight: - 1 for a single symbol
* - 10 when the symbol parameter is omitted
*
* @summary Futures Trading Quantitative Rules Indicators (USER_DATA)
* @param {FuturesTradingQuantitativeRulesIndicatorsRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<FuturesTradingQuantitativeRulesIndicatorsResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Futures-Trading-Quantitative-Rules-Indicators Binance API Documentation}
*/
futuresTradingQuantitativeRulesIndicators(
requestParameters: FuturesTradingQuantitativeRulesIndicatorsRequest = {}
): Promise<RestApiResponse<FuturesTradingQuantitativeRulesIndicatorsResponse>> {
return this.accountApi.futuresTradingQuantitativeRulesIndicators(requestParameters);
}
/**
* Get user's BNB Fee Discount (Fee Discount On or Fee Discount Off )
*
* Weight: 30
*
* @summary Get BNB Burn Status (USER_DATA)
* @param {GetBnbBurnStatusRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<GetBnbBurnStatusResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-BNB-Burn-Status Binance API Documentation}
*/
getBnbBurnStatus(
requestParameters: GetBnbBurnStatusRequest = {}
): Promise<RestApiResponse<GetBnbBurnStatusResponse>> {
return this.accountApi.getBnbBurnStatus(requestParameters);
}
/**
* Get user's Multi-Assets mode (Multi-Assets Mode or Single-Asset Mode) on ***Every symbol***
*
* Weight: 30
*
* @summary Get Current Multi-Assets Mode (USER_DATA)
* @param {GetCurrentMultiAssetsModeRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<GetCurrentMultiAssetsModeResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Current-Multi-Assets-Mode Binance API Documentation}
*/
getCurrentMultiAssetsMode(
requestParameters: GetCurrentMultiAssetsModeRequest = {}
): Promise<RestApiResponse<GetCurrentMultiAssetsModeResponse>> {
return this.accountApi.getCurrentMultiAssetsMode(requestParameters);
}
/**
* Get user's position mode (Hedge Mode or One-way Mode ) on ***EVERY symbol***
*
* Weight: 30
*
* @summary Get Current Position Mode(USER_DATA)
* @param {GetCurrentPositionModeRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<GetCurrentPositionModeResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode Binance API Documentation}
*/
getCurrentPositionMode(
requestParameters: GetCurrentPositionModeRequest = {}
): Promise<RestApiResponse<GetCurrentPositionModeResponse>> {
return this.accountApi.getCurrentPositionMode(requestParameters);
}
/**
* Get Download Id For Futures Order History
*
* Request Limitation is 10 times per month, shared by front end download page and rest api
* The time between `startTime` and `endTime` can not be longer than 1 year
*
* Weight: 1000
*
* @summary Get Download Id For Futures Order History (USER_DATA)
* @param {GetDownloadIdForFuturesOrderHistoryRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<GetDownloadIdForFuturesOrderHistoryResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Order-History Binance API Documentation}
*/
getDownloadIdForFuturesOrderHistory(
requestParameters: GetDownloadIdForFuturesOrderHistoryRequest
): Promise<RestApiResponse<GetDownloadIdForFuturesOrderHistoryResponse>> {
return this.accountApi.getDownloadIdForFuturesOrderHistory(requestParameters);
}
/**
* Get download id for futures trade history
*
* Request Limitation is 5 times per month, shared by front end download page and rest api
* The time between `startTime` and `endTime` can not be longer than 1 year
*
* Weight: 1000
*
* @summary Get Download Id For Futures Trade History (USER_DATA)
* @param {GetDownloadIdForFuturesTradeHistoryRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<GetDownloadIdForFuturesTradeHistoryResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Trade-History Binance API Documentation}
*/
getDownloadIdForFuturesTradeHistory(
requestParameters: GetDownloadIdForFuturesTradeHistoryRequest
): Promise<RestApiResponse<GetDownloadIdForFuturesTradeHistoryResponse>> {
return this.accountApi.getDownloadIdForFuturesTradeHistory(requestParameters);
}
/**
* Get download id for futures transaction history
*
* Request Limitation is 5 times per month, shared by front end download page and rest api
* The time between `startTime` and `endTime` can not be longer than 1 year
*
* Weight: 1000
*
* @summary Get Download Id For Futures Transaction History(USER_DATA)
* @param {GetDownloadIdForFuturesTransactionHistoryRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<GetDownloadIdForFuturesTransactionHistoryResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History Binance API Documentation}
*/
getDownloadIdForFuturesTransactionHistory(
requestParameters: GetDownloadIdForFuturesTransactionHistoryRequest
): Promise<RestApiResponse<GetDownloadIdForFuturesTransactionHistoryResponse>> {
return this.accountApi.getDownloadIdForFuturesTransactionHistory(requestParameters);
}
/**
* Get futures order history download link by Id
*
* Download link expiration: 24h
*
* Weight: 10
*
* @summary Get Futures Order History Download Link by Id (USER_DATA)
* @param {GetFuturesOrderHistoryDownloadLinkByIdRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<GetFuturesOrderHistoryDownloadLinkByIdResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Order-History-Download-Link-by-Id Binance API Documentation}
*/
getFuturesOrderHistoryDownloadLinkById(
requestParameters: GetFuturesOrderHistoryDownloadLinkByIdRequest
): Promise<RestApiResponse<GetFuturesOrderHistoryDownloadLinkByIdResponse>> {
return this.accountApi.getFuturesOrderHistoryDownloadLinkById(requestParameters);
}
/**
* Get futures trade download link by Id
*
* Download link expiration: 24h
*
* Weight: 10
*
* @summary Get Futures Trade Download Link by Id(USER_DATA)
* @param {GetFuturesTradeDownloadLinkByIdRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<GetFuturesTradeDownloadLinkByIdResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Trade-Download-Link-by-Id Binance API Documentation}
*/
getFuturesTradeDownloadLinkById(
requestParameters: GetFuturesTradeDownloadLinkByIdRequest
): Promise<RestApiResponse<GetFuturesTradeDownloadLinkByIdResponse>> {
return this.accountApi.getFuturesTradeDownloadLinkById(requestParameters);
}
/**
* Get futures transaction history download link by Id
*
* Download link expiration: 24h
*
* Weight: 10
*
* @summary Get Futures Transaction History Download Link by Id (USER_DATA)
* @param {GetFuturesTransactionHistoryDownloadLinkByIdRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<GetFuturesTransactionHistoryDownloadLinkByIdResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Futures-Transaction-History-Download-Link-by-Id Binance API Documentation}
*/
getFuturesTransactionHistoryDownloadLinkById(
requestParameters: GetFuturesTransactionHistoryDownloadLinkByIdRequest
): Promise<RestApiResponse<GetFuturesTransactionHistoryDownloadLinkByIdResponse>> {
return this.accountApi.getFuturesTransactionHistoryDownloadLinkById(requestParameters);
}
/**
* Query income history
*
* If neither `startTime` nor `endTime` is sent, the recent 7-day data will be returned.
* If `incomeType ` is not sent, all kinds of flow will be returned
* "trandId" is unique in the same incomeType for a user
* Income history only contains data for the last three months
*
* Weight: 30
*
* @summary Get Income History (USER_DATA)
* @param {GetIncomeHistoryRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<GetIncomeHistoryResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Income-History Binance API Documentation}
*/
getIncomeHistory(
requestParameters: GetIncomeHistoryRequest = {}
): Promise<RestApiResponse<GetIncomeHistoryResponse>> {
return this.accountApi.getIncomeHistory(requestParameters);
}
/**
* Query user notional and leverage bracket on speicfic symbol
*
* Weight: 1
*
* @summary Notional and Leverage Brackets (USER_DATA)
* @param {NotionalAndLeverageBracketsRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<NotionalAndLeverageBracketsResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Notional-and-Leverage-Brackets Binance API Documentation}
*/
notionalAndLeverageBrackets(
requestParameters: NotionalAndLeverageBracketsRequest = {}
): Promise<RestApiResponse<NotionalAndLeverageBracketsResponse>> {
return this.accountApi.notionalAndLeverageBrackets(requestParameters);
}
/**
* Query User Rate Limit
*
* Weight: 1
*
* @summary Query User Rate Limit (USER_DATA)
* @param {QueryUserRateLimitRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<QueryUserRateLimitResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Query-Rate-Limit Binance API Documentation}
*/
queryUserRateLimit(
requestParameters: QueryUserRateLimitRequest = {}
): Promise<RestApiResponse<QueryUserRateLimitResponse>> {
return this.accountApi.queryUserRateLimit(requestParameters);
}
/**
* Get current account symbol configuration.
*
* Weight: 5
*
* @summary Symbol Configuration(USER_DATA)
* @param {SymbolConfigurationRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<SymbolConfigurationResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Symbol-Config Binance API Documentation}
*/
symbolConfiguration(
requestParameters: SymbolConfigurationRequest = {}
): Promise<RestApiResponse<SymbolConfigurationResponse>> {
return this.accountApi.symbolConfiguration(requestParameters);
}
/**
* Change user's BNB Fee Discount (Fee Discount On or Fee Discount Off ) on ***EVERY symbol***
*
* Weight: 1
*
* @summary Toggle BNB Burn On Futures Trade (TRADE)
* @param {ToggleBnbBurnOnFuturesTradeRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<ToggleBnbBurnOnFuturesTradeResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Toggle-BNB-Burn-On-Futures-Trade Binance API Documentation}
*/
toggleBnbBurnOnFuturesTrade(
requestParameters: ToggleBnbBurnOnFuturesTradeRequest
): Promise<RestApiResponse<ToggleBnbBurnOnFuturesTradeResponse>> {
return this.accountApi.toggleBnbBurnOnFuturesTrade(requestParameters);
}
/**
* Get User Commission Rate
*
* Weight: 20
*
* @summary User Commission Rate (USER_DATA)
* @param {UserCommissionRateRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<UserCommissionRateResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate Binance API Documentation}
*/
userCommissionRate(
requestParameters: UserCommissionRateRequest
): Promise<RestApiResponse<UserCommissionRateResponse>> {
return this.accountApi.userCommissionRate(requestParameters);
}
/**
* Accept the offered quote by quote ID.
*
* Weight: 200(IP)
*
* @summary Accept the offered quote (USER_DATA)
* @param {AcceptTheOfferedQuoteRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<AcceptTheOfferedQuoteResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/convert/Accept-Quote Binance API Documentation}
*/
acceptTheOfferedQuote(
requestParameters: AcceptTheOfferedQuoteRequest
): Promise<RestApiResponse<AcceptTheOfferedQuoteResponse>> {
return this.convertApi.acceptTheOfferedQuote(requestParameters);
}
/**
* Query for all convertible token pairs and the tokens’ respective upper/lower limits
*
* User needs to supply either or both of the input parameter
* If not defined for both fromAsset and toAsset, only partial token pairs will be returned
* Asset BNFCR is only available to convert for MICA region users.
*
* Weight: 20(IP)
*
* @summary List All Convert Pairs
* @param {ListAllConvertPairsRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<ListAllConvertPairsResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/convert/ Binance API Documentation}
*/
listAllConvertPairs(
requestParameters: ListAllConvertPairsRequest = {}
): Promise<RestApiResponse<ListAllConvertPairsResponse>> {
return this.convertApi.listAllConvertPairs(requestParameters);
}
/**
* Query order status by order ID.
*
* Weight: 50(IP)
*
* @summary Order status(USER_DATA)
* @param {OrderStatusRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<OrderStatusResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/convert/Order-Status Binance API Documentation}
*/
orderStatus(
requestParameters: OrderStatusRequest = {}
): Promise<RestApiResponse<OrderStatusResponse>> {
return this.convertApi.orderStatus(requestParameters);
}
/**
* Request a quote for the requested token pairs
*
* Either fromAmount or toAmount should be sent
* `quoteId` will be returned only if you have enough funds to convert
*
* Weight: 50(IP)
*
* @summary Send Quote Request(USER_DATA)
* @param {SendQuoteRequestRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<SendQuoteRequestResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/convert/Send-quote-request Binance API Documentation}
*/
sendQuoteRequest(
requestParameters: SendQuoteRequestRequest
): Promise<RestApiResponse<SendQuoteRequestResponse>> {
return this.convertApi.sendQuoteRequest(requestParameters);
}
/**
* Query the symbol-level ADL risk rating.
* The ADL risk rating measures the likelihood of ADL during liquidation, and the rating takes into account the insurance fund balance, position concentration on the symbol, order book depth, price volatility, average leverage, unrealized PnL, and margin utilization at the symbol level.
* The rating can be high, medium and low, and is updated every 30 minutes.
*
* Weight: 1
*
* @summary ADL Risk
* @param {AdlRiskRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<AdlRiskResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/ADL-Risk Binance API Documentation}
*/
adlRisk(requestParameters: AdlRiskRequest = {}): Promise<RestApiResponse<AdlRiskResponse>> {
return this.marketDataApi.adlRisk(requestParameters);
}
/**
* Query future basis
*
* If startTime and endTime are not sent, the most recent data is returned.
* Only the data of the latest 30 days is available.
*
* Weight: 0
*
* @summary Basis
* @param {BasisRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<BasisResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Basis Binance API Documentation}
*/
basis(requestParameters: BasisRequest): Promise<RestApiResponse<BasisResponse>> {
return this.marketDataApi.basis(requestParameters);
}
/**
* Test connectivity to the Rest API and get the current server time.
*
* Weight: 1
*
* @summary Check Server Time
*
* @returns {Promise<RestApiResponse<CheckServerTimeResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time Binance API Documentation}
*/
checkServerTime(): Promise<RestApiResponse<CheckServerTimeResponse>> {
return this.marketDataApi.checkServerTime();
}
/**
* Query composite index symbol information
*
* Only for composite index symbols
*
* Weight: 1
*
* @summary Composite Index Symbol Information
* @param {CompositeIndexSymbolInformationRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<CompositeIndexSymbolInformationResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Composite-Index-Symbol-Information Binance API Documentation}
*/
compositeIndexSymbolInformation(
requestParameters: CompositeIndexSymbolInformationRequest = {}
): Promise<RestApiResponse<CompositeIndexSymbolInformationResponse>> {
return this.marketDataApi.compositeIndexSymbolInformation(requestParameters);
}
/**
* Get compressed, aggregate market trades. Market trades that fill in 100ms with the same price and the same taking side will have the quantity aggregated.
*
*
* Retail Price Improvement(RPI) orders are aggregated and without special tags to be distinguished.
* support querying futures trade histories that are not older than one year
* If both `startTime` and `endTime` are sent, time between `startTime` and `endTime` must be less than 1 hour.
* If `fromId`, `startTime`, and `endTime` are not sent, the most recent aggregate trades will be returned.
* Only market trades will be aggregated and returned, which means the insurance fund trades and ADL trades won't be aggregated.
* Sending both `startTime`/`endTime` and `fromId` might cause response timeout, please send either `fromId` or `startTime`/`endTime`
*
* Weight: 20
*
* @summary Compressed/Aggregate Trades List
* @param {CompressedAggregateTradesListRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<CompressedAggregateTradesListResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List Binance API Documentation}
*/
compressedAggregateTradesList(
requestParameters: CompressedAggregateTradesListRequest
): Promise<RestApiResponse<CompressedAggregateTradesListResponse>> {
return this.marketDataApi.compressedAggregateTradesList(requestParameters);
}
/**
* Kline/candlestick bars for a specific contract type.
* Klines are uniquely identified by their open time.
*
* If startTime and endTime are not sent, the most recent klines are returned.
* Contract type:
* PERPETUAL
* CURRENT_QUARTER
* NEXT_QUARTER
* TRADIFI_PERPETUAL
*
* Weight: based on parameter LIMIT
* | LIMIT | weight |
* | ----------- | ------ |
* | [1,100) | 1 |
* | [100, 500) | 2 |
* | [500, 1000] | 5 |
* | > 1000 | 10 |
*
* @summary Continuous Contract Kline/Candlestick Data
* @param {ContinuousContractKlineCandlestickDataRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<ContinuousContractKlineCandlestickDataResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data Binance API Documentation}
*/
continuousContractKlineCandlestickData(
requestParameters: ContinuousContractKlineCandlestickDataRequest
): Promise<RestApiResponse<ContinuousContractKlineCandlestickDataResponse>> {
return this.marketDataApi.continuousContractKlineCandlestickData(requestParameters);
}
/**
* Current exchange trading rules and symbol information
*
* Weight: 1
*
* @summary Exchange Information
*
* @returns {Promise<RestApiResponse<ExchangeInformationResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information Binance API Documentation}
*/
exchangeInformation(): Promise<RestApiResponse<ExchangeInformationResponse>> {
return this.marketDataApi.exchangeInformation();
}
/**
* Get Funding Rate History
*
*
* If `startTime` and `endTime` are not sent, the most recent 200 records are returned.
* If the number of data between `startTime` and `endTime` is larger than `limit`, return as `startTime` + `limit`.
* In ascending order.
*
* Weight: share 500/5min/IP rate limit with GET /fapi/v1/fundingInfo
*
* @summary Get Funding Rate History
* @param {GetFundingRateHistoryRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<GetFundingRateHistoryResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History Binance API Documentation}
*/
getFundingRateHistory(
requestParameters: GetFundingRateHistoryRequest = {}
): Promise<RestApiResponse<GetFundingRateHistoryResponse>> {
return this.marketDataApi.getFundingRateHistory(requestParameters);
}
/**
* Query funding rate info for symbols that had FundingRateCap/ FundingRateFloor / fundingIntervalHours adjustment
*
* Weight: 0
* share 500/5min/IP rate limit with GET /fapi/v1/fundingRate
*
* @summary Get Funding Rate Info
*
* @returns {Promise<RestApiResponse<GetFundingRateInfoResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-Info Binance API Documentation}
*/
getFundingRateInfo(): Promise<RestApiResponse<GetFundingRateInfoResponse>> {
return this.marketDataApi.getFundingRateInfo();
}
/**
* Kline/candlestick bars for the index price of a pair.
* Klines are uniquely identified by their open time.
*
*
* If startTime and endTime are not sent, the most recent klines are returned.
*
* Weight: based on parameter LIMIT
* | LIMIT | weight |
* | ----------- | ------ |
* | [1,100) | 1 |
* | [100, 500) | 2 |
* | [500, 1000] | 5 |
* | > 1000 | 10 |
*
* @summary Index Price Kline/Candlestick Data
* @param {IndexPriceKlineCandlestickDataRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<IndexPriceKlineCandlestickDataResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data Binance API Documentation}
*/
indexPriceKlineCandlestickData(
requestParameters: IndexPriceKlineCandlestickDataRequest
): Promise<RestApiResponse<IndexPriceKlineCandlestickDataResponse>> {
return this.marketDataApi.indexPriceKlineCandlestickData(requestParameters);
}
/**
* Kline/candlestick bars for a symbol.
* Klines are uniquely identified by their open time.
*
* If startTime and endTime are not sent, the most recent klines are returned.
*
* Weight: based on parameter LIMIT
* | LIMIT | weight |
* | ----------- | ------ |
* | [1,100) | 1 |
* | [100, 500) | 2 |
* | [500, 1000] | 5 |
* | > 1000 | 10 |
*
* @summary Kline/Candlestick Data
* @param {KlineCandlestickDataRequest} requestParameters Request parameters.
*
* @returns {Promise<RestApiResponse<KlineCandlestickDataResponse>>}
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
* @see {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data Binance API Documentation}
*/
klineCandlestickData(