M20J Posted November 5, 2021 Report Share Posted November 5, 2021 I think this could be a bug, but possibly I'm doing something incredibly stupid. I'm trying to retrieve L1 prices for the Royal Dutch Shell ADR from Interactive Brokers through the API. The IB ticker is "RDS A" with a space in it. I've played around with it a bit and it's also a little inconsistent in the main user interface: If I edit a portfolio using the pop-out dialog from the Portfolio toolbar, I can enter the ticker RDS A as normal, with the space in, and everything works perfectly. If I try to add the security using the "Add Symbols" button, instead of adding RDS A as a single ticker, it adds two tickers - RDS and A. RDS doesn't work because it's not a valid ticker. A is Agilent Technologies. If I try to view the security in a chart by typing the ticker directly into the chart, it truncates RDS A to just RDS and shows nothing. If instead I type the ticker into the chart with double inverted commas around it - so literally "RDS A" - then it works. When using the API, if I subscribe using either RDS A or "RDS A" wrapped in quotes, it looks fine in the original request, but then strips out the space character in the responses: 05/11/21 16:27:28.177: Sending: {"cmd":"subscribe","streamerID":"IB","sub":"L1","transient":true,"changes":true,"sym":"RDS A"} 05/11/21 16:27:28.202: ue_mvt_data::{ "cmd": "subscribe", "success": "OK", "resultcode": 200, "result": { "sub": "L1", "subbed": [ "RDSA" ] } } Is there a workaround? Or am I indeed doing something incredibly stupid? Many thanks, David Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted November 7, 2021 Report Share Posted November 7, 2021 in the UI in places where multiple symbols can be entered, (or same interface is used as where multiple symbols can be entered such as on chart) you have to put the symbol in quotes as you did. as for the result from API, will check. Definitely should not be removing space Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted November 7, 2021 Report Share Posted November 7, 2021 Ok there was a bug in API removing white spaces from inside symbols. Will be fixed. Jerry will send you a link. Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted November 7, 2021 Report Share Posted November 7, 2021 emailed you Quote Link to comment Share on other sites More sharing options...
M20J Posted November 9, 2021 Author Report Share Posted November 9, 2021 Many thanks to you both. I tested it out yesterday and it now works perfectly. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.