# FOREX.com API: questions and answers

Independent and unofficial. Not affiliated with or endorsed by any broker or platform named here. Educational only: nothing here is advice, and nothing here recommends a broker or a trade.

This is the markdown version of https://openbrokerapi.com/answers/forex-com-city-index, written from the same records as that page.

Risk warning: CFDs and spread bets are complex instruments and come with a high risk of losing money rapidly due to leverage. You can lose money on these products, and each provider publishes its own loss figure under FCA rules. You should consider whether you understand how they work and whether you can afford to take the high risk of losing your money. Automated and API trading can amplify losses through bugs, connectivity failures and runaway orders.

7 questions about the FOREX.com API, each answered from the FOREX.com record on this site (https://openbrokerapi.com/brokers/forex-com-city-index) and nothing else. 1 of the answers rests on a record labelled unverified.

- Newest check: 2026-10-12
- Official documentation: [docs.labs.gaincapital.com](https://docs.labs.gaincapital.com/)

An answer here is the record's own wording, cut at the end of a sentence, or a list of names read from records. An answer that opens with the word Unverified has no dated source behind it. Where this page and the provider's own documentation differ, the documentation wins. Nothing here recommends a broker.

## FOREX.com API questions

### Does FOREX.com have an API?

This register records FOREX.com as having its own API (REST and Streaming), with availability marked as restricted. StoneX (formerly GAIN Capital) REST trading API shared by FOREX.com and StoneX Trading, the new UK name for City Index since 9 Sep 2026.

- Status: verified. Source: [StoneX API documentation host](https://docs.labs.gaincapital.com/), checked 2026-09-20.

- [The FOREX.com API record](https://openbrokerapi.com/brokers/forex-com-city-index)

### Does FOREX.com have a demo or paper trading API?

Partial: the StoneX API documentation describes two environments, Live and Pre-Production, each with its own API and streaming address.

- Status: verified. Source: [StoneX API documentation, Getting Started](https://docs.labs.gaincapital.com/Content/Getting%20Started/Getting%20Started.htm), checked 2026-10-12.

- [The FOREX.com record's full wording](https://openbrokerapi.com/brokers/forex-com-city-index#access)

### What are FOREX.com's API rate limits?

Request throttle: 500 requests per 5 s, HTTP 429 above it. Scope: Requests from one client application. The page does not say whether the count is per session, per AppKey or per IP address.

- Status: verified. Source: [docs.labs.gaincapital.com](https://docs.labs.gaincapital.com/Content/Getting%20Started/CIAPI%20Basics.htm), checked 2026-10-12.

- [FOREX.com API rate limits in full, each with its scope](https://openbrokerapi.com/brokers/forex-com-city-index/rate-limits)

### How do I authenticate with the FOREX.com API?

A session token. POST your user name, password and the AppKey you were issued to /v2/Session, then send the returned session token and your user name with every request as the request headers Session and UserName.

- Status: verified. Source: [StoneX API documentation, API basics](https://docs.labs.gaincapital.com/Content/Getting%20Started/CIAPI%20Basics.htm), checked 2026-10-12.
- Status: verified. Source: [StoneX API documentation, LogOn v2](https://docs.labs.gaincapital.com/Content/HTTP%20Services/LogOn%20v2.htm), checked 2026-10-12.

- [The FOREX.com record's full wording](https://openbrokerapi.com/brokers/forex-com-city-index#access)

### Does FOREX.com support streaming or WebSocket prices?

Lightstreamer, a third party streaming protocol, over long lived HTTP connections and not WebSocket as documented. Streams cover prices, news headlines, client account margin, orders and quotes, grouped into adapters.

- Status: verified. Source: [StoneX API documentation, architecture](https://docs.labs.gaincapital.com/Content/Getting%20Started/CIAPI%20Arky.htm), checked 2026-10-12.

- [The FOREX.com record's full wording](https://openbrokerapi.com/brokers/forex-com-city-index#access)

### Is there an official Python library for FOREX.com?

No Python library marked official is recorded here for FOREX.com, which is not evidence that none exists. The record lists as community: pygcapi and forexcom. No dated source is recorded for pygcapi.

- Status: verified. Source: [forexcom](https://pypi.org/project/forexcom/), checked 2026-09-18.

- [Every library in the FOREX.com record](https://openbrokerapi.com/brokers/forex-com-city-index#sdks)

### Does FOREX.com have an MCP server?

Unverified. Not found on the pages opened, which is not proof that none exists. No MCP or agent tooling found in searches, and no first party StoneX API page was opened. Recorded as no route found, not as confirmed absence.

- Status: unverified. No source opened.

- [The MCP server directory: looked for and not found](https://openbrokerapi.com/ai/mcp-directory#none-found)

## Not recorded here

The FOREX.com record cannot answer these questions yet, so they are not asked above. That is a gap in this dataset. It says nothing either way about FOREX.com.

- [What does the most referenced FOREX.com error mean?](https://openbrokerapi.com/answers/error-codes) (not recorded here)

## Where to go next

- [The FOREX.com API record in full: every field with its source](https://openbrokerapi.com/brokers/forex-com-city-index)
- [Answers for every broker and platform API](https://openbrokerapi.com/answers)
- [Which retail brokers have a public trading API?](https://openbrokerapi.com/answers/has-an-api)
- [Which broker APIs have a demo environment?](https://openbrokerapi.com/answers/demo-api)
- [What are the rate limits of each broker API?](https://openbrokerapi.com/answers/rate-limits)
- [How does each broker API authenticate?](https://openbrokerapi.com/answers/authentication)
- [Which broker APIs stream prices?](https://openbrokerapi.com/answers/streaming)
- [Which broker APIs have an official Python library?](https://openbrokerapi.com/answers/python-library)
- [Which broker APIs have an MCP server?](https://openbrokerapi.com/answers/mcp-server)
- [What does each API's most referenced error mean?](https://openbrokerapi.com/answers/error-codes)
- [Axi API: questions and answers](https://openbrokerapi.com/answers/axi)
- [Bitget API: questions and answers](https://openbrokerapi.com/answers/bitget)
- [Capital.com API: questions and answers](https://openbrokerapi.com/answers/capital-com)
- [CMC Markets API: questions and answers](https://openbrokerapi.com/answers/cmc-markets)
- [Deriv API: questions and answers](https://openbrokerapi.com/answers/deriv)
- [Dukascopy API: questions and answers](https://openbrokerapi.com/answers/dukascopy)
- [eToro API: questions and answers](https://openbrokerapi.com/answers/etoro)
- [Exness API: questions and answers](https://openbrokerapi.com/answers/exness)
- [FXCM API: questions and answers](https://openbrokerapi.com/answers/fxcm)
- [FxPro API: questions and answers](https://openbrokerapi.com/answers/fxpro)
- [IG API: questions and answers](https://openbrokerapi.com/answers/ig)
- [Interactive Brokers API: questions and answers](https://openbrokerapi.com/answers/ibkr)
- [OANDA API: questions and answers](https://openbrokerapi.com/answers/oanda)
- [Pepperstone API: questions and answers](https://openbrokerapi.com/answers/pepperstone)
- [Saxo API: questions and answers](https://openbrokerapi.com/answers/saxo)
- [Swissquote API: questions and answers](https://openbrokerapi.com/answers/swissquote)
- [ThinkMarkets API: questions and answers](https://openbrokerapi.com/answers/thinkmarkets)
- [Tickmill API: questions and answers](https://openbrokerapi.com/answers/tickmill)
- [Trading 212 API: questions and answers](https://openbrokerapi.com/answers/trading-212)
- [XTB API: questions and answers](https://openbrokerapi.com/answers/xtb)

## Licence and how to cite

The records behind this page are all rights reserved. This file is the page itself, at its own address, in another format. It is not part of the CC BY 4.0 downloads listed at https://openbrokerapi.com/data. Quote from it with a link to the page.

Cite as: FOREX.com API: questions and answers. Broker API Hub, https://openbrokerapi.com/answers/forex-com-city-index, newest check 2026-10-12.

Where you rely on a single figure, cite the source and the checked date printed beside it as well. Where this page and a broker's own documentation differ, the documentation wins.
