(timeframe, timestamp, direction=ROUND_DOWN)
| 1879 | |
| 1880 | @staticmethod |
| 1881 | def round_timeframe(timeframe, timestamp, direction=ROUND_DOWN): |
| 1882 | ms = Exchange.parse_timeframe(timeframe) * 1000 |
| 1883 | # Get offset based on timeframe in milliseconds |
| 1884 | offset = timestamp % ms |
| 1885 | return timestamp - offset + (ms if direction == ROUND_UP else 0) |
| 1886 | |
| 1887 | def check_required_dependencies(self): |
| 1888 | pass |