Previous topic

Welcome to Download_Crypto_Currencies_Data project

This Page

Download data from an exchange

Base exchange class to download data.

dccd.ImportDataCryptoCurrencies(path, …[, …]) Base class to import data about crypto-currencies from some exchanges.
class dccd.ImportDataCryptoCurrencies(path, crypto, span, platform, fiat='EUR', form='xlsx')

Base class to import data about crypto-currencies from some exchanges.

Parameters:
path : str

The path where data will be save.

crypto : str

The abreviation of the crypto-currencie.

span : {int, ‘weekly’, ‘daily’, ‘hourly’}
  • If str, periodicity of observation.
  • If int, number of the seconds between each observation, minimal span is 60 seconds.
platform : str

The platform of your choice: ‘Kraken’, ‘Poloniex’.

fiat : str

A fiat currency or a crypto-currency.

form : {‘xlsx’, ‘csv’}

Your favorit format. Only ‘xlsx’ and ‘csv’ at the moment.

Notes

Don’t use directly this class, use the respective class for each exchange.

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 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 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 /! NOT ALLOWED TO KRAKEN EXCHANGE /!

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)

You can determine the specific hierarchy of the files where will save your data. TODO : to finish