The broadcast nature of wireless transmission makes network coding possible in wireless networks. The state-of-the-art algorithm, referred to as COPE, utilizes opportunistic listening to encode packets from different unicast sessions. In theory, the network coding gain of COPE is only dependent on the network topology. In practice, it is also dependent on the traffic pattern and MAC layer scheduling. In this paper, we propose an efficient and scalable algorithm "Identifying the Coding OPportunity (ICOP)" to identify the network coding opportunity in a wireless network that takes both the topology and the traffic pattern in the network into consideration. The advantages of ICOP are that it does not require complicated MAC layer scheduling and it does not require extra communication overhead. Our simulations demonstrate that ICOP performs better than COPE in terms of coding gains in the networks with non-evenly distributed traffic patterns.