Scorpion will answer this question more exactly, but for now I will write everything I know. Before Metatrader 4 , a trading platform from Metaquotes, there was Metatrader 3 , and they were distributing the API for it for free, now, when it`s Metatrader 4 time, the API isn`t for free anymore, and I hardly doubt they are selling it. But maybe they are, you should write them an email and ask them yourself.
www.metaquotes.net . I heard that Dukascopy is selling their API, but as far as i remember ( I maybe wrong ) it was worth about 200k or something like that. But do you really need API to do this ? Maybe you could write him an trading expert, it is like a special thing for metatrader platform, written on metaquotes language , wich is accessible all over the net, just google it, and it will trade automatically on metatrader by the strategy you program in. I`m not a programer , so this massage may look silly for you, but I wrote all I know. But still, Scorpion is the coding guru around here, so he knows better .