Announcement

Collapse
No announcement yet.

Accessing The History Data Cache - how do I do this? (noob here)

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

  • Accessing The History Data Cache - how do I do this? (noob here)

    HI there,

    As you all know from ready the subject for this thread, I am new to the eSignal API. I have it setup where I request historical data and it gives it to me just fine. Now, I know that there is the isHistoryReady(handle) call to check if the historical data is in the cache. My questions is, if it is in eSignal cache, what do I need to do or call to get eSignal to feed me the cached data?

    Thanks!
    Brant

  • #2
    Hi Brant,

    You just need to process the OnBarsReceived and OnBarsChanged events.

    Comment


    • #3
      Hi Starr,

      Ok, I get the data from onBarsReceived just fine, but if I make the same request again, it doesn't call it. If I check getIsHistoryReady after I make the second request that doesn't return the data, it returns 1 - meaning it is in cached somewhere. I have to call releaseAllHistoryData before the onBarsReceived callback works again.

      So, basically, when I make 1 request, it returns me data via onBarsReceived. When I make the same request right after it, the onBarsReceived event this time doesn't trigger b/c the data is 'cached' somewhere.... HERE's MY QUESTION: since onBarsReceived doesn't get triggered when data is 'cached' what do I need to call to get the 'cached' data??? Or, do I need to store the returned data from the first request, and manually pull it out when eSignal tells me that it is 'cached'????

      Thanks,
      Brant

      Comment


      • #4
        Brant,

        All returned data is stored in a message queue until you process it. OnBarsReceived handles the initial return. How are you processing the OnBarsChanged event?

        Comment


        • #5
          Right now I am just handling onBarsReceived and am not doing anything with onBarsChanged. I read the documentation that differentiates the two, but I don't quite follow... can you explain?

          When I make a fresh request, onBarsReceived is called. Now if I make a historical data request that is the same a second time, will eSignal invoke onBarsChanged instead?

          Thanks

          Comment


          • #6
            That's basically correct. OnBarsReceived will give you the initial return. You need to process OnBarsChanged to get subsequent updates.

            Comment

            Working...
            X