The World Trade Organization (WTO) and preferential trade agreements (PTA) are key factors in international trade liberalization. However, their relative effects on trade flows are controversial (ranging from 16 percent to 277 percent), depending on whether the endogeneity of these two variables is taken into account. Surprisingly, there is no paper estimating the endogenous trade effects of WTO and PTAs simultaneously, thus the existing findings about these variables might be questioned. To fill the gap of the trade literature, we thus extend the econometric model of Terza (1998) and empirical works of Egger et al. (2011) by proposing a count data models with dual endogenous binary regressors. A two-step quasi-maximum likelihood approach to estimation and inference is introduced. Since we derive the analytic gradient and hessian matrices of the log likelihood function of the proposed model, we can easily conduct the Monte Carlo simulations where the data observation is over 10,000 and the parameters to be estimated are over several hundreds, as is typically found in the empirical studies of international economics. Indeed, the simulation results are promising under various configurations considered in this paper. We then apply our approach to the data of Egger et al. (2011) who only investigate the trade effects of PTA. Our results show that both WTO and PTA membership have huge impacts on bilateral trade flows, increasing the value by 926 percent and 218 percent respectively. On the contrary, their partial trade effects are much smaller (13 percent and 74 percent) if the endogeneity is totally ignored.