At minimum, one data point can trigger anomaly detection. This doesn't bring the best accuracy, however. The service will assume a window of previous data points using the value you've specified as the "fill-gap" rule during data feed creation.
We recommend having some data before the timestamp that you want detection on.
Based on the granularity of your data, the recommended data amount varies as below.
GranularityRecommended data amount for detection Less than 5 minutes4 days of data 5 minutes to 1 day28 days of data More than 1 day, to 31 days4 years of data Greater than 31 days48 years of data