: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

def latency(self, significant_digits=3):
        """
        :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
        """
        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