Announcement

Collapse
No announcement yet.

XMLGetBasicQuote (described)

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

  • XMLGetBasicQuote (described)

    There is an undocumented function in the API that returns more data via an XML string than the original "GetBasicQuote" function, which returns a BasicQuote structure. It was added for a project and the Developer Reference and Appendix has not been updated to reflect this addition.

    Example:

    sXML = esignal.XMLGetBasicQuote(sSymbol)

    An XML string is returned and the structure is as follows:

    <Quote>
    <Bid>###</Bid>
    <Ask>###</Ask>
    <Last>###</Last>
    <Open>###</Open>
    <High>###</High>
    <Low>###</Low>
    <Change>###</Change>
    <PrevClose>###</PrevClose>
    <Volume>###</Volume>
    <AskSize>###</AskSize>
    <BidSize>###</BidSize>
    </Quote>

  • #2
    PLEASE!! - more info on XMLGetBasicQuote

    In your example, what is the variable type for sXML? I have a "primitive" version (for testing purposes) using "quote = esignal.GetbasicQuote(sSymbol)" with "Dim quote As IESignal.BasicQuote". That works for retrieving bid/ask etc., but what I really want is open, high, low, last, volume.

    You keep teasing us with XMLGetBasicQuote, but have not provided some simple examples of VB 6 code using the new routine (we'll add the bells and whistles). I have tried simply changing GetbasicQuote to XMLGetbasicQuote, but it gives the error "Compile Error: Type Mismatch".

    If not the type IESignal.BasicQuote, what should I use?

    Thank you.

    Comment


    • #3
      I found my own answer (As String). Yes, you do mention that it is an XML string, but it took me a number of readings before it struck me to try that type literally. Sometimes the info you provide is really very difficult to follow and a bit unclear. If you would just provide a little documentation for now (until you have time to do the full documentation), I think everyone would greatly appreciate it. It would also be important to make it easy to find. It took me almost an hour to track down this info in the forum reading numerous threads before finding the one I replied to below.

      Regarding a comment you made regarding the use of various programming languages, I have worked on this in both C++ and VB 6. The difference is night and day in terms of ease of use. Switching to VB 6 is saving me a tremendous amount of time and confusion.
      Last edited by masterdata; 05-03-2005, 01:00 AM.

      Comment


      • #4
        I don't know how much more clear I can be until the documentation is updated. sXML indicates that it is a string, just like sSymbol. I also think VB is easier to use than C++.

        You seem to be answering your own questions, though.

        Comment


        • #5
          Hi Robi

          Maybe the word I should have used is "explicit". As I repeatedly reviewed the info you initially provided in the forum, it finally dawned on me that when you said "an XML string" maybe you meant a regular, plain vanilla string. Once I tried that everything worked. If you could have simply included the Dim statement in your example, it would have been greatly appreciated and totally clear to the brain dead among us. You would have saved time by not having to respond to my email because I never would have sent it.

          The returned "string", however, is a bit different than I am used to. It seems to have line breaks incorporated into it after each element (each of which is further enclosed in <>'s to boot). Now I can and will figure how to best break it down into its individual components (bid, ask, last, open, etc.), but why is it returned that way? Am I missing some elegant way of doing things or would it be more efficient just to return a one line string (comma delimited if you wish) with no line breaks? If there is some slick way of using the string the way it is returned I would greatly appreciate hearing from you with details.

          I may be alone here, but I think many (if not the majority) of eSignal's API users are more market oriented than programmer. If I am right, simple and clear-cut solutions from eSignal are always going to be preferred and appreciated over more sophisticated approaches to retrieving and applying data. I hope you will consider that idea. It might make your customer service efforts a lot less complicated.

          Best,

          Larry Carhartt

          Comment


          • #6
            It is a string that is in XML format. XML format encompasses the description of the data with the data itself and is the elegant piece you are missing. You should "google" XML and find out more about it.

            Out of curiousity, why do you call yourself "masterdata" if you are a novice developer?

            Comment


            • #7
              It is a string that is in XML format. XML format encompasses the description of the data with the data itself and is the elegant piece you are missing. You should "google" XML and find out more about it. Parts of the API just require a certain amount of sophistacation that can be clearly demonstrated, but the examples are an attempt to clarify things. Maybe DDE is a better option for you, since it is simpler to use.

              Comment


              • #8
                Robi

                I am not a developer. I did data maintenance for years for several larger money managers and that is the name of my company. That is what the name originally implied. Now, however, I am compiling composite data (data on all the individual issues within the composite) on several major indexes as well as all the HOLDRS and SPDRs. Eventually (soon) I will do the same on all ETFs. The name is masterdata, not masterdeveloper.

                I wouldn't say I am a novice when it comes to programming having done it for many, many years (remember the Apple II?). BUT, I am certainly not a developer. I have no intention of putting together a program for use other than my own. I can tell from the forum that the vast majority of your users are not "developers" either, but, like me, are doing this for their own use. Some are more advanced, but only some. I am sure XML has been around for years, but I really had no use for it. I think I am correct in saying that more than one or two programs were written before the advent of XML, however. I have always been able to do anything with what I already knew and only add to my knowledge base as the need arises. Perhaps the need has arisen to learn XML so I can take better advantage of the API.

                Obviously, you are an experienced programmer and very familiar with eSignal's API. I am just suggesting that responses include perhaps a bit more "explicit" detail for those of us less experienced with some of the current elements of eSignal. There is a learning curve for the experienced as well as the novice.

                Anyway, no complaints. The XMLGetBasicQuote now works perfectly collecting about 2000 OHLCV quotes in about 30 seconds using VB 6, more than adequate for my needs. I did this by breakiing apart the "XML" string with plain vanilla code and reading it that way (afterall, it is just a string). I disagree however in your saying that the DDE is simpler. The XML function is a snap and works flawlessly. I will, however, do as you suggest and educate myself on XML as time allows. Any chance of an XML function for historical data? If it could be as simple as the XMLGetBasicQuote function, life would be good.

                Thank you. By the way, I am not upset in the slightest and if it came across that way, I apologize. The eSignal API is a great tool and I know you do your best to effectively respond to all of the forum's questions. I am sure it is quite a task.

                Best

                Larry Carhartt
                Last edited by masterdata; 05-04-2005, 09:18 PM.

                Comment


                • #9
                  I finally downloaded and installed version 7.9.1 and see the new DateTime tag.

                  Two questions:

                  1. When you say this is the number of seconds since midnight Jan 1, 1970, I take it that means 1 minute before 12:01 AM Jan 1, 1970? (I know this is a weird way of asking the question, but if you think about it, it will clarify the issue, at least for me)

                  2. What time zone? EST? Greenwich time? I assume the quote time zone is the same as that measured from the time zone of midnight 1-1-1970?

                  Thank you for including the new tag. It removes any doubt about the quote date when working over a weekend, etc.

                  Best,

                  Larry Carhartt

                  MasterDATA

                  Comment


                  • #10
                    From what I can see, the DateTime tag is based on Greenwich time. I'd appreciate your confirmation though.

                    Best,

                    Larry Carhartt

                    MasterDATA

                    Comment


                    • #11
                      You are correct. It is actually UTC (Coordinated Universal Time), formerly known as GMT (Greenwich Mean Time).

                      This is a handy site which takes a timestamp and returns the readable time and date.



                      Anthony

                      Comment

                      Working...
                      X