After another 3 seconds, one of the websockets meets its requirements. All websockets and API calls should stop
This implies that there is an undergoing communication between the API callscalls' processing.
Initially, multiple independent API calls need to happen - they don't rely on the others at all.
This is confusing considering first quote. Is there an API calls' processing join?
It is possible to implement the described scenario either way, multi threaded or single threaded, with a proper implementation of the communication between the API calls' processing implementing the observer design pattern.