bourse.data_processing.trades_to_dataframe(trades: list[tuple]) DataFrame

Convert trade data to a Pandas dataframe

Convert trade data returned from

into a Pandas dataframe.

Parameters:
trades: list[tuple]

List of trade data.

Returns:

pandas.DataFrame – Pandas dataframe with columns:

  • time: Trade time (in nano-seconds)

  • side: Order-book side of the trade

  • vol: Trade volume

  • active_id: Order id of the aggressive order

  • passive_id: Order id of the passive order

Notes

Numerical values are stored as unsigned types.