What is FXCM Rest API?

REST API is a web-based API using a Websocket connection. Developers and investors can create custom trading applications, integrate into our platform, back test strategies and build robot trading.


What can FXCM Rest API do?

1. You can get live streaming forex quote

2. You can get historical data

3. You can backtesting your algo

4. You can build your trading robot


Video Tutorial


Want to see what other trading APIs FXCM offering? (ALL FREE)

FIX API: An industry driven machine-to-machine communication protocol that has been specifically created to handle considerable amounts of financial information and transmit that information as fast as possible.

Java API: A Java Wrapper of FIX API plus support retrieving historical price.

ForexConnect API: A in-house SDK that has core function of FXCM Trading staton


Want Data?

Enjoy free access to our 26 currencies last 4 years sample tick data

Enjoy free access to our 21 currencies last 6 years sample candle data

Enjoy a free one-month sample of our Orders/Sentiment/Volume data

Strategies in LUA

Pip Sniper Deluxe PLUS

Places buy trades when Slow Stochastic K line crosses above the Slow Stochastic D line while price is above a Simple Moving Average. Places sell trades when Slow Stochastic K line crosses below the Slow Stochastic D line while price is below a Simple Moving Average. Closes and reverses on opposing signals. Only allows one position at a time. This strategy was coded in this YouTube tutorial video

RSI Trend Trader

Places buy trades when RSI crosses above 40 while price is above a Simple Moving Average. Places sell trades when RSI crosses below 60 while price is below a Simple Moving Average. Closes and reverses on opposing signals. Only allows one position at a time. This strategy was coded during a live webinar session on May 10, 2018. Sign up for our next live coding session here

Breakout Strategy with Smart Stops

Places buys when a candle closes above the highest high of the past N candles. Places sells when a candle closes below the lowest low of the past N candles. Only allows one buy and one sell positions at a time. Hedging is enabled. This strategy was coded during a live webinar session on June 7, 2018. Sign up for our next live coding session here

3 EMA Pullback

Places buys when price > FastEMA > MedEMA > SlowEMA and then price pulls back to a FastEMA. Places sells when price > FastEMA > MedEMA > SlowEMA and then price pulls back to a FastEMA. This strategy was coded during a live webinar session on June 21, 2018. Sign up for our next live coding session here

3 EMA Pullback 2.0

Same rules as original 3 EMA Pullback, except we add a time filter where new high/low must be created during London or New York trading sessions. Also, when price pulls back, price must be above previous high to buy or below previous low to sell. These changes attempt to filter out poor trades. This strategy was coded during a live webinar session on July 19, 2018. Sign up for our next live coding session here

MACD with MA Filter

Buys when MACD crosses above the Signal line while price is above the Simple Moving Average. Sells when MACD crosses below the Signal line while price is below the Simple Moving Average. Trades close when MACD crosses the Signal line in the opposite direction regardless of whether or not price is on the correct side of the Simple Moving Average. This strategy was coded during a live webinar session on August 2, 2018. Sign up for our next live coding session here

CCI Stack Range with 3 EMA Filter

This range trading strategy sells when CCI reaches above +100, +150, +200, and +250 for maximum of 4 sell positions at the same time. It buys when CCI reaches below -100, -150, -200, and -250 for maximum of 4 buy positions at the same time. Positions are closed when CCI crosses the 0 line. A 3 EMA trend filter prevents the strategy from opening positions that are against the trend (if a trend exists). This strategy was coded during a live webinar session on August 2, 2018. Sign up for our next live coding session here

Fractal MA PullBack

This strategy sells when a bearish fractal occurs when fractal candles 1 and 5 are below the Moving Average and fractal candle 3 is above the Moving Average. It also buys when a bullish fractal occurs where fractal candles 1 and 5 are above the moving average and fractal candle 3 is below the Moving Average. Stoploss is offset from fractal’s high/low using a custom parameter and limit is controlled by a multiplier of the stoploss’ distance. This strategy was coded during a live webinar session on August 30, 2018. Sign up for our next live coding session here