Jump to content

Issues with barhistory

Recommended Posts

When I execute the below URL,


I get only 5 results when I have requested 200. I observed this request doesn't always honor the PriceBars query param. It sometimes gives me all 200.

I was testing this around 11.53 PM EST Sunday and markets have opened at 6 PM EST for US Tech 100 CFD (the Market in the above case).

My assumption is it's only providing me price bars after the market has opened.

Is this a known issue?

    "PriceBars": [
            "BarDate": "/Date(1606086000000)/",
            "Open": 11912.1,
            "High": 11937.8,
            "Low": 11903.0,
            "Close": 11934.5
            "BarDate": "/Date(1606089600000)/",
            "Open": 11934.1,
            "High": 11950.8,
            "Low": 11928.7,
            "Close": 11949.6
            "BarDate": "/Date(1606093200000)/",
            "Open": 11949.5,
            "High": 11954.0,
            "Low": 11937.0,
            "Close": 11941.8
            "BarDate": "/Date(1606096800000)/",
            "Open": 11941.7,
            "High": 11951.1,
            "Low": 11939.0,
            "Close": 11944.5
            "BarDate": "/Date(1606100400000)/",
            "Open": 11944.6,
            "High": 11957.6,
            "Low": 11942.5,
            "Close": 11953.5
    "PartialPriceBar": {
        "BarDate": "/Date(1606104000000)/",
        "Open": 11953.3,
        "High": 11955.8,
        "Low": 11949.6,
        "Close": 11954.3

Thanks, Ken

Screen Shot 2020-11-22 at 11.58.39 PM.png

Share this post

Link to post

Hi Ken,

I just want to follow up on what you wrote here:


I observed this request doesn't always honor the PriceBars query param. It sometimes gives me all 200.

Do you mean that in your testing on Sunday night, you sometimes received the full 200 bars and sometimes you only received 5?

I've tried repeatedly sending the call about 20 times, and every time I receive the full lot as expected. I've not been able to reproduce the error you observed even once. Did you notice any pattern as to when you received the full data and when you did not?

As a side note, the following probably is not the cause but I did notice that in the Postman screenshot you are adding your authentication information in the call Parameters. They should be in the call Headers and not in the Parameters.

Kind Regards, PM

Share this post

Link to post

Yes. that is correct. Sometimes, I received only 5 and sometimes 200. I tried and I cannot reproduce this issue right now.

So, most probably it's related to just after markets have opened at 5-6 PM EST.

I can try it next Sunday around 8-9 PM EST.

There was no pattern. It was just random.

My Session was 83f23268-939a-473a-a19f-b5ad31a1b439 (destroyed it now) if it helps figuring out the issue. Time was 11-12 PM EST Sunday (Nov 22, 2020).

I can provide more SessionIds if required.

Thanks, Ken

Share this post

Link to post


Based on the session, we checked the logs and narrowed down the calls made from that evening at the time in question.We see five calls made and those were serviced by both of our data centres. Specifically, 4 calls were serviced from DC1 and 1 call was serviced by DC2.  

Do you recall if the 5 bar result was the more frequent event or was the 200 bar response more frequent? Unfortunately we neither capture responses sent to clients nor any metadata regarding the response so we cannot determine that from our end.

If you saw 5 results only once, that could be a problem with the data in DC2, and vice versa. If we can establish some of these additional facts, we can investigate further.

Kind Regards, PM




Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now