Detect the detection order of beacons

I have 2 proximity beacons. Is there possible to see in what order my app have detected the beacons??

I’m trying to detect if someone is entering/exit in a space based on the order in which beacons are detected. If this is not possible, do you know how can I do that?