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

Method parse_positions

python/ccxt/base/exchange.py:5291–5298  ·  view source on GitHub ↗
(self, positions: List[Any], symbols: List[str] = None, params={})

Source from the content-addressed store, hash-verified

5289 return position
5290
5291 def parse_positions(self, positions: List[Any], symbols: List[str] = None, params={}):
5292 symbols = self.market_symbols(symbols)
5293 positions = self.to_array(positions)
5294 result = []
5295 for i in range(0, len(positions)):
5296 position = self.extend(self.parse_position(positions[i]), params)
5297 result.append(position)
5298 return self.filter_by_array_positions(result, 'symbol', symbols, False)
5299
5300 def parse_adl_rank(self, info: dict, market: Market = None):
5301 raise NotSupported(self.id + ' parseADLRank() is not supported yet')

Callers 15

fetch_positionsMethod · 0.45
fetch_positionsMethod · 0.45
fetch_positionsMethod · 0.45
fetch_positionsMethod · 0.45
fetch_positionsMethod · 0.45
close_all_positionsMethod · 0.45

Calls 7

market_symbolsMethod · 0.95
to_arrayMethod · 0.95
extendMethod · 0.95
parse_positionMethod · 0.95
rangeFunction · 0.50
appendMethod · 0.45

Tested by

no test coverage detected