Skip to content

Commit

Permalink
Add new columns: time_open, time_close, time_high and time_low
Browse files Browse the repository at this point in the history
  • Loading branch information
davjack authored and guptarohit committed Oct 13, 2023
1 parent f03fc6d commit 904b7de
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file.

## [0.6.4] - 2023-10-14

### Added

- In addition to Date, Open, High, Low, Close, Volume, Market Cap, the following time columns are returned: Time Open, Time High, Time Low, Time Close.

## [0.6.3] - 2023-07-22

### Added
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ To get data of a cryptocurrency for some days
Following are the columns of the data
"""""""""""""""""""""""""""""""""""""
``Date, Open, High, Low, Close, Volume, Market Cap``
``Date, Open, High, Low, Close, Volume, Market Cap, Time Open, Time High, Time Low, Time Close``


Acknowledgements
Expand Down
7 changes: 6 additions & 1 deletion cryptocmd/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ def __init__(
self.order_ascending = order_ascending
self.fiat = fiat
self.coin_name = coin_name
self.headers = ["Date", "Open", "High", "Low", "Close", "Volume", "Market Cap"]
# self.headers = ["Date", "Open", "High", "Low", "Close", "Volume", "Market Cap"]
self.headers = ["Date", "Open", "High", "Low", "Close", "Volume", "Market Cap", "Time Open", "Time High", "Time Low", "Time Close"]
self.rows = []
self.id_number = id_number

Expand Down Expand Up @@ -108,6 +109,10 @@ def _download_data(self, **kwargs):
_row_quote["close"],
_row_quote["volume"],
_row_quote["market_cap"],
_row["time_open"],
_row["time_high"],
_row["time_low"],
_row["time_close"],
]

self.rows.insert(0, row)
Expand Down

0 comments on commit 904b7de

Please sign in to comment.