IB API Option Contract error 200: No security definition has been found for the request

Discussion in 'Automated Trading' started by ET180, May 19, 2017.

  1. ET180

    ET180

    Anyone able to pull the June 16 option chain on AVGO? That and some other tickers were working a few days ago, but now is erroring out. Here are my params:

    Contract contract = new Contract();
    contract.m_symbol = "AVGO";
    contract.m_secType = "OPT";
    contract.m_multiplier = "100";
    contract.m_exchange = "SMART";
    contract.m_currency = "USD";
    contract.m_expiry = "20170616";

    ID: 5 ErrorCode: 200 Message: No security definition has been found for the request
    IB Puller ERROR on symbol: AVGO
     
  2. When requesting data on an option, do you need to specify whether you want Call or Put options?
     
  3. Not if you're downloading the chain itself. OP's implementation is similar to mine.
     
  4. I see: I overlooked that OP wants to download the entire chain.
     
  5. ET180

    ET180

    The way IB's API works is you can request all available contract details for a given underlying or all available contracts details for a given expiration or all puts, all calls, etc. Then there's a second request to retrieve the actual bid, ask, last, delta, etc one contract at a time. For my implementation, I start ATM and then pull all calls above the ATM until I reach 0.1 delta and then start pulling below ATM until I reach 0.1 delta for puts. I have not found a way to simply pull the entire chain as one request.

    Anyhow, I can now pull AVGO and I did not change anything from yesterday. However, now I'm getting errors on a few others tickers in my list. Strange.
     
  6. Which of the two steps resulted in an error? The step where you ask for contract details for all available contracts, or the step where you download price data of an individual contract?
     
  7. ET180

    ET180

    The step where I was pulling the contract details resulted in the error. It could not find the contract even though it obviously exists on other sources and probably could have been pulled in IB's WebTrader itself at the time.
     
  8. Strange. I have thus far no negative experiences with reqContractDetails.