This paper proposes a market clearing mechanism for energy trading in a local transactive market, where each player can participate in the market as seller or buyer and tries to maximize its welfare individually. Market players send their demand and supply to a local data center, where clearing price is determined to balance demand and supply. The topology of the grid and associated network constraints are considered to compute a price signal in the data center to keep the system secure by applying this signal to the corresponding players. The proposed approach needs only the demanded/supplied power by each player to reach global optimum which means that utility and cost function parameters would remain private. Also, this approach uses distributed method by applying local market clearing price as coordination information and direct load flow (DLF) for power flow calculation saving computation resources and making it suitable for online and automatic operation for a market with a large number of players. The proposed method is tested on a market with 50 players and simulation results show that the convergence is guaranteed and the proposed distributed method can reach the same result as conventional centralized approach.