pybit/py3/common.py
def api_wait(self,
                 wait: bool=False,
                 ttw: int=11):
        """
        Waits, or not, depending on wait
        """

        # Wait if last query was less than 10s ago
        # print(self.lastQueryTime)
        dTime = (time.time() - self._lastQueryTime)
        if dTime <= ttw:
            if wait:
                sleep_time = ttw - dTime
                if self.verb > 3:
                    print("{0}Sleeping for {1}".format(" "*self.verb,
                                                       sleep_time))
                time.sleep(sleep_time)
                return True

            else:
                # Skip
                self.api_validated = 'Skipped'
                if self.verb > 3:
                    """
                    print("{0}Validation skipped \n{0}{1}".format(
                                            " "*self.verb,
                                            "_"*30))
                    """
                return False
        else:
            # No need to wait
            return True

        Waits, or not, depending on wait
        
Waits, or not, depending on wait
Waits or not depending on wait
def api_wait(self,
                 wait: bool=False,
                 ttw: int=11):
        dTime = (time.time() - self._lastQueryTime)
        if dTime <= ttw:
            if wait:
                sleep_time = ttw - dTime
                if self.verb > 3:
                    print("{0}Sleeping for {1}".format(" "*self.verb,
                                                       sleep_time))
                time.sleep(sleep_time)
                return True
            else:
                self.api_validated = 'Skipped'
                if self.verb > 3:
                return False
        else:
            return True
def api_wait ( self , wait : bool = False , ttw : int = 11 ) : dTime = ( time . time ( ) - self . _lastQueryTime ) if dTime <= ttw : if wait : sleep_time = ttw - dTime if self . verb > 3 : print ( "{0}Sleeping for {1}" . format ( " " * self . verb , sleep_time ) ) time . sleep ( sleep_time ) return True else : self . api_validated = 'Skipped' if self . verb > 3 : """
                    print("{0}Validation skipped \n{0}{1}".format(
                                            " "*self.verb,
                                            "_"*30))
                    """ return False else : return True
Waits, or not, depending on wait
Waits or not depending on wait
"""
        Waits, or not, depending on wait
        """ # Wait if last query was less than 10s ago # print(self.lastQueryTime) # Skip """
                    print("{0}Validation skipped \n{0}{1}".format(
                                            " "*self.verb,
                                            "_"*30))
                    """ # No need to wait
self
wait
bool
ttw
int