@@ -698,6 +698,14 @@ def _klines(
698698 return self .futures_klines (** params )
699699 elif HistoricalKlinesType .FUTURES_COIN == klines_type :
700700 return self .futures_coin_klines (** params )
701+ elif HistoricalKlinesType .FUTURES_MARK_PRICE == klines_type :
702+ return self .futures_mark_price_klines (** params )
703+ elif HistoricalKlinesType .FUTURES_INDEX_PRICE == klines_type :
704+ return self .futures_index_price_klines (** params )
705+ elif HistoricalKlinesType .FUTURES_COIN_MARK_PRICE == klines_type :
706+ return self .futures_coin_mark_price_klines (** params )
707+ elif HistoricalKlinesType .FUTURES_COIN_INDEX_PRICE == klines_type :
708+ return self .futures_coin_index_price_klines (** params )
701709 else :
702710 raise NotImplementedException (klines_type )
703711
@@ -7092,6 +7100,30 @@ def futures_klines(self, **params):
70927100 """
70937101 return self ._request_futures_api ("get" , "klines" , data = params )
70947102
7103+ def futures_mark_price_klines (self , ** params ):
7104+ """Kline/candlestick bars for the mark price of a symbol. Klines are uniquely identified by their open time.
7105+
7106+ https://binance-docs.github.io/apidocs/futures/en/#mark-price-kline-candlestick-data
7107+
7108+ """
7109+ return self ._request_futures_api ("get" , "markPriceKlines" , data = params )
7110+
7111+ def futures_index_price_klines (self , ** params ):
7112+ """Kline/candlestick bars for the index price of a symbol. Klines are uniquely identified by their open time.
7113+
7114+ https://binance-docs.github.io/apidocs/futures/en/#index-price-kline-candlestick-data
7115+
7116+ """
7117+ return self ._request_futures_api ("get" , "indexPriceKlines" , data = params )
7118+
7119+ def futures_premium_index_klines (self , ** params ):
7120+ """Premium index kline bars of a symbol.l. Klines are uniquely identified by their open time.
7121+
7122+ https://binance-docs.github.io/apidocs/futures/en/#premium-index-kline-data
7123+
7124+ """
7125+ return self ._request_futures_api ("get" , "premiumIndexKlines" , data = params )
7126+
70957127 def futures_continous_klines (self , ** params ):
70967128 """Kline/candlestick bars for a specific contract type. Klines are uniquely identified by their open time.
70977129
@@ -7128,6 +7160,34 @@ def futures_historical_klines(
71287160 klines_type = HistoricalKlinesType .FUTURES ,
71297161 )
71307162
7163+ def futures_historical_mark_price_klines (
7164+ self , symbol , interval , start_str , end_str = None , limit = 500
7165+ ):
7166+ """Get historical futures mark price klines from Binance
7167+
7168+ :param symbol: Name of symbol pair e.g. BNBBTC
7169+ :type symbol: str
7170+ :param interval: Binance Kline interval
7171+ :type interval: str
7172+ :param start_str: Start date string in UTC format or timestamp in milliseconds
7173+ :type start_str: str|int
7174+ :param end_str: optional - end date string in UTC format or timestamp in milliseconds (default will fetch everything up to now)
7175+ :type end_str: str|int
7176+ :param limit: Default 500; max 1000.
7177+ :type limit: int
7178+
7179+ :return: list of OHLCV values (Open time, Open, High, Low, Close, Volume, Close time, Quote asset volume, Number of trades, Taker buy base asset volume, Taker buy quote asset volume, Ignore)
7180+
7181+ """
7182+ return self ._historical_klines (
7183+ symbol ,
7184+ interval ,
7185+ start_str ,
7186+ end_str = end_str ,
7187+ limit = limit ,
7188+ klines_type = HistoricalKlinesType .FUTURES_MARK_PRICE ,
7189+ )
7190+
71317191 def futures_historical_klines_generator (
71327192 self , symbol , interval , start_str , end_str = None
71337193 ):
@@ -7769,6 +7829,14 @@ def futures_coin_index_price_klines(self, **params):
77697829 """
77707830 return self ._request_futures_coin_api ("get" , "indexPriceKlines" , data = params )
77717831
7832+ def futures_coin_premium_index_klines (self , ** params ):
7833+ """Kline/candlestick bars for the index price of a pair..
7834+
7835+ https://binance-docs.github.io/apidocs/delivery/en/#premium-index-kline-data
7836+
7837+ """
7838+ return self ._request_futures_coin_api ("get" , "premiumIndexKlines" , data = params )
7839+
77727840 def futures_coin_mark_price_klines (self , ** params ):
77737841 """Kline/candlestick bars for the index price of a pair..
77747842
0 commit comments