Jump to content

kensplanet

Members
  • Content count

    6
  • Joined

  • Last visited

Everything posted by kensplanet

  1. Is there any simple API call where I just provide the market name to know if that market is closed?
  2. Best way to know if Market is closed

    Thank you. I'll try the REST GetMarketInformation call approach.
  3. Is there any way we can close all positions using a single API call?
  4. When I execute the below URL, https://ciapi.cityindex.com/TradingAPI/market/401437607/barhistory?interval=HOUR&span=1&PriceBars=200&UserName=XXXXX&Session=XXXXXXXXXX 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
  5. Issues with barhistory

    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
×