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

Method parse_long_short_ratio

python/ccxt/bitget.py:10547–10557  ·  view source on GitHub ↗
(self, info: dict, market: Market = None)

Source from the content-addressed store, hash-verified

10545 return self.parse_long_short_ratio_history(data, market)
10546
10547 def parse_long_short_ratio(self, info: dict, market: Market = None) -> LongShortRatio:
10548 marketId = self.safe_string(info, 'symbol')
10549 timestamp = self.safe_integer_omit_zero(info, 'ts')
10550 return {
10551 'info': info,
10552 'symbol': self.safe_symbol(marketId, market, None, 'contract'),
10553 'timestamp': timestamp,
10554 'datetime': self.iso8601(timestamp),
10555 'timeframe': None,
10556 'longShortRatio': self.safe_number_2(info, 'longShortRatio', 'longShortAccountRatio'),
10557 }
10558
10559 def handle_errors(self, code: int, reason: str, url: str, method: str, headers: dict, body: str, response, requestHeaders, requestBody):
10560 if not response:

Callers

nothing calls this directly

Calls 5

safe_stringMethod · 0.80
safe_symbolMethod · 0.80
safe_number_2Method · 0.80
iso8601Method · 0.45

Tested by

no test coverage detected