I am currently using IB api, but I plan to use multiple brokers, so I need to choose an api which is easy to plant across brokers. I find there are two options, fix or restful api. which is better? fix protocol is old, and restful api is the future to go? which api has more brokers to support so far and in the future?
FIX might be old but it is standard. I would consider either a C++ or C# API as most brokers offer that. REST API is not common.
No. I mean a C++ API that uses a C++ sample code to send orders. The broker then takes that and only sends orders using FIX to the exchanges. If you use FIX, you need a FIX server that needs to be certified with each broker. And, not every broker uses the same FIX version.
I guess you mean c++ wrapped fix. Correct? I am using tws c++ api. It is platform unique that I donot like
REST APIs are by definition all proprietary. Be prepared to write new code for each broker. FIX is in theory more standardized. Another item to consider: REST is generally a request-response protocol, while FIX is message-based. In general, you can expect more latency in a REST API.