(self, method: str, symbol: Str = None, since: Int = None, limit: Int = None, timeframe: Str = None, params={})
| 7640 | return self.filter_by_since_limit(sortedRes, since, limit, key) |
| 7641 | |
| 7642 | def safe_deterministic_call(self, method: str, symbol: Str = None, since: Int = None, limit: Int = None, timeframe: Str = None, params={}): |
| 7643 | maxRetries = None |
| 7644 | maxRetries, params = self.handle_option_and_params(params, method, 'maxRetries', 3) |
| 7645 | errors = 0 |
| 7646 | while(errors <= maxRetries): |
| 7647 | try: |
| 7648 | if timeframe and method != 'fetchFundingRateHistory': |
| 7649 | return getattr(self, method)(symbol, timeframe, since, limit, params) |
| 7650 | else: |
| 7651 | return getattr(self, method)(symbol, since, limit, params) |
| 7652 | except Exception as e: |
| 7653 | if isinstance(e, RateLimitExceeded): |
| 7654 | raise e # if we are rate limited, we should not retry and fail fast |
| 7655 | errors += 1 |
| 7656 | if errors > maxRetries: |
| 7657 | raise e |
| 7658 | return [] |
| 7659 | |
| 7660 | def fetch_paginated_call_deterministic(self, method: str, symbol: Str = None, since: Int = None, limit: Int = None, timeframe: Str = None, params={}, maxEntriesPerRequest: Int = None): |
| 7661 | maxCalls = None |
no test coverage detected