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

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

  1. Hi. We are importing our trading system from our current broker and technology provider (TradeStation) to Interactive Brokers using their Java API. The algorithm in question is a market-making/scalping type that quotes the market on both sides at all times. The general idea is two simultaneously have to "live" limit orders sitting in the market (a bid and an offer) and upon fill, the filled order immediately creates a bracket order with a profit-target and a stop loss.

    New to TWS and IB world, it seems to be impossible to have two opposite sides orders for the same security sitting side by side in the market. What the right way to do it?
  2. convexx


    You cannot make a market with IB in a retail account (concurrent bids and offers in a single security). It's a reg-issue.
  3. Thank you Convexx. We have yet to transfer funds to IB but plan on openning an institutional account. To the best of your knowledge, inst' account are eligible to offer opposite/two side quotes?
  4. Occam


    There is no blanket regulation against simultaneously posting a bid and an offer in the US. Some exchanges used to prevent prevent it; I'm not sure any "modern" exchange disallows it as of 2014. OP, which exchange/product are you trading as such?

    The "reg" the OP might have violated is specific to IB customers only -- "thou shalt not compete with IB's Timber Hill market making unit", a "reg" that's also reflected in IB's massively elevated commissions for directed API orders.

    OP, you should ask IB's customer service why your orders are being rejected. If it's IB policy alone preventing this, you might need to consider another brokerage. There are a number of "agency only" brokers that cater to high-volume, automated traders. Unfortunately, many of them have relatively high opening account balance minima.

    Last edited: Oct 27, 2014
  5. Occam - I've already picked you up as someone who knows what's he talking about. I'm trading equities, mainly but not limited to, ETFs. I wouldn't say my algorithm is a classic marketmaker per se, as it does not play the add/remove liquidity and rebate pseudo-trading game, so I wouldn't normally think it would step on IB prop desk toes... Could you provide more info from your experience with IB or other firms on the matter?

    I'd like to add that the ability to sent two-side quotes doesn't exist with my current broker, Tradestation, either.
    Last edited: Oct 27, 2014
  6. convexx


    You cannot work a two-sided market with IB. Rule 920NY on NYSE and various other exchanges act similarly wrt remote market making (RMM designation).
  7. Convexx - I hear you. Nevertheless, I just spoke with an IB representative to institutional client who told me he can't find any reason I couldn't do so. Also, the RMM rule only applies to NYSE and other physical floor exchanges, as far as I understand.

    Practically speaking, what's the difference really, between quoting a bid and an offer simultaneously, and adding a simple toggling mechanism to your algo which toggles quickly between the bid and the offer LMT orders based on price proximity, for example? There can't be anything preventing me from doing the later of course, and if my latency is low enough, how is it any different than having the two quotes living side by side concurrently? is that a considerable workaround?
    rafa2013 likes this.
  8. convexx


    Well I've found exchange limitations on two-sided mkts for retail for physical and virtual. There must be a reason that neither TD or IB allows it. In options it materially impacts microstructure; the mid/fairval. The messaging-rate would be huge. How much exposure (time in force) would be lost with this toggling? I can't see how that would be practical or effective.

    I ran a MMing operation in strips of COB-orders. Natural and synthetic spreads and combos. There is no real workaround in delta1.
    Last edited: Oct 27, 2014
  9. Occam


    For equities, I don't think that any of the NSDQ or BATS exchanges, or NYSE's own ARCA, have any such rule. A while back, I did notice that some of the older options exchanges had such rules, but not the newer ones; for example, Nasdaq Options explicitly encourages two-sided quoting on the part of anyone who wants to:


    By the way, what would be the point of using NYSE to add liquidity, rather than one of the other exchanges, which seem to put non-professionals on a more equal footing with MM's? Isn't it true that NYSE's DMMs enjoy special advantages over anyone else who would try to add liquidity? I think that using NYSE made sense when everyone had to go through their specialists. Now their top DMMs, who replaced the human specialists, are a who's-who of the largest HFT's.
  10. I've written a program like that with IB for the CME. It went live before without any problem though the strategy wasn't profitable for me. So sure, you can issue one buy limit order and one sell limit order side by side just fine. Maybe other exchanges have regulations, but thankfully not all. But if that is a big issue for you, why don't you just open two separate accounts? It can't be illegal to operate two simultaneous accounts!
    #10     Oct 27, 2014