FCS provides unmatched, real time data Socket API.
Socket version 3 improve performance and prices accurace.
Before Socket Api, all developers were sending request every second on our server to get latest price. But now we introduce Socket API, Socket.io Is a JS library that helps you to connect with our server on realtime connection, Socket connection will reduce latency 5 minutes to 1 seconds.
Real time prices support around ~400 Forex currency and 200+ Crypto currency. Download supported list in excel file.
Support ListIf you have no idea about Socket.io Please read here. Socket Docs
To use socket.io you need a little knowledge about JS, We allow socket connection from Server to Server AND Client Browser to our Server.
If you want to get all real time pricing on your browser to show to your visitors. No special installation you need.
All guide are mention in socket_browser.js file.
Simple Socket Code and run index.html file in browser. View Live
Download JS<script src="socket.io.js"<>/script>
<script>
// API Key and Currency IDs Configuration
const API_KEY = "API_KEY"; // Replace with your actual API KEY
const CURRENCY_IDS = "1,2,3"; // Replace with your desired currency IDs
// Socket connection function
function socketConnection() {
try {
// Initialize socket connection
const socket = io.connect("wss://fcsapi.com", {
transports: ['websocket'],
reconnection: true, // Enable automatic reconnection
reconnectionAttempts: 5, // Limit reconnection attempts
reconnectionDelay: 2000 // Wait 2 seconds between attempts
});
// Verify API Key
socket.emit('heartbeat', API_KEY);
// Join currency streams
socket.emit('real_time_join', CURRENCY_IDS);
// Listen for incoming data
socket.on('data_received', (data) => {
console.log("Data received:", data);
});
// Handle socket connection errors
socket.on('connect_error', (error) => {
console.error("Socket connection error:", error.message);
});
// Handle disconnections
socket.on('disconnect', (reason) => {
console.warn("Socket disconnected:", reason);
if (reason === "io server disconnect") {
socket.connect();
}
});
} catch (error) {
console.error("An error occurred in the socket connection:", error);
}
}
// Start the socket connection
socketConnection();
</script>
If you want to get all real-time pricing directly on your server you need little knowledge about "JS", "Nodejs" and "cmd in windows OR terminal in Linux".
You need to install Nodejs on your windows/Linux Server, Create empty project folder, and run our server.js file in CMD/terminal. Download Server JS file.
If you have no idea about socket.io then we recommend you to learn "how to build simple Chat app with socket.io" After that, you will learn all skills that you need to run our code. Socket Docs.
Download Server JSnpm install socket.io@2.4.1
node server.js
If you are working on Java or C#, socket.io library easily available on internet, just find Socket.io library for your native language.
Check FCS socket+php code Github Here
Normal pricing plan on the pricing page does not include socket access, you need to contact us for socket connection access. Below are two plans for socket connection.
Advanced: Client Server To FCS Server connection, $100/month.
Direct connection from browser to FCS server or any Application to FCS server is NOT allow. Only 1 connection allow from your machine,terminal or CMD to FCS.
If you have 1000 visitors and you want to connect your all visitors with Socket connection then you need to provide them service from your own socket connection.
You need to create your own nodejs/socket connection and then connect your Visitors with your server.
Premium: Client Browser To FCS server connection, $350/month.
Direct connection from browser/Apps to FCS server is allow. With plan 1 you don't need your own nodejs or socket port connection, We allow you to connect your visitors directly with FCS server, Or you can directly access currency updates from browsers.
No difference between Starter, Advanced and Premium in Real-time updates except number of connection or restrictions limit.
Click below link to go to Example page, and press Start button to connect with socket.
Live Price Check Prices, Market trends and signals are not designed for trading purpose, These signals are only for education or non-commercial purpose use. Data contained in this application/website is not necessarily real-time nor accurate and so prices may not be accurate and may differ from the actual market price, meaning prices are indicative and not appropriate for trading purposes. Therefore we doesn`t bear any responsibility for any trading losses you might incur as a result of using this data.
Latest price minimum refresh rate is 5 Seconds