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 data as its first argument plus optional keyword arguments; see dccd.process_data for examples.

*argsstr

Channel and optional instrument, e.g. 'trade', 'XBTUSD'. Passed directly to DownloadBitmexData.__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. None or 0 means 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 IODataBase callable.

**kwargs

Additional keyword arguments forwarded to the websocket connector.

Warning

‘_raw’ option not yet working for Bitmex.

See also

process_data

helper functions to transform raw payloads.

tools.io.IODataBase

persistence layer.

References