Keyboard Shortcuts
Likes
- Twsapi
- Messages
Search
Re: How to pull all strikes for a given expiration?
开云体育Well, I know what you mean, but I don't really agree. There are lots of things that can be criticised about it, but there's no denying it works very well, once you've worked your way around the various oddities. ? I'm certainly not aware of any other free API that comes anywhere close to it in terms of breadth and depth of functionality. ? ? ? From: [email protected] <[email protected]> On Behalf Of Alex Gorbachev
Sent: 18 February 2021 21:35 To: [email protected] Subject: Re: [TWS API] How to pull all strikes for a given expiration? ? Ain't the whole TWS API feels like that? :) |
Re: CUSIP/ISIN in ActiveX API using VBA in Excel
开云体育The problem here is that the secIdList property is actually a generic object of type ComList<ComTagValue, TagValue>, and generic objects cannot be mapped into COM objects (which is why the Excel Object Browser shows it simply as being of type Object). ? So you can't access any of the members of this type. However all is not lost because the ComList<ComTagValue, TagValue>, ?type implements the IList<ComWrapper<T>> interface, which should enable the members of the list to be iterated over using For Each, something like this: ? Dim s As String Dim tv As ComTagValue For Each tv In ContractDetails.secIdList ??? s = s & tv.tag & ": " & tv.value & ";" Next ? MsgBox s, , "SecIdList" ? I haven't been able to actually try this because at the moment I can't seem to make the damn ActiveX Excel workbook work at all (I rebuilt the ActiveX control from the latest files in the Github repository, and at the moment neither the C# API nor the ActiveX API will connect successfully – they just hang). ? Richard ? ? From: [email protected] <[email protected]> On Behalf Of praditik@...
Sent: 18 February 2021 14:17 To: [email protected] Subject: [TWS API] CUSIP/ISIN in ActiveX API using VBA in Excel ? Hello,
|
Re: How to pull all strikes for a given expiration?
Ain't the whole TWS API feels like that? :) On Thu, Feb 18, 2021 at 3:29 PM Richard L King <rlking@...> wrote:
|
Re: "BEST queries are not supported for this contract” when requesting historical trade bars
toggle quoted message
Show quoted text
From: [email protected] <[email protected]> on behalf of Scott Kister <scott@...>
Sent: Thursday, November 5, 2020 6:36 AM To: [email protected] <[email protected]> Subject: Re: [TWS API] "BEST queries are not supported for this contract” when requesting historical trade bars ?
I was getting that error a lot and also came up empty searching for what it meant. I did eventually realize that it was happening when I was requesting historical data from before the IPO date of a stock. When I changed from blindly requesting the last
30 days to doing a reqHeadTimestamp and asking from max(Head, 30 days ago), most of my BEST queries not supported errors went away. I realize that doesn't solve your issue, but may give a clue, or help others.
|
Re: How to pull all strikes for a given expiration?
开云体育The short answer is "no". ? Longer answer: ? reqSecDefOptParams is one of those API functions that appears to have been designed by a trainee programmer on a Friday afternoon after a liquid lunch (hence the stupid name), coded by another trainee the following Friday based on the beer mat that the first guy sketched it out on, tested to see whether it gives anything back at all but not whether it actually meets the specification, and then lobbed into the build for us poor API users to try and make sense of. ? I've never had anything good to say about it, and I've never heard anyone else say anything good about it. ? Having said that it can be useful, and I do use it in my platform. But the simple fact is that you can't tell whether anything it returns is actually valid unless you go and get the relevant contract details. ? ? From: [email protected] <[email protected]> On Behalf Of Crow
Sent: 18 February 2021 06:08 To: [email protected] Subject: [TWS API] How to pull all strikes for a given expiration? ? How do I pull all strikes for a given expiration?? I found this API: ? ? Which gives me all combinations of expirations and strikes, but the documentation notes:? ? "?returns a list of expiries and a list of strike prices. In some cases it is possible there are combinations of strike and expiry that would not give a valid option contract." ? Instead, I'd simply like the list of strikes available for a particular expiration.? Any way to get that? ? ? ? |
CUSIP/ISIN in ActiveX API using VBA in Excel
Hello,
I have been trying to get ISIN and CUSIP from ActiveX API and failed everytime. I am using reqContractDetails and trying to read secIdList.? I have successfully received the required info while using python API (So my account has necessary subscription). However, how exactly do I read secIdList in VBA while using ActiveX client? I tried to assign the secIdList to TwsLib.ComTagValueList and also checking if secIdList is Null. Everytime I receive error in bold statements.?
I tried looking everywhere and could not arrive at a satisfactory explanation for this issue! Thanks and Regards, Pratik |
How place orders before AND after market hours?
What is the magic combination of settings that lets you place orders through the API both before and after market hours?? I can use outsideRth(true) on an order and place it after market hours, but not before market hours.? If I set this to false then I can place it before market hours but not after market hours. In TWS -> Global Settings -> Presets -> Stocks I can set either "Allow order to be activated, triggered, or filled outside RTH" or I can set "Allow order to be routed and executed during pre-open session".? But I cannot check both.? They are apparently mutually exclusive.
So what is the combination of parameters that let you place an order anytime from 4:00 am to 8:00 pm? Thanks! |
Re: Order field to identify a strategy
Hi all, I use trade references stored in the order reference field, it usually works without problem. Track the order id, order reference and your internal tracking identifier, and you should be able to piece it all together. What I have experienced is position reports being lagged by many minutes, and execution reports arrive in an arbitrary order, but the order references do seem to be stable. Best wishes, M? On Thu, 18 Feb 2021 at 03:04, Bruce B <bruceb444@...> wrote:
-- +44 (0) 7528 551604? Gulfstream Software - Winner Risk Management Awards 2010 This message is subject to : |
Re: How to pull all strikes for a given expiration?
See some useful hints here: On Thu, Feb 18, 2021 at 1:08 AM Crow <aaroncook394@...> wrote:
|
How to pull all strikes for a given expiration?
开云体育
How do I pull all strikes for a given expiration?? I found this API:
Which gives me all combinations of expirations and strikes, but the documentation notes:?
Instead, I'd simply like the list of strikes available for a particular expiration.?
Any way to get that?
|
Re: Order field to identify a strategy
Tracking within your own process is not working why? - Bruce On Wed, Feb 17, 2021, 3:33 PM corneliu maftuleac <corneliu.maftuleac@...> wrote: Thank you very much. Will investigate. |
Re: Is there a good reason to not use LATEST API vs Stable?
Hey Bruce,? |
Re: Historical bars and WAP
So I probably answered my own question via an experiment - getting the same 5 secs bars as real-time and as historical. They seem to match exactly except for field naming and precision. Docs here are basically wrong -?. "average" and "barCount" fields of historical bars are the same as "wap" and "count" fields of real-time bars except that "wap" in real-time bars has decimal precision of 3 digits after period and "average" of historical bars seem to have only 2 digits precision. I checked just for one symbol of stocks and options and it seems to hold true. Perhaps, there are occasional discrepancies - I didn't check at large scale. On Wed, Feb 17, 2021 at 1:03 AM Alex Gorbachev <ag@...> wrote:
|
Re: Order field to identify a strategy
Nick
开云体育Except for forex, markets are open for only part of a day as opposed to continuous 24/7 trading. The general idea is markets open at a specific time and then close at a specific time and that is one trading session. Trading on the next day is a different session. Different financial instruments have different rules for when a session starts and ends. A single session on the major futures exchanges spans calendar days - opening in the evening one day, going past midnight until the afternoon or the next day. Can make you crazy since a trade can occur on Monday evening but counts as the Tuesday trading day. Back to the OrderRef, people have observed that the field is
returned for executions in the same session as the order was
placed but is empty if the order executed in a subsequent session. On 2/17/2021 2:40 PM, corneliu
maftuleac wrote:
Thanks Nick. |
Re: Is there a wrapper api/sdk around that abstracts core trading functionality on top of the base ibkr api?
Nick
开云体育The IB libraries are needlessly complicated and convoluted in my view. My plain C library gets the job of reading messages done with a
single function twsGetMsg() which returns a union with the message
filled in. That's it. A message is physically just a bunch of
fields read from the socket - how complicated can they make such a
simple thing? On 2/17/2021 2:49 PM, Ajay Joglekar
wrote:
|