Supply and demand makes the market open, and therefore what leads to balance in the price is arbitrage.
When I find that the price of bitcoin on one platform is $31,000 and on another platform it is $28,000, I will definitely try to transfer my currencies to that platform, and this is how the cycle of supply and demand is achieved until the market balances.
But the difference can be very large, because I remember in 2017, the difference between one platform and another was more than 30% on the same day, but it is rare to find that these days.
You will notice that the difference is simple between CEXs and is greater in DEXs.
example:
Binance $29,309.71
Birake Network $30,191.90
I do not think that it is that common to have that much gap anymore, when there is a gap arbitrage people and bots take care of that and get it closer, you may find it rarely here and there but most of the time that's covered. Even in dex projects when you have spread in the LP there are bots that take care of it as well and make some profit.
This is why I have to say that it is important to keep that in mind when you are making this difference, I would highly suggest that anyone who tries to make this should be able to realize how difficult it is. Even if you want to create a new bot for it, that would be start hard, because there are ones who have been doing this and fixing every little issue for many years now.