开云体育

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

Re: C# Option Contract Details


 

In the file section of this group
I wrote a option chain getter
I included the source.it in vb
and conversion is easy to c#
i had very little problems with it
it get the chain of any stock ticker
gets all the quotes
and draws vertical spread graphs

nick

On 7/14/2013 6:23 AM, 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 () 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.