Skip to content
This repository has been archived by the owner on Aug 17, 2024. It is now read-only.

Commit

Permalink
V2.0.2
Browse files Browse the repository at this point in the history
Fixed minor issues.
  • Loading branch information
shaft3796 committed Jun 17, 2023
1 parent f20095c commit 546f9b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions ohlcv/ohlcv.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,8 @@ def monitoring():
if verbose:
print(Fore.CYAN, f"Aggregating {len(requests)} dataframe for a total of {limit} candles. This might take "
f"some time.", Fore.RESET)
df = pd.concat([responses[i][0] for i in range(len(requests))], ignore_index=True)
df = pd.concat([responses[i][0] for i in range(len(requests))], ignore_index=True).iloc[:-1].iloc[:limit]
df = df.drop_duplicates(subset=['timestamp'])
df = df.iloc[:limit]
df = df.reset_index(drop=True)
return df

Expand All @@ -205,7 +204,10 @@ def update(self, dataframe: pd.DataFrame, market: str, timeframe: str, verbose:
new_data = self.download(market, timeframe, since, limit, verbose, workers)
except NotEnoughDataException:
return dataframe
return pd.concat([dataframe, new_data], ignore_index=True)
df = pd.concat([dataframe, new_data], ignore_index=True)
df = df.drop_duplicates(subset=['timestamp'])
df = df.reset_index(drop=True)
return df

def load(self, market: str, timeframe: str, since: str, limit: (int, str), update: bool = False,
verbose: bool = True, workers: int = 100):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
long_description = (this_directory / "README.md").read_text()

setup(name='ohlcv-plus',
version='2.0.1',
version='2.0.2',
description='Crypto OHLCV data downloader.',
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 546f9b4

Please sign in to comment.