开云体育

ctrl + shift + ? for shortcuts
© 2025 开云体育

option expiry [was: C# Option Contract Details]


 

The expiry is as it always was, a friday for US stock options. The OSI
symbol, introduced a couple years ago, is always one day later than the
expiry. If you are using the OSI symbol use saturday; if you are specifying
the expiry field use friday.

-Kurt

On 7/14/13 8:51 AM, "Peter Gum" <petergum@...> wrote:


Should '20130719' be '20130720'? I.e. 19 -> 20 to match the tws market line.
(Although IB will expire the option on the 19th. Confusing.)
Pete



On 07/14/13, andrewcmeier<andrewcmeier@...> wrote:




Oops, Tester and A1 were meant to be the same variable in the options lines,
change Tester to A1 and that is what I have.

--- In TWSAPI@..., "andrewcmeier" <andrewcmeier@...> wrote:

Hi there,
I've started using the Krs.Ats.IBNet software
(
.21.Full.zip) to develop TWS software in C#.

Setting up equities is easy enough:
Equity Google = new Equity("GOOG");
client.RequestMarketData(14, Google, null, true, false);

But when I try to adapt it to options, I can't get it to work. This is what
I'm using:
Option A1 = new Option("AA", "AA", "20130719", RightType.Call, 8.0m);
client.RequestMarketData(15, Tester, null, false, false);

This is what it has in its class):
public Option(string equitySymbol, string optionSymbol, string expiry,
RightType right, decimal strike)

This is the error I get when I raise e.ErrorCode:
"No security definition has been found for the request"

Does anyone know what I'm entering wrong, or just how to set up an option in
C#? I also then wan't to be able to leave fields out to do things such as
return all the contracts in a month, does anyone have any examples how to do
this?

I'm finding that C# should be a good way to download and analyse data but
don't have any documentation, I've only worked out what to do from searching
through lots of the code.

Thanks for your help.




------------------------------------

Yahoo! Groups Links



Join [email protected] to automatically receive all group messages.