3

I'm trying to get the price for stock option for the Japan "6503" stock, and I get the error:

Error code 10197 No market data during competing live session

I don't have subscription for Japan Market, but I still can see the "last price" for the option in TWS User Interface (not for all but for some option contracts, for some it's unavailable and displayed as "n/a").

Question - it seems like this error code - is not actually an error and could be ignored, is that true? The error doesn't make sense at all as I don't have any competing session or paper session.

I'm using the TWS Java API with the following code to get the price:

val contract = Contract()
contract.exchange("OSE.JPN")
contract.currency("JPY")
contract.conid(455178173)
contract.secType(Types.SecType.OPT)
client.reqMarketDataType(MarketDataType.DELAYED_FROZEN)
client.reqMktData(request_id, contract, "", false, false, null)

I'm using the conid 455178173 to get the price, if you need the full info about the option, here it is:

symbol:          "6503",
right:           "call",
expiration:      "2021-01-07",
strike:          1200.0,
option_exchange: "OSE.JPN",
currency:        "JPY",
Alex Craft
  • 13,598
  • 11
  • 69
  • 133
  • 1
    Did you ever find the solution for the "No market data during competing live session" issue? Facing the same problem. I'm only using the paper trading account. – Haasip Satang Jul 25 '21 at 21:29
  • 2
    @HaasipSatang as far as I remember I added subscription for live data and this issue went away. – Alex Craft Jul 26 '21 at 08:00

2 Answers2

1

I dont believe the offered answer is correct as the API works through TWS and thus TWS must be open and active in order for your code to pull market data.

I received this error and noticed that I was also logged in to the IB portal on my web browser. I logged out (not just closing the tab) and tried again and I was able to pull market data from my code after that.

0

This error happens when you have a "live" session thats competing for data. Which means you have a live TWS terminal thats showing the live data and you are requesting data from your Paper account via the API.

The API won't return the requested data (showing this error) because the same data is being sent to the live account.

Ganesh Krishnan
  • 7,155
  • 2
  • 44
  • 52