get_data_bitmex¶
Defined in dccd.continuous_dl.bitmex
- get_data_bitmex(process_func, *args, time_step=60, until=None, path=None, save_method='dataframe', io_params={}, **kwargs)[source]
Download data from Bitmex exchange and update the database.
- Parameters:
- process_funccallable
Function to process and clean data before saving. Must accept
dataas its first argument plus optional keyword arguments; seedccd.process_datafor examples.- *argsstr
Channel and optional instrument, e.g.
'trade', 'XBTUSD'. Passed directly toDownloadBitmexData.__call__.- time_stepint, optional
Number of seconds between snapshots, default
60(1 minute).- untilint, optional
Seconds to run, or a future Unix timestamp to stop at.
Noneor0means run indefinitely.- pathstr, optional
Directory for the database. Defaults to
'database/bitmex/{channel}'.- save_method{‘DataFrame’, ‘SQLite’, ‘CSV’, ‘Excel’, ‘PostgreSQL’, ‘Oracle’, ‘MSSQL’, ‘MySQL’}, optional
Storage format for
IODataBase, default'dataframe'.- io_paramsdict, optional
Extra keyword arguments forwarded to the
IODataBasecallable.- **kwargs
Additional keyword arguments forwarded to the websocket connector.
Warning
‘_raw’ option not yet working for Bitmex.
See also
process_datahelper functions to transform raw payloads.
tools.io.IODataBasepersistence layer.
References