Skip to content

[help] How can I fetch liquidation data of all the users in futures?  #1060

Description

@avatar-lavventura
  • Python version: 3.7
  • OS: macOS Big Sur 11.6
  • python-binance==1.0.15

On these sites (https://coinalyze.net/ethereum-classic/liquidations/, BTC/USDT), I am able to add following indications into graph [Liquidations, Long Liquidations, Short Liquidations, Aggregated Liquidations COIN-margined Contracts, Aggregated Liquidations STABLECOIN-margined Contracts], which make me think that its possible to fetch liquidations of all the pairs in Binance/Futures.

=> Is it possible to obtain data for liquidations (all the users) in cryptocurrencies using python-binance?

I have tried following code, which returns empty list as []:

client = Client(api_key, api_secret)

class Fetch_liq:
    def _futures_coin_liquidation_orders(self, **params):
        """Get all liquidation orders

         __ https://binance-docs.github.io/apidocs/delivery/en/#user-39-s-force-orders-user_data
        """
        # return client._request_futures_api('get', 'forceOrders', signed=True, data=params)
        return client._request_futures_coin_api("get", "forceOrders", data=params, signed=True)

    def get_future_coin_liquidation_orders(self, symbol=None):
        return self._futures_coin_liquidation_orders(
            symbol=symbol,
            autoCloseType="LIQUIDATION",
            limit=100
        )


cf = Fetch_liq()
print(cf.get_future_coin_liquidation_orders(symbol="ETCUSD_PERP"))  # returns `[]`

Any help would be appreciated.

Related:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions