IB API - how to send two-sides quotes (bid and offer) simultaneously?

Discussion in 'Automated Trading' started by VolMakersTrading, Oct 27, 2014.

  1. could very well be. I remember IB had lots of issues when they started calculating the amount of cancel/modifies vs. fills of option orders and how to charge for that while being compliant with exchange and market regulations.

     
    #21     Oct 29, 2014
  2. Well in stocks if your fill rates are terrible you may get IB fined by the exchange and they'll bill you for that, but that's not an IB issue and plenty under your own control. On the other hand, they flat won't let you quote both sides of an option contract at the same time regardless.
     
    #22     Oct 29, 2014
  3. thank you everyone for you information. I want to make it clear that my question was regarding equities, NOT options. Now, we have been able to make a bid and an offer reside next to each other on the book, but being new to IB's API, we are confused by the lack of distinguishment between SELL and SELL_SHORT syntax; in our current broker's system, we use four different action-words: BUY, SELL (which is paired with BUY to close an open long position), SELL-SHORT and BUY-TO-COVER, which are paired in the same way to open and close a short position. IB's API docs mention SELL_SHORT action but sending the order didn't do anything. Only BUY and SELL went through and made it to the book.

    Can anyone confirm that this is the case and shed some light on the subject?

    regards,
    Johnny
     
    #23     Oct 29, 2014
  4. yes that is correct, and imho, that is how it should be. You are either buying an asset or selling an asset, regardless of whether you fully add exposure, fully offset exposure, or do both with one order (example you are long 100 shares and then sell 200 shares -> you offset exposure of 100 shares and sell (short) another 100 shares by which you again add exposure, resulting in 1 trade (100 shares, off which you can now compute pnl), and new exposure of -100 shares. There is no sell or sell short syntax needed. The system (theirs and yours) automatically know whether you add exposure on the short side (which should then automatically lead to tagging the order as a short and causing IB's systems to locate shares that can be borrowed). But for most performance, exposure, risk management purposes the distinction between sell and short sell is meaningless.

     
    #24     Oct 29, 2014
  5. 1245

    1245

    It will be interesting to see if you have issues with the sell side marking of sell vs sell short. If I have no position and I enter and order to buy 100 and another to sell 100 short, then I get the buy side off 1st, the sell side is no longer tagged correctly, since it should be changed to sell long. Technically, your program should cancel replace that sell side with the correct order coding.

    Has that caused any issues?
     
    #25     Oct 29, 2014
  6. 1245 thanks for the idea, that would be interesting. we are currently trying to test this on their simulator (which is rather sloppy imho). Is there anyone here with some IB API experience who can answer this question?
     
    #26     Oct 29, 2014
  7. 1245

    1245

    IB should be a better source for this. When you contact them directly, they won't help?
     
    #27     Oct 29, 2014