TWS API: SMART vs. ARCA?

Discussion in 'Programming' started by Canoe007, May 8, 2013.

  1. Canoe007

    Canoe007

    For TWS API from JAVA.
    From the code I found online that I'm starting with, it specifies m_exchange, but not m_primaryExch.

    QQQ-SMART-STK is a recognized security.
    SPY-SMART-STK is not a recognized security.
    SPY-ARCA-STK is a recognized security. Routed direct to ARCA?

    I added specifying m_primaryExch.

    SPY with m_exchange of SMART and m_primaryExch of ARCA is not recognized.
    SPY with ARCA and ARCA is recognized.

    For ARCA, SPY SMART in TWS will use IB's SMART, not ARCA's SMART.

    What should I be using in the API to route SPY through IB's SMART?

    lost...

    Thanks,
     
  2. vicirek

    vicirek

    Post your question on IB TWS Yahoo board or IB message board for technical issues.

    To start with do not specify primary exchange just exchange and try that. SPY SMART STK should work.
     
  3. Canoe007

    Canoe007

    Thanks for reply.
    Only specifying m_exchange is what the first three examples are. SPY SMART is not recognized as valid. SPY ARCA and QQQ SMART are.

    Adding in primary as ARCA doesn't allow exchange of SMART to be recognized.
     
  4. d08

    d08

    Exchange should be 'SMART' and Primary exchange should be 'ARCA'. Then it routes to SMART.
    You don't always need to specify Primary exchange but sometimes a symbol is listed on 2 different exchanges - for example LPLA is both on NASDAQ and LSE and can cause issues.
     
  5. Canoe007

    Canoe007

    Agreed, it should be.
    Only that returns "200: No security definition has been found for the request".


    Exchange of ARCA and primary of ACRA is accepted.
    Exchange of ARCA and primary null is accepted.
    Only these should route to ARCA, not SMART.

    They return:
    Exchanges: SMART,ISE,CHX,BTRADE,ARCA,ISLAND,VWAP,DRCTEDGE,NSX,BEX,CBSX,BATS,EDGEA,LAVA,CSFBALGO,JEFFALGO,BYX,PSX
    Long name: SPDR S&P 500 ETF TRUST
    Market name: SPY

    With SMART as one of the exchanges.


    QQQ with exchange of SMART and primary as null is accepted, returning
    Exchanges: SMART,ISE,CHX,BTRADE,ARCA,ISLAND,IBSX,DRCTEDGE,NSX,BEX,CBSX,BATS,EDGEA,LAVA,CSFBALGO,JEFFALGO,BYX,PSX
    Long name: POWERSHARES QQQ NASDAQ 100
    Market name: NMS


    I don't see why SPY with exchange as SMART is rejected.
     
  6. d08

    d08

    Primary Exchange is where the instrument is listed, the 'native' exchange.
    Exchange field just means where it would execute.

    I tested both Exchange=SMART, Primary Exchange=ARCA and also no primary exchange field and it worked as it should (Excel DDE). The problem appears to be on your side.
    Are you sure you have trading privileges for ARCA/NYSE?
     
  7. Canoe007

    Canoe007

    ah ha
    I hadn't thought of testing with Excel.

    SPY SMART works for you, so there's no different code for IB's SMART for ACRA securities with ACRA's smart not available through IB.

    I do have trading privileges, Level I and Level II data, and have often traded SPY. Charts and book populate. I'll have to open and close a position tomorrow as a test.

    As QQQ SMART works, don't understand why SPY SMART wouldn't.

    hmmm

    Not my code. I'll go have a closer look at it all instead of the hard-coded QQQ all and hard-coded SPY call.

    Thanks for checking!
     
  8. Canoe007

    Canoe007

    In Eclipse the run Classpath order within User Entries was reversed for two items.
    Now it will collect data for SPY ARCA.

    Still doesn't recognize SPY SMART.

    Recognizes QQQ SMART, but doesn't grab data. Closed all Level II displays (BookTrader), so it shouldn't be IB's three book limit.

    continuing...