Foreign exchange is only a little short. In fact, the spread is the handling fee, and the income of foreign exchange dealers and brokers comes from the spread.
Because of different platforms, different fees may be charged for the spread of foreign exchange. Every trader has his own method to calculate the spread, and there is no unified algorithm in the world.