What I am thinking is, say for simplicity sake, you have 2 exchanges you deal with. Call them x1 and x2.
Assume, and rightly so, that prices fluctuate significantly between exchanges, although they will regress to a mean. If you you want to trade btc, you will need another unit of account (an alt coin. ) Lets use LTC for the examble.
So you create a bot that trades BTC to LTC and visa vespa. Both x1 and x2 each have an API (application programming interface) so you can just make api call in the code. If the btc/ltc ratio is higher on x1 vs x2 (to the point of being profitable) then execute a buy on x1 (ltc to btc) and simultaneously a sell on x2 (btc to ltc) and pocket the difference. Rinse and repeat.
This will also work alt to alt.