Skip to content

Advanced

Overview

This section covers some of the advanced functionality of the FCLite API that can help you to create more complex and customized trading applications and strategies.

Session Connection Status

The FCLite API uses a web socket connection to communicate with the FXCM servers and stream real-time market data and order updates. The web socket connection can be affected by various factors, such as network issues, server maintenance, or user actions. Therefore, it is important to monitor the session connection status and handle any connection events that may occur while using the FCLite API.

In this article, you will learn how to check if the FCLite API session is connected or disconnected, and how to subscribe to the connection events, such as connect, disconnect, reconnect, and close. You will also learn how to handle these events and perform appropriate actions, such as reconnecting, resubscribing, or logging out.

Error Handling

The FCLite API may encounter different types of errors and exceptions while processing your requests and operations. Errors and exceptions can be caused by various reasons, such as invalid parameters, insufficient balance, server issues, etc. Therefore, it is essential to catch and handle these errors and exceptions and provide appropriate feedback to the user.

In this article, you will learn how to catch and handle different types of errors and exceptions that may occur while using the FCLite API. You will also learn how to interpret the error codes and messages and how to resolve common errors.

Offers Snapshot

The FCLite API provides a way to get the initial raw data about the available offers, such as currency pairs, bid and ask prices, spread, pip cost, etc. The offers snapshot is a JSON object that contains an array of offers, each with its own properties and values. The offers snapshot can be useful for initializing your application or tool with the current market data.

In this article, you will learn how to get the offers snapshot using the FCLite API. You will also learn how to parse and process the offers snapshot and how to use it for your trading needs.

In this article, you will learn how to calculate the rollover interest using the FCLite API. You will also learn how to get the rollover interest rates and the rollover interest history for your positions. You will also learn how to use the rollover interest for your trading strategies.

Table of Contents
Advanced
API Command used to get offers shapshots
Advanced
API Command used to get connection status
Advanced
These articles describes best practices when working with the API
Advanced
API Command used to make changes to system properties
Advanced
API Command used to make changes to trading properties