which api should I choose? restful api or fix?

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?

We can provide you with 2 types of API so you can test it.
You can have FIX API from CTS-T4 and C++ and C# from Rithmic.
Rithmic also uses R Protocol that could work with python.
This is for Futures. Please PM if you need a trial.
 
We can provide you with 2 types of API so you can test it.
You can have FIX API from CTS-T4 and C++ and C# from Rithmic.
Rithmic also uses R Protocol that could work with python.
This is for Futures. Please PM if you need a trial.

WebSockets are magnitudes slower than native sockets (I think 100x last I checked). Why not have a proper socket interface?
 
Not accurate, clients don't need any fix server. Brokers offer servers. Clients need to get certified by exchanging fix messages with the broker but no server is needed on the client side.

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.
 
Having used FIX for a while I can attest to the fact that brokers use completely different fix messages despite some brokers claiming to use the same version. There is a lot of work involved to get Fix messaging right with each individual broker. Adding a new broker and setting up FIX is most often not a trivial task.

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.
 
Purely latency wide Fix is slower than a very high performance C++ Api. That is why most hft houses use the direct C++ APIs offered by exchanges and don't use FIX. But Fix is still easier (not trivial) to implement than having to target the entirely unique non fix api each broker offers.

any idea how slow is FIX compared with native socket?
 
Purely latency wide Fix is slower than a very high performance C++ Api. That is why most hft houses use the direct C++ APIs offered by exchanges and don't use FIX. But Fix is still easier (not trivial) to implement than having to target the entirely unique non fix api each broker offers.
thank you
 
Back
Top