Java API based trade execution platform

Discussion in 'Automated Trading' started by bagholderforever, Feb 15, 2022.

  1. Hi - I'm a noob here and in need of some suggestion/education. I have been working on a simple equity trading system and here is my setup right now:

    a) Using Polygon.io for quote feed and IB for trade execution.
    b) The system is written in Java and hosted on home server running linux VMs.
    c) I have gigabit home internet connection. Ping to IB and Polygon is approx. 8 ms. I'm looking into NY hosted VPS solution where this can be brought down to vicinity of 1ms.
    d) The systems is currently running in test using IB's paper account using their Java API

    While non-intuitive the IB API was easy to code but their execution leaves a lot to desire from a responsiveness perspective. While my system is not a HFT but depending on the volatility can generate trades under a millisecond or a smaller fraction for the same tickr. The trades with paper account executes anywhere from about 100ms to over a second even for market orders. Not having a responsive execution causes drifts which can accumulate over the course of the day.

    With that I'd like to know if there are low latency brokers/DMAs who have Java APIs that I can look into. Also what are the fees/deposits for such providers ? Any insights/suggestions are welcome.

    Cheers !
     
  2. ZBZB

    ZBZB

    Last edited: Feb 16, 2022
    bagholderforever likes this.
  3. 2rosy

    2rosy

    ib provides FIX connectivity
     
    bagholderforever likes this.
  4. The IB API isn't providing anywhere near under 1 ms trade executions for me and I have almost the identical setup as you (polygon, IB, Java, Linux, 1 Gbps). You can try directed orders as opposed to SMART routed orders and you would think orders sent straight to NASDAQ would execute faster but I did not have that result.
     
    bagholderforever likes this.
  5. The FIX protocol is between you and IB, so they are still a bottleneck. If you intend to connect over the public internet then you still must use the TWS gateway as a intermediary to use the FIX protocol. Trades are during regular market hours only. This may be a faster more robust solution but I can't find anything that leads me to believe that. I suspect they offer this as an easier integration path for people who are already using FIX and are familiar with it.
     
  6. 2rosy

    2rosy

    TWS gateway is not required
    https://www.interactivebrokers.com/en/index.php?f=4945&p=requiredminimums
     
  7. The TWS API works ok for small amounts of data but it is not designed as a data provider. They state this in the documentation too. It'll fill in a chart or provide a quote. If you want all quotes, bid/ask changes, etc. you just can't get that reliably from IB and should not expect it.
     
    Polygon.io, swinging tick and qlai like this.
  8. When I started looking into this few years back, I was overwhelmed by all sorts of restrictions on connections and symbols etc. They clear state that they are not specialized data provider and given the latency involved it was never an option for me. However if latency and no. of symbols is not a restricting factor then it's definitely worth looking into. if you already have an account and pay for the streaming pack, you can't beat the fact that its free API.
     
    #10     Feb 18, 2022