Announcement

Collapse
No announcement yet.

API Crashing

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • API Crashing

    I have built a VB.Net form to maintain current prices for a group of stocks. The way that I am doing it is; I am looping through an array of ticker symbols, changing the RequestSymbol, awaiting the onquotechanged event to supply a current price and then writing that value to a MS Access table that supports a Dataset which populates a Datagrid on the form. The process seems to work fine but eventually generates a Crash to the eSignal. Any Ideas?
    Last edited by mitchm; 04-28-2004, 07:59 AM.

  • #2
    I will need more information, possibly a code sample that creates the crash in order to offer any assistance. Are you exceeding your symbol limit? Are you clearing the symbol cache after each request?

    Comment


    • #3
      Hi! The code is fairly standard. I am just trying to provide Psuedo Real-Time quotes on 1 form for a number of stocks. Since the API can't pull in more than 1 symbol quote, I am forced to loop through an array. Each loop will:

      ReleaseSymbol
      RequestSymbol
      and then wait for the OnQuoteChanged event to supply the LastPrice

      What I am really trying to do is start the loop from a commandbutton_click and then perpetuate the loop by calling a function from the OnQuoteChanged event, but it keeps crashing the API.

      I can't help but believe there must be an easier way to accomplish what I am trying to do; is There?

      If not, may I ask what is the real scope of use that the developers of the API imagined?

      Thanks

      Comment


      • #4
        Why are you continually requesting and releasing? Do you need to get data on more symbols than your are permissioned for or is there another reason?

        Does your app crash if you don't do the release calls inside the OnQuoteChanged event (it sounds like that is what you are doing)? There might be some destructor stuff getting called behind the scenes when you call release that might make the return from the OnQuoteChanged handler unstable. Just a possibility.

        Cheers... George

        Comment


        • #5
          I have not read about any other way. Is there another way to gather multiple stock quotes and historical data? Perhaps you can point me in the direction on comprehensive explanation of all available API data calls.

          Comment


          • #6
            The reference docs can be found in the ActiveX Development file sharing area.

            If you need to continually monitor the quotes of a group of stocks, you can just RequestSymbol once for each one at the start of your app and it will continue to stream quotes (if you ask it to). You only need to release the symbols when you are done, not inbetween each call to RequestSymbol (unless you are trying to watch more symbols than you are allowed at one time based on your account settings).

            Cheers... George

            Comment


            • #7
              Thank for your help. I am yet to find a document or sample project that illustrates function argument enumerations like interval. Any thought?

              Comment


              • #8
                Not sure I understand specifically what info you are looking for. For interval, it is just a string the same as the one you would put into the main eSignal client app. "1", "10", "D", etc.

                lhandle = esignal.RequestHistory("MSFT", "1", IESignal.barType.btBARS, 30, 0, 0)

                Isn't most of that in the developer reference doc on the file sharing site? There are a few new functions in the 7.6 release that haven't made their way into that doc yet, but are listed in the Appendix A doc.

                Cheers... George

                Comment


                • #9
                  Thanks again. The only examples I can find for VB are single quote retrieval and historical. Here is what I am trying to do and maybe you can help me.

                  1. Stream real time quotes for up to 80 stocks at a time. I will need to change the stocks throughout the day.

                  2. Gather 2 year historical daily values for 1630 stocks. This will be done weekly so that I can keep a database current with the daily data.

                  3. Stream 1 minute bars for up to 80 stock at a time. I will need to change the stocks throughout the day.

                  I realize that you have an indepth knowledge of the enumerations, but I don't know if I can pass an array of symbols to stream more than one stock and what interval values should I be using if I want the end of data for various stocks. The sample project is confusing for me as to how to adapt the functions to accomplish my programming goals.

                  I appreciate your assistance.

                  Comment

                  Working...
                  X