MCPcopy Create free account
hub / github.com/ccxt/ccxt / fetch_account_positions

Method fetch_account_positions

python/ccxt/async_support/aster.py:3642–3661  ·  view source on GitHub ↗

@ignore fetch account positions https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#position-information-v3-user_data :param str[] [symbols]: list of unified market symbols :param dict [params]: extra parameters specific to the exchange API en

(self, symbols: Strings = None, params={})

Source from the content-addressed store, hash-verified

3640 }
3641
3642 async def fetch_account_positions(self, symbols: Strings = None, params={}):
3643 """
3644 @ignore
3645 fetch account positions
3646 https://asterdex.github.io/aster-api-website/futures-v3/account%26trades/#position-information-v3-user_data
3647 :param str[] [symbols]: list of unified market symbols
3648 :param dict [params]: extra parameters specific to the exchange API endpoint
3649 :returns dict: data on account positions
3650 """
3651 if symbols is not None:
3652 if not isinstance(symbols, list):
3653 raise ArgumentsRequired(self.id + ' fetchPositions() requires an array argument for symbols')
3654 await self.load_markets_and_sign_in()
3655 await self.load_leverage_brackets(False, params)
3656 response = await self.fapiPrivateGetV4Account(params)
3657 filterClosed = None
3658 filterClosed, params = self.handle_option_and_params(params, 'fetchAccountPositions', 'filterClosed', False)
3659 result = self.parse_account_positions(response, filterClosed)
3660 symbols = self.market_symbols(symbols)
3661 return self.filter_by_array_positions(result, 'symbol', symbols, False)
3662
3663 async def load_leverage_brackets(self, reload=False, params={}):
3664 await self.load_markets_and_sign_in()

Callers 1

fetch_positionsMethod · 0.95

Calls 8

ArgumentsRequiredClass · 0.90
market_symbolsMethod · 0.80

Tested by

no test coverage detected