Jump to content

Search the Community

Showing results for tags 'forex'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • Gain Capital API FAQ
    • General Questions and Discussion

Found 3 results

  1. Hello I am currently trying to see about connecting to Forex for a project but I am unsure where to start, I am using a .php environment currently. I am truly a novice when it comes to this but I was hoping that someone could help point me in the right way.
  2. Has anyone else dealt with the issue of some historical FX data only coming in with two decimal places? Here is an example of the code I run: URL = 'https://ciapi.cityindex.com/TradingAPI/market/'+ str(MarketId) + '/barhistory?interval=DAY&span=1&PriceBars=4000&PriceType=BID' r = requests.get(url=URL, headers=HEAD) df = pd.DataFrame(r.json()['PriceBars']) df = df[['BarDate','Open','High','Low','Close']] df.BarDate=df.BarDate.apply(lambda x: x[6:19]) df.BarDate=pd.to_datetime(df.BarDate,unit='ms') print(df.head()) The output is: BarDate Open High Low Close 0 2005-11-08 0.87 0.87 0.87 0.87 1 2005-11-09 0.87 0.88 0.87 0.87 2 2005-11-10 0.87 0.88 0.87 0.87 3 2005-11-11 0.87 0.87 0.87 0.87 4 2005-11-14 0.87 0.87 0.87 0.87 For more recent data I get 5 decimal places but for data ~pre-2011 it is all 2 decimal places. Is there a formatting structure I am missing? Thanks!
  3. Hello, I have an account with CityIndex and I've been using the REST API for a few months now for spreadbetting FOREX. If I'm not mistaken cityindex offers metatrader 4 accounts which allow you trade spot FOREX (by spot I mean the actual underlying product, NOT a derivative, typically CFD or spreadbet or option, future, whatever). I am wondering - am I able to trade spot FOREX with the API? I can see that when I search (although this depends a bit on whether I am using the API demo/testing or my live account) for some pair... e.g. searching for EUR USD, I get a lot of results, not just 3 (normal CFD, CFD per 0.0001, spreadbet DFT). I'm not talking about options. I was wondering if any of these were spot FX and how I could identify them? Or just in general... is spot FOREX available to be traded on the API? Thanks for any input, Kostas