Announcement

Collapse
No announcement yet.

API Connection status

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

  • API Connection status

    (1) Using the desktop API, is there anyway of testing the connection to ensure that data is flowing?

    (2) I recently received a message advising that the connection had been closed down by the administrator, how will this impact my API connection?

  • #2
    The Desktop API relies on eSignal to be instantiated, so the simplest check is not necessarily programmatic. If you cannot get data via eSignal, you will not get data through the API. You can also use the IsEntitled() event after calling the SetApplication("username") method.

    Why was connection closed down?

    Comment


    • #3
      I do not know why the connection went down, the only thing I do know is that the error message comes up from time to time and I wanted a way to confirm that data is flowing to my application.

      I would like to confirm that your suggestion is to call the IsEntitled function at pre-defined intervals with a response confirming the connection and a lack of response being reason for a connection failure.

      Comment


      • #4
        If you are looking for a "heart-beat" or something, you can also use GetAppWHND (?) or another function that does not require much overhead or time to retrieve. You can also get real-time quotes for an active symbol like "IBM", "QQQ" or "ES U4" and if you do not get data for more than about 10 seconds on any of those, you may have lost connection.

        Comment


        • #5
          There is a COM message which can come up with "Retry" and "Switch" buttons. If this is the case, the last Beta release fixed this. Also this beta will give you RequestHistory() responses correctly.

          Personally my app updates the status bar when new data shows up. You could just simply keep a counter each time you see new data, or have a variable which is the last time new data came in, visible on the screen.

          Generally I'm getting plenty of data and if it messes up the result is either an obvious crash or CPU spiking to 100%, followed by some lingering death dance.

          Hope this helps.

          -Jim

          Comment


          • #6
            Thankyou Jim and Robi, I have incorporated your suggestion into my application and it works a treat . . . many thanks for your prompt response and assistance.

            Comment


            • #7
              Originally posted by eSignal Robi
              You can also get real-time quotes for an active symbol like "IBM", "QQQ" or "ES U4" and if you do not get data for more than about 10 seconds on any of those, you may have lost connection.
              The solution you suggested will work on regular trading sessions, but could bear some problems on different timeframes.

              Are there any plans on providing something as a "connection state" event ?

              Regards
              Dierk Droth
              www.trademagic.net
              TradeMagic - Trading at its best

              Comment


              • #8
                Which connection is dropped? The connection to the Internet or connection to our server farm? Or to IHooks?

                You can call a function that has minimal overhead like GetAppTime() or even check your connection to the Internet through a simple ping to a known site. Connections should not drop very often.

                Comment


                • #9
                  Well, the connection you mentioned in your quoted post : Internet connection of eSignal app to eSignal servers.

                  So the question remains: are there any plans on supporting a connection state (all other providers I know of do provide that)?

                  As for ping:
                  I noticed that (on my installation) there are open connections to :
                  - ip232-93.esignal.com:2189
                  - ip232-250.esignal.com:2190
                  - ip76-140.dbc.com:http

                  Do these servers stay the same on all eSignal installations or is it just my installation ? If they change -> how to figure out ?
                  Are there any more connections, I should be aware of ?

                  Regards
                  Dierk Droth
                  www.trademagic.net
                  TradeMagic - Trading at its best

                  Comment


                  • #10
                    Robi,

                    I still would appreciate getting any information on these issues.

                    Regards
                    Dierk Droth
                    www.trademagic.net
                    TradeMagic - Trading at its best

                    Comment


                    • #11
                      Well, the Data Manager manages connections to various server types on our server farm. There are over 600 possible servers to connect to. The Data Manager does provide a connection state message, but there are no plans for the Desktop API to provide separate connection state messages.

                      This article may help you further understand:

                      Comment


                      • #12
                        Robi,

                        Thanks for letting me know.
                        That's what I thought: pinging would not make sense.

                        Thus, I strongly recommend that the eSignal API provides a connection status (event). It is essential for any active trader to be aware of the connection status of his price feed.

                        Another thought: Since the ActiveX API now also supports submission of orders, it's even mandatory to know if the connection is up or down. There is no serious broker API out there, not supporting the current connection status.

                        Regards
                        Last edited by Dierk Droth; 09-25-2004, 01:02 AM.
                        Dierk Droth
                        www.trademagic.net
                        TradeMagic - Trading at its best

                        Comment


                        • #13
                          Thank you for your suggestion. There are ways to create a "heartbeat" type process, for example, you could request data for an active symbol at a 1 minute interval, which should do the trick. Connections to our servers typically do not drop if there is a high-speed internet connection, which I would strongly recommend when using the Desktop API.

                          Comment


                          • #14
                            Robi,

                            I spent some more thoughts on your proposal:

                            - Since eSignal provides quotes/data for exchanges all over the world there has to be a a symbol which is actively traded ~24 hours. AFAIK this will eliminate any stock and future symbol. Any other suggestions ?
                            - Using a set of symbols and switch symbols based on current time will introduce new problems since there is no sychronization with the eSignal servers and a eSignal enabled app could hardly figure out at what timezone to local PC is running (you may set any timezone on your PC).

                            So all this brings in a bunch of new problems instead of solving the real one: providing the connection status in a reliable way.

                            The issue remains unresolved. Any other idea ?

                            Regards
                            Dierk Droth
                            www.trademagic.net
                            TradeMagic - Trading at its best

                            Comment


                            • #15
                              How about calling IsEntitled()? That function makes a request to our server farm and returns TRUE if the username is entitled to use the Desktop API.

                              Comment

                              Working...
                              X