Wonder trade can be unlocked at level 48. The function is on the bottom of the screen.
Wonder trade needs four pokemon that are rare or better than rare. Four pokemon can be exchanged for a pokemon randomly.
The rarer four pokemon are, the better exchanged pokemon will be.
Now no need to worry about no use of pokemon caught in bag. Try your wonder trade.