code: def latency(self, significant_digits=3):
          
          try:
              end = 'stream' in self._timestamps and 'stream' or 'receive'
              return round(self._timestamps[end] - self._timestamps['send'],
                           significant_digits)
          except Exception as e:
              return None
docs: :param significant_digits: int of the number of significant digits
                                     in the return
          :return: float of the time in seconds of the api call or stream data