So, I've read this entire thread, and while it has been quite informative I still have an issue I'm hoping I can find help with.
I have little experience with trading, but I'm a reasonably experienced programmer making an app using the API for a trading firm in my city. All is going well except for getting quotes, as I need my program to behave slightly differently based on current price.
When I try to get quotes, the OnQuoteUpdate and OnQuoteSnap events are never triggered. I thought I might be doing something wrong, but I downloaded their VB sample projects and those didn't seem to work either. I saw some posts from a few months ago mentioning problems with quotes: is that still the case now?
I'm doing it in C# using Visual Studio 2008. Some of the revelant code bits and my concerns:
quote = new STIQuoteClass(); (should I be using the interface version?)
quote.OnSTIQuoteUpdate += new _ISTIQuoteEvents_OnSTIQuoteUpdateEventHandler(OnQuoteUpdate);
quote.OnSTIQuoteSnap += new _ISTIQuoteEvents_OnSTIQuoteSnapEventHandler(OnQuoteSnap);
OnQuoteUpdate and OnQuoteSnap aremy handling functions. Right now they just show me some information about the quote struct (I put breakpoints in both of them so I know they are never getting called)
When the user enters a symbol and exchange and presses a submit button:
quote.RegisterQuote(order.Symbol, order.Destination);
I also used SubmitQuote and SubmitQuoteStruct but they didn't seem to have any effect. I'm also not sure what the "bstrKey" argument they want is. I assume the bstr is Systems Hungarian notation carried over from VB but I have no idea what sort of "Key" it is. I took a guess that this refered to "Exchange Definitions (Quotes)" on page 17 of the API guide and entered 'N' for NYSE but I might be totally wrong.
Anyway, this problem is the main roadblock preventing me from finishing this app. Any insight at all from those who know more Sterling than I would be much appreciated, heh.
I have little experience with trading, but I'm a reasonably experienced programmer making an app using the API for a trading firm in my city. All is going well except for getting quotes, as I need my program to behave slightly differently based on current price.
When I try to get quotes, the OnQuoteUpdate and OnQuoteSnap events are never triggered. I thought I might be doing something wrong, but I downloaded their VB sample projects and those didn't seem to work either. I saw some posts from a few months ago mentioning problems with quotes: is that still the case now?
I'm doing it in C# using Visual Studio 2008. Some of the revelant code bits and my concerns:
quote = new STIQuoteClass(); (should I be using the interface version?)
quote.OnSTIQuoteUpdate += new _ISTIQuoteEvents_OnSTIQuoteUpdateEventHandler(OnQuoteUpdate);
quote.OnSTIQuoteSnap += new _ISTIQuoteEvents_OnSTIQuoteSnapEventHandler(OnQuoteSnap);
OnQuoteUpdate and OnQuoteSnap aremy handling functions. Right now they just show me some information about the quote struct (I put breakpoints in both of them so I know they are never getting called)
When the user enters a symbol and exchange and presses a submit button:
quote.RegisterQuote(order.Symbol, order.Destination);
I also used SubmitQuote and SubmitQuoteStruct but they didn't seem to have any effect. I'm also not sure what the "bstrKey" argument they want is. I assume the bstr is Systems Hungarian notation carried over from VB but I have no idea what sort of "Key" it is. I took a guess that this refered to "Exchange Definitions (Quotes)" on page 17 of the API guide and entered 'N' for NYSE but I might be totally wrong.
Anyway, this problem is the main roadblock preventing me from finishing this app. Any insight at all from those who know more Sterling than I would be much appreciated, heh.