create a program that automatically scans cryptocurrency price differences between CEX and DEX exchanges

There was a forum member working on something similar here Cryptocurrency Exchange Array (searching, tabling, etc) , Their flow might give you some ideas.