Kraken Historical Downloader (dccd.histo_dl.kraken
)¶
Objects to download historical data from Kraken exchange.
-
class
dccd.histo_dl.kraken.
FromKraken
(path, crypto, span, fiat='USD', form='xlsx')¶ Bases:
dccd.histo_dl.exchange.ImportDataCryptoCurrencies
Class to import crypto-currencies data from the Kraken exchange.
Parameters: - path : str
The path where data will be save.
- crypto : str
The abreviation of the crypto-currency.
- span : {int, ‘weekly’, ‘daily’, ‘hourly’}
- If str, periodicity of observation.
- If int, number of the seconds between each observation, minimal span is 60 seconds.
- fiat : str
A fiat currency or a crypto-currency.
- form : {‘xlsx’, ‘csv’}
Your favorit format. Only ‘xlsx’ and ‘csv’ for the moment.
See also
FromBinance
,FromGDax
,FromPoloniex
Notes
See Kraken API documentation [R1ab1d422d7d0-1] for more details on parameters.
References
[R1ab1d422d7d0-1] https://www.kraken.com/features/api Attributes: - pair : str
Pair symbol, crypto + fiat.
- start, end : int
Timestamp to starting and ending download data.
- span : int
Number of seconds between observations.
- full_path : str
Path to save data.
- form : str
Format to save data.
Methods
import_data
(self[, start, end])Download data from Kraken since a specific time until now. save
(self[, form, by_period])Save data by period (default is year) in the corresponding format and file. get_data
(self)Print the dataframe. -
get_data
(self)¶ Print the dataframe.
Returns: - Data : pd.DataFrame
Current data.
-
import_data
(self, start='last', end=None)¶ Download data from Kraken since a specific time until now.
Parameters: - start : int or str
Timestamp of the first observation of you want as int or date format ‘yyyy-mm-dd hh:mm:ss’ as string.
Returns: - data : pd.DataFrame
Data sorted and cleaned in a data frame.
-
save
(self, form='xlsx', by_period='Y')¶ Save data by period (default is year) in the corresponding format and file.
TODO : to finish
Parameters: - form : {‘xlsx’, ‘csv’}
Format to save data.
- by_period : {‘Y’, ‘M’, ‘D’}
- If ‘Y’ group data by year.
- If ‘M’ group data by month.
- If ‘D’ group data by day.
-
set_hierarchy
(self, liste)¶ Set the specific hierarchy of the files where will save your data.
TODO : to finish