Poloniex Historical Downloader (dccd.histo_dl.poloniex
)¶
Objects to download historical data from Poloniex exchange.
-
class
dccd.histo_dl.poloniex.
FromPoloniex
(path, crypto, span, fiat='USD', form='xlsx')¶ Bases:
dccd.histo_dl.exchange.ImportDataCryptoCurrencies
Class to import crypto-currencies data from the Poloniex 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 300 seconds.
- fiat : str
A fiat currency or a crypto-currency. Poloniex don’t allow fiat currencies, but USD theter.
- form : {‘xlsx’, ‘csv’}
Your favorit format. Only ‘xlsx’ and ‘csv’ for the moment.
See also
FromBinance
,FromGDax
,FromKraken
Notes
See Poloniex API documentation [R5770b2672718-1] for more details on parameters.
References
[R5770b2672718-1] https://docs.poloniex.com/#introduction 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 Poloniex for specific time interval. 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='now')¶ Download data from Poloniex for specific time interval.
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.
- end : int or str
Timestamp of the last 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