Who Is TrueFx?
TrueFX Market Data is an aggregated stream from various liquidity sources which include some of the largest financial institutions in the world. The TrueFX Individual Market Data API is a simple HTTP protocol used by clients to access the streaming real-time market. TrueFX provides a spot trading service that delivers clean data by Integral technology, this data is cleared by Jefferies FX Prime Brokerage and also supported by the world's largest electronic Forex partners.
In order to retrieve all 28 Forex pairs an account needs to be set up with TrueFx, this is free and will allow you to get access to the real market rates from TrueFx.
How Is The Data Accessible?
The data is returned and populated in a class collection of currency data that can be easily accessed via the cBot code, the example project will show you how easy it is to access all the data by printing it to the log.
- Currency-pair symbol (EUR/USD
- Millisecond timestamp (1253834856482)
- Bid big figure (for example, 1.46)
- Bid points (for example,431)
- Offer big figure (for example, 1.46)
- Offer points (for example, 483)
- High, the greatest offer Low, the smallest bid price since the currency pair’s roll time (for example, 1.46715) price since the currency pair’s roll time (for example, 1.46428)
- Open, the mid-price at the currency pair’s roll time (for example, 1.46662)
Using the Example cBot
Included in this download is an example cTrader cBot that demonstrates how to use the API library to retrieve price data, the user settings are shown below. You need to enter the Currency Pairs using a forward slash, for example, AUD/USD and additional pairs need to be split with a comma.
- AUD/USD, USD/JPY, EUR/USD
Synchronous vs Asynchronous Calls
In the example cBot we have provided examples to call the remote Web API synchronously or asynchronously, what this means is that a sync call will wait until all the data has been returned and if you use the async call then your application will continue to run while in the background the data is fetched.
There is a parameter called Asynchronous Operation and when set to yes it runs asynchronously.
Results Printed To cBot Log
The image below shows a single currency data that is returned by the API.
What is Included in the Download?
When you download the file you will find the following files below, we provide fully documented source code as well as a hands-on video tutorial.
- ClickAlgo.TrueFx.API - this is the assembly file that you will need to reference in your project.
- ClickAlgo TrueFx Web API.algo - this is the cBot example project showing how you can use the API.
Hands-On Video Code-Walkthrough
We have recorded a hands-on tutorial on how to use the client API with your trading system.
Duration: 10-minutes - Watch full screen on YouTube
Need Help Adding The API to Your Project?
If you are having difficulties with integrating the TrueFx Web API into your existing trading robot then why not contact us for a quote, we offer a professional development service at a very competitive price.
How To Install
First, make sure you have the cTrader trading platform installed and then simply unzip the file and double-click on it to automatically install onto the platform.
Join Telegram Community
You can join a Telegram community and chat with other traders to discuss, share and ask for help.