Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions binance/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1759,6 +1759,9 @@ async def futures_symbol_ticker(self, **params):
async def futures_orderbook_ticker(self, **params):
return await self._request_futures_api("get", "ticker/bookTicker", data=params)

async def futures_index_price_constituents(self, **params):
return await self._request_futures_api("get", "constituents", data=params)

async def futures_liquidation_orders(self, **params):
return await self._request_futures_api(
"get", "forceOrders", signed=True, data=params
Expand Down Expand Up @@ -2056,6 +2059,9 @@ async def futures_coin_orderbook_ticker(self, **params):
"get", "ticker/bookTicker", data=params
)

async def futures_coin_index_price_constituents(self, **params):
return await self._request_futures_coin_api("get", "constituents", data=params)

async def futures_coin_liquidation_orders(self, **params):
return await self._request_futures_coin_api(
"get", "forceOrders", signed=True, data=params
Expand Down
16 changes: 16 additions & 0 deletions binance/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -7293,6 +7293,14 @@ def futures_orderbook_ticker(self, **params):
"""
return self._request_futures_api("get", "ticker/bookTicker", data=params)

def futures_index_price_constituents(self, **params):
"""Get index price constituents

https://binance-docs.github.io/apidocs/futures/en/#query-index-price-constituents

"""
return self._request_futures_api("get", "constituents", data=params)

def futures_liquidation_orders(self, **params):
"""Get all liquidation orders

Expand Down Expand Up @@ -7897,6 +7905,14 @@ def futures_coin_orderbook_ticker(self, **params):
"""
return self._request_futures_coin_api("get", "ticker/bookTicker", data=params)

def futures_coin_index_price_constituents(self, **params):
"""Get index price constituents

https://binance-docs.github.io/apidocs/delivery/en/#query-index-price-constituents

"""
return self._request_futures_coin_api("get", "constituents", data=params)

def futures_coin_liquidation_orders(self, **params):
"""Get all liquidation orders

Expand Down
8 changes: 8 additions & 0 deletions tests/test_async_client_futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ async def test_futures_orderbook_ticker(futuresClientAsync):
await futuresClientAsync.futures_orderbook_ticker()


async def test_futures_index_index_price_constituents(futuresClientAsync):
await futuresClientAsync.futures_index_price_constituents(symbol="BTCUSD")


async def test_futures_liquidation_orders(futuresClientAsync):
await futuresClientAsync.futures_liquidation_orders()

Expand Down Expand Up @@ -444,6 +448,10 @@ async def test_futures_coin_orderbook_ticker(futuresClientAsync):
await futuresClientAsync.futures_coin_orderbook_ticker()


async def test_futures_coin_index_index_price_constituents(futuresClientAsync):
await futuresClientAsync.futures_coin_index_price_constituents(symbol="BTCUSD")


@pytest.mark.skip(reason="Not implemented")
async def test_futures_coin_liquidation_orders(futuresClientAsync):
await futuresClientAsync.futures_coin_liquidation_orders()
Expand Down
4 changes: 4 additions & 0 deletions tests/test_client_futures.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ def test_futures_symbol_ticker(futuresClient):
def test_futures_orderbook_ticker(futuresClient):
futuresClient.futures_orderbook_ticker()

def test_futures_index_index_price_constituents(futuresClient):
futuresClient.futures_index_price_constituents(symbol="BTCUSD")

def test_futures_liquidation_orders(futuresClient):
futuresClient.futures_liquidation_orders()
Expand Down Expand Up @@ -445,6 +447,8 @@ def test_futures_coin_symbol_ticker(futuresClient):
def test_futures_coin_orderbook_ticker(futuresClient):
futuresClient.futures_coin_orderbook_ticker()

def test_futures_coin_index_index_price_constituents(futuresClient):
futuresClient.futures_coin_index_price_constituents(symbol="BTCUSD")

@pytest.mark.skip(reason="Not implemented")
def test_futures_coin_liquidation_orders(futuresClient):
Expand Down
Loading