which api should I choose? restful api or fix?

Discussion in 'Automated Trading' started by trend2009, Aug 1, 2019.

  1. 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?
    MattZ likes this.
  2. Robert Morse

    Robert Morse Sponsor

    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.
  3. You mean c++ Fix api?
  4. Robert Morse

    Robert Morse Sponsor

    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.
  5. I guess you mean c++ wrapped fix. Correct? I am using tws c++ api. It is platform unique that I donot like
  6. 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.
  7. Thanks. I thought rest api is more platform friendly
  8. TWS API is horrible. But you have to use it. Enjoy.
  9. then what else can i use on tws?
  10. Robert Morse

    Robert Morse Sponsor

    We offer a number of APIs. Why do you want to use many brokers from one server?
    #10     Aug 1, 2019