get_data_bitfinex

Defined in dccd.continuous_dl.bitfinex

get_data_bitfinex(channel, process_func, process_params={}, save_method='dataframe', io_params={}, time_step=60, until=None, path=None, **kwargs)[source]

Download data from Bitfinex exchange and update the database.

Parameters:
channelstr, {‘book’, ‘book_raw’, ‘trades’, ‘trades_raw’}

Websocket channel to get data, by default data will be aggregated (OHLC for ‘trades’ and reconstructed orderbook for ‘book’), add ‘_raw’ to the channel to get raw data (trade tick by tick or each orders).

process_funccallable

Function to process and clean data before to be saved. Must take data in arguments and can take any optional keywords arguments, cf function exemples in dccd.process_data.

process_paramsdict, optional

Dictionary of the keyword arguments available to process_func, cf documentation into dccd.process_data.

save_method{‘DataFrame’, ‘SQLite’, ‘CSV’, ‘Excel’, ‘PostgreSQL’, ‘Oracle’, ‘MSSQL’, ‘MySQL’},

It will create an IODataBase object to save/update the database in the specified format save_method, default is ‘DataFrame’ it save as binary pl.DataFrame object. More informations are available into dccd.tools.io.

io_paramsdict, optional

Dictionary of the keyword arguments available to the dccd.tools.io.IODataBase callable method. Note: With SQL format some parameters are compulsory, see details into dccd.tools.io.

time_stepint, optional

Number of second between two snapshots of data, default 60 (1 minute).

untilint, optional

Number of seconds before stoping to download and update, default is None. If until equal 0 or None it means it never stop.

pathstr, optional

Path to save/update the database, default is None. If path is None, database is saved at the relative path ‘./database/bitfinex/channel’.

**kwargs

Any revelevant keyword arguments will be passed to the websocket connector, see Bitfinex API documentation [2] for more details.

Warning

‘book_raw’ and ‘trades_raw’ can be very memory expensive.

See also

process_data

function to process/clean data (set_marketdepth, set_ohlc, set_orders, set_marketdepth).

tools.io.IODataBase

object to save/update the database with respect to specified format.

References