completed parallel version of get_markets