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

Method getLimit

python/ccxt/async_support/base/ws/cache.py:72–87  ·  view source on GitHub ↗
(self, symbol, limit)

Source from the content-addressed store, hash-verified

70 self._clear_all_updates = False
71
72 def getLimit(self, symbol, limit):
73 if symbol is None:
74 new_updates_value = self._all_new_updates
75 self._clear_all_updates = True
76 else:
77 new_updates_value = self._new_updates_by_symbol.get(symbol)
78 if new_updates_value is not None and self._nested_new_updates_by_symbol:
79 new_updates_value = len(new_updates_value)
80 self._clear_updates_by_symbol[symbol] = True
81
82 if new_updates_value is None:
83 return limit
84 elif limit is not None:
85 return min(new_updates_value, limit)
86 else:
87 return new_updates_value
88
89 def append(self, item):
90 self._deque.append(item)

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected