Infact their total exports last year were around 590 billion, and their total imports were 560 billion.
How is that a deficit? Looks more like a overall surplus to me and you don't take into consideration all of the foreign investment being poured into China and all of the benefits of a exceptionally robust economy.
I believe that the poster is referring to trade excluding China-U.S. trade when he refers to "rest of the world", not to simply all of China's foreign trade.
However, I am not sure how well this will hold in the future. If the current pattern of the last few months holds, China looks to make more like $60-80 billion this year -- and maybe a lot more if there is another big burst of high surplus months like at the end of the year.