orderbookmdp.data_all package

Submodules

orderbookmdp.data_all.download_gdax module

orderbookmdp.data_all.download_gdax.save_snapshot(public_client, data_dir)[source]
class orderbookmdp.data_all.download_gdax.DownloadWebsocketClient(data_dir, **kwargs)[source]

Bases: cbpro.websocket_client.WebsocketClient

__init__(data_dir, **kwargs)[source]

Initialize self. See help(type(self)) for accurate signature.

change_file(msg)[source]
on_open()[source]
on_message(msg)[source]
on_close()[source]
on_error(e, data=None)[source]
orderbookmdp.data_all.download_gdax.download(dir, time_delta='1 min', product='BTC-USD')[source]

orderbookmdp.data_all.orderstream module

orderbookmdp.data_all.orderstream.load_orders(path)[source]

Yields orders from a saved feather pandas.DataFrame.

Parameters:path (str) – Path to the saved feather dataframe
Yields:order – An external order from the dataframe
orderbookmdp.data_all.orderstream.orderstream(order_paths='../../../data/feather/', snapshot_paths='../../../data/snap_json/', max_sequence_skip=1, random_start=False, **kwargs)[source]

Generates a stream of orders, either a snapshot of the order book is returned when a disruption in the order stream happens or the next order is yielded.

Parameters:
  • order_paths (str) – Path to the orders
  • snapshot_paths (str) – Path to the snapshots
Yields:

order (list, snapshot: dict) – The first yield will have a snapshot. Then orders will be yielded with the snapshot as None.

orderbookmdp.data_all.reformat_data module

Module contents