validate_latest_candles#

validate_latest_candles(pairs, df, timestamp)[source]#

Ensure that the oracle served us correct up-to-date candles.

  • The last timestamp of a pair must match what we requested earlier.

  • The timestamp cannot be sooner or later

Note

This cam be only called for highly active pairs, as many low and middle cap tokens may not see trades in hours.

Parameters:
  • pairs (Set[DEXPair]) – Set of pairs our strategy is trading

  • df (DataFrame) –

    Dataframe of candles.

    May contain candes for a single or multiple pairs.

  • timestamp (datetime) – What is the latest timestamp we need to have avilable for every pair. This is the strategy decision timestamp - current candle time frame.

Raise:

AssertionError