Questions regarding IB API

Discussion in 'App Development' started by leonbrag215, Aug 19, 2017.

  1. DaveV

    DaveV

    Assuming you are monitoring the Market data for multiple symbols, you could also publish a tick whenever the symbol changes. You would still need a time limit, but during busy periods that time limit should rarely be reached.
     
    #21     Aug 25, 2017
  2. DaveV

    DaveV

    This is the way NxCore and IQFeed send updates.

    The exchanges send atomic updates. But that does not mean that a field can't be missing, such as a bid with no ask.
     
    #22     Aug 25, 2017
  3. Sounds interesting.
    I can use this if the gateway receives updates through one socket only.
    If updates are sent through multiple sockets concurrently then the following is possible:

    MSFT price --> MSFT volume --> MSFT bid --> MSFT bid size
    ________GOOG price --> GOOG volume
     
    #23     Aug 25, 2017
  4. pstrusi

    pstrusi

    Your comment seemed interesting to me. I've just programmed in C# in certain platforms, and eventually, I've tested the IB-API in C#. However having in mind that you and many others say it is buggy and you suggest: use socket level, I researched but it seems complicated, it is not even documented, a pity for non CS like us.

    What about Fix protocol ?

    Thanks
     
    Last edited: Sep 28, 2017
    #24     Sep 28, 2017
  5. @DaveV Interesting, thanks for sharing. Can I ask where your box is located? If you're in the NY/NJ area, I suppose IB ticks arriving first makes sense since I believe they disseminate from NY4 while IQFeed is in Nebraska and NxCore is out of either AWS East or Chicago (if memory serves).
     
    #25     Nov 15, 2017
  6. DaveV

    DaveV

    My box is located in Milford, CT. I once read that the IB data center is located in Stamford, CT which if true, is about 20 miles from my box.
     
    #26     Nov 15, 2017
  7. Makes sense, thanks. I know that they have a presence in NY4 because I've talked to them about a cross connect before, but (like you) I've also heard they are in CT. I couldn't say for sure which is used for market data - possibly both.
     
    #27     Nov 15, 2017
  8. Thanks for the advises guys,

    Making some progress here and am currently testing bracket orders on the paper account.
    Not sure if I have done everything correctly though since I am getting presubmitted status on some of the child orders.

    Here is the bracket sell order I have sent to the gateway: sell 100 MSFT -> 82.83 LMT, 81.6 STP:

    21:18:12:130 <- 3-45-3-0-MSFT-STK--0---ISLAND-------Sell-100-LMT-82.83-0-DAY---O-0--0-0-0-0-0-0-0-0--0--------0---1-0---0---0-0--0------0-----0-----------0---0-0---0--0-0-0-0--1.79769313486232E+308-1.79769313486232E+308-1.79769313486232E+308-1.79769313486232E+308-1.79769313486232E+308-0-----
    21:18:12:131 <- 3-45-4-0-MSFT-STK--0---ISLAND-------Sell-100-LMT-82.83-0-DAY---O-0--0-3-0-0-0-0-0-0--0--------0---1-0---0---0-0--0------0-----0-----------0---0-0---0--0-0-0-0--1.79769313486232E+308-1.79769313486232E+308-1.79769313486232E+308-1.79769313486232E+308-1.79769313486232E+308-0-----
    21:18:12:131 <- 3-45-5-0-MSFT-STK--0---ISLAND-------Sell-100-STP-0-81.6-DAY---O-0--1-3-0-0-0-0-0-0--0--------0---1-0---0---0-0--0------0-----0-----------0---0-0---0--0-0-0-0--1.79769313486232E+308-1.79769313486232E+308-1.79769313486232E+308-1.79769313486232E+308-1.79769313486232E+308-0-----

    Here is the response:
    21:18:12:716 -> --ó5-34-4-272093-MSFT-STK--0-?--ISLAND-USD-MSFT-NMS-SELL-100-LMT-82.83-0.0-DAY-1351961740-DU768066-O-0--1238104769-1351961741-0-0-0--1351961741.0/DU768066/100----------0---1-0-------0-0-0--3-0-0--3-0--0-None--0----?-0-0--0-0------0-0-0-----0--IB-0-0--0-0-PreSubmitted-1.7976931348623157E308-1.7976931348623157E308-1.7976931348623157E308------0-0-0-None-1.7976931348623157E308-83.83-1.7976931348623157E308-1.7976931348623157E308-1.7976931348623157E308-1.7976931348623157E308-0----1.7976931348623157E308----B3-4-PreSubmitted-0-100-0-1351961741-3-0-1238104769-child,locate-0-
    21:18:13:067 -> --ã5-34-5-272093-MSFT-STK--0-?--ISLAND-USD-MSFT-NMS-SELL-100-STP-0.0-81.6-DAY-1351961740-DU768066-O-0--1238104769-1351961742-0-0-0--1351961742.0/DU768066/100----------0---1-0-------0-0-0--3-0-0--3-0--0-None--0----?-0-0--0-0------0-0-0-----0--IB-0-0--0-0-PreSubmitted-1.7976931348623157E308-1.7976931348623157E308-1.7976931348623157E308------0-0-0-None-1.7976931348623157E308-81.6-1.7976931348623157E308-1.7976931348623157E308-1.7976931348623157E308-Infinity-0----1.7976931348623157E308----J3-5-PreSubmitted-0-100-0-1351961742-3-0-1238104769-child,locate,trigger-0-
    21:18:13:074 -> --æ5-34-3-272093-MSFT-STK--0-?--ISLAND-USD-MSFT-NMS-SELL-100-LMT-82.83-0.0-DAY--DU768066-O-0--1238104769-1351961740-0-0-0--1351961740.0/DU768066/100----------0---1-0-------0-0-0--3-0-0--0-0--0-None--0----?-0-0--0-0------0-0-0-----0--IB-0-0--0-0-Submitted-1.7976931348623157E308-1.7976931348623157E308-1.7976931348623157E308------0-0-0-None-1.7976931348623157E308-83.83-1.7976931348623157E308-1.7976931348623157E308-1.7976931348623157E308-1.7976931348623157E308-0----1.7976931348623157E308----33-3-Submitted-0-100-0-1351961740-0-0-1238104769--0-

    Notice that the first two children are presubmitted, and the parent order in the end is submitted.
    This looks somewhat odd to me, does someone has any idea if this is valid and if not what am I doing wrong?
    Also why does the first child order has a "child,locate" and the second "child,locate,trigger"?
     
    #28     Nov 17, 2017
  9. d08

    d08

    Stop orders have trigger type - last, double last, bid, ask etc. Limit orders don't.

    PreSubmitted only because they activate once the initial entry is filled.
     
    #29     Nov 17, 2017
    leonbrag215 likes this.
  10. Thanks, is the initial entry the parent order? or I am off the mark here.
     
    #30     Nov 17, 2017