FXCM Forex Trading API
Access real-time forex quotes, historical candlestick data, and order management through the FXCM trading platform.
Access real-time forex quotes, historical candlestick data, and order management through the FXCM trading platform.
Connect to FXCM's REST and Socket.IO API for forex trading, market data, and account management.
The sgcWebSockets FXCM component provides access to the FXCM trading platform API. Stream real-time forex quotes for major and minor currency pairs, retrieve historical candlestick data, and manage trading orders through authenticated connections.
Subscribe to real-time forex quotes from FXCM.
uses
sgcHTTP_API_FXCM;
var
FXCM: TsgcHTTPAPI_FXCM;
procedure TForm1.FormCreate(Sender: TObject);
begin
FXCM := TsgcHTTPAPI_FXCM.Create(nil);
FXCM.FXCMOptions.AccessToken := 'your-access-token';
FXCM.OnFXCMPrice := OnPrice;
FXCM.Connect;
end;
procedure TForm1.Subscribe;
begin
FXCM.SubscribeSymbol('EUR/USD');
end;
procedure TForm1.OnPrice(Sender: TObject;
aSymbol, aBid, aAsk: string);
begin
Label1.Caption := aSymbol + ' Bid: ' + aBid +
' Ask: ' + aAsk;
end;
Deep-link to the component reference, grab the ready-to-run demo project, and download the trial.