Jump to content

aperson

Members
  • Content count

    6
  • Joined

  • Last visited

  1. Hi, I'm a US client. I tried putting this in the query url:https://ciapi.cityindex.com/TradingAPI/market/search?SearchByMarketName=TRUE&Query=GBP%2FUSD&MaxResults=10 though i think im doing it wrong. Anyway same error lol. Btw, im just trying to get historical open,high,low,close bars. Does this need a certain market id as well'?
  2. fetch(`https://ciapi.cityindex.com/TradingAPI/market/401166448/barhistory?interval=MINUTE&span=15&PriceBars=20&PriceType=BID`,{ method:'POST', headers:{ 'Accept': 'application/json', 'Content-Type':'application/json', 'Session':'*****', 'UserName':'***** } }).then(res => res.json()) .then(res=>{ console.log(res); }) Hi I'm using node with the node-fetch module and am trying to get a sample query, but am getting {httpstatus:404 errormessage:'Endpoint not found'} I'm on a demo account and was told to use the live API which is this but all my sample queries end up in this error. Is my account working or i just don't understand something really simple here?.... Thanks!
  3. Thanks so much for the response lol I was wondering why local cache would be mentioned. I'm just new to working with trading APIs so just wanted to make sure. Are there any other requirements/standards that I should be aware of at all? Thanks
  4. I'm on a demo api account and was wondering if "The front-end UI application should have NO caching on the client side. "(from the docs) meant no sessionStorage or localStorage can store data from the API into my own browser. I'm a bit confused. Would storing my data locally like this affect the API service or the platform at all? Is this for some kind of efficiency or a privacy concern that is part of the API/Platform policy? I want to make sure that I don't accidentally do some task that violates terms of use or something.
  5. Hi, I'm comfortable fetching data from APIs. but im not sure where to start even after reading the docs. It seems that I need to provide the session and username in the request headers. How do I obtain the session token? From the doc, I'm still not sure if I get it from a url request or from a webpage or something. Does somebody have a quick start URL or example to help me start this? Thanks
×