Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion cryptory/cryptory.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def __init__(self, from_date, to_date=None, ascending=False,
to_date : the end date (as string) for the returned data;
required format is %Y-%m-%d (e.g. "2017-06-21")
Optional. If unspecified, it will default to the current day
to_date : binary. Determines whether the returned dataframes are
ascending : binary. Determines whether the returned dataframes are
ordered by date in ascending or descending order
(defaults to False i.e. most recent first)
fillgaps : binary. When data does not exist (e.g. weekends for stocks)
Expand Down Expand Up @@ -138,6 +138,8 @@ def extract_coinmarketcap(self, coin, coin_col=False):
output.columns = [col.lower() for col in output.columns]
if coin_col:
output['coin'] = coin

output = output.sort_values(by='date', ascending=self.ascending).reset_index(drop=True)
return output

def extract_bitinfocharts(self, coin, metric="price", coin_col=False, metric_col=False):
Expand Down