Skip to content

Commit

Permalink
feat(helpers): add timeframe_to_one_minutes function to convert timef…
Browse files Browse the repository at this point in the history
…rames

- Introduced a new function `timeframe_to_one_minutes` in helpers.py that utilizes the existing utility function for converting timeframes to a one-minute equivalent.
- This addition enhances the functionality of the helpers module by providing a direct method for timeframe conversion.
  • Loading branch information
saleh-mir committed Dec 29, 2024
1 parent 2044268 commit 922f039
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jesse/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1134,3 +1134,8 @@ def gzip_compress(data):
json_data = json.dumps(data).encode('utf-8')
# Compress the JSON string
return gzip.compress(json_data)


def timeframe_to_one_minutes(timeframe: str) -> int:
from jesse.utils import timeframe_to_one_minutes
return timeframe_to_one_minutes(timeframe)

0 comments on commit 922f039

Please sign in to comment.