There is currently no option to trade resources in the game. They way most players go about "trading" is setting up a planet with no ships or defense units. Putting the resources they wish to give the other player, and have them attack your planet.

On this planet, it is also important to not build an underground bunker, as it will require more attacks to get all of the resources.

Remember, on an attack a player can only take 60% of the resources, provided they have enough cargo space in the ships they send (of course, if you are in negative glory and have a skull, your resource protection wi be less). You can actually be very precise in this method of trading by having them send only a certain number of ships and you leaving out a certain amount of res.

For example. If you want to give your friend 1 million metal, have them attack your planet with 40 Large Cargo Ships (1 million cargo capacity) and leave out more than 1,670,000 metal (1,670,000 x 60% = 1,000,000). Fleet save the remaining metal, and all your crystal and gas. When your friend attacks your planet, he will get 1 million metal.

This does take a lot of coordination and trust, but alliances have had a lot of success trading resources in this manner since the game launched. If you have any other questions pertaining to this method of trading, please feel free to ask!