Jump to content

GetPriceBarsAfterDate gets 500 Server Error

Recommended Posts

I have a demo account that works fine for everything, for example:


  PriceBars: [
      BarDate: "/Date(1649635200000)/",
      Open: 1946.57,
      High: 1969.66,
      Low: 1940.05,
      Close: 1953.71
      BarDate: "/Date(1649721600000)/",
      Open: 1952.97,
      High: 1978.71,
      Low: 1949.75,
      Close: 1966.66
      BarDate: "/Date(1649808000000)/",
      Open: 1966.88,
      High: 1981.59,
      Low: 1962.92,
      Close: 1977.87
  PartialPriceBar: {
    BarDate: "/Date(1649894400000)/",
    Open: 1977.27,
    High: 1980.4,
    Low: 1960.72,
    Close: 1972.3

But this call fails:


  ok: false,
  redirected: false,
  status: 500,
  statusText: "Internal Server Error",
  url: "https://ciapi.cityindex.com/tradingapi/market/401153870/barhistoryafter?span=1&maxResults=3&priceTyp..."

Why am I getting the error?

Share this post

Link to post

Hi Stav,

The timestamp has to be supplied in seconds, rather than milliseconds. 

I have tried a test call and it works when supplied in seconds. 

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