TradeDelta#
tradingstrategy.direct_feed.trade_feed.TradeDelta Python class in Trading Strategy framework.
- class TradeDelta[source]#
Bases:
object
Trade history delta for a snapshot
- __init__(cycle, start_block, unadjusted_start_block, end_block, start_ts, end_ts, reorg_detected, trades, new_trades)#
Methods
__init__
(cycle, start_block, ...)Attributes
Running counter for each connected client
New incoming data starting this block.
unadjusted_start_block
Last block for which we have data
Timestamp of the start block
Timestamp of the end block
Did we detect any chain reorgs on this update cycle?
List of individual trades
List of trades added in this batch
- start_block: int#
New incoming data starting this block.
The client might have already data older than > start_block from previous delta. In this case the client needs to purhe this data as it is discarded due to chain reorganisation.
- trades: DataFrame#
List of individual trades
This dataframe is snapped to the given time frame to make candle processing easier, and may contain historical data from the previous cycles.
- __init__(cycle, start_block, unadjusted_start_block, end_block, start_ts, end_ts, reorg_detected, trades, new_trades)#