Back to Blog
by Finage at January 18, 2021 1 MIN READ
Technical Guides
Financial data is more accessible and easy to understand via Finage. In this post, we will talk about how we can use or test the WebSockets on the terminal.
Let's start with installing the WSCAT. You need to NodeJS on your computer to install the WSCAT. You can install NodeJS with the given link below.
After the installation, it's easy to install the WSCAT. Run the command given below and it will install the WSCAT globally.
npm install -g wscat
That's all, now we have WSCAT on our computer. You can check it with wscat -V
command on your terminal. Finage will provide you a VPS for accessing the data with the highest performance possible. You'll get the details via E-Mail and Finage will give you a unique address like
wss://abc123456.finage.ws:6000/?token=YOUR_SOCKET_KEY
You can connect to your virtual private server with this address. If you want to test your VPS or if you want to get the latest price with minimum effort on your computer via your unique address, open your terminal and run the command given below;
wscat -n -c "wss://abc123456.finage.ws:6000/?token=YOUR_SOCKET_KEY"
You can get more details about the parameters by running the wscat -h command.
After the connection, you will get a message from the server. We are using the Cryptocurrency server in this tutorial so, the server responded as "Connected to the Cryptocurrency Market". It's ready to get the data in Real-Time.
Send the command given below to the server;
{ "action": "subscribe", "symbols": "BTCUSD" }
The data will flow really fast after the command. You can stop it by pressing the CTRL + C keys. In this response, we are getting symbol name, price, quantity, and timestamp. Finage offers you a customizable server. It means you can edit the responses. For example, you can add "ask" and "bid" prices to the response, and more, of course.
Contact with the Finage team to get your Real-Time data in minutes.
You can contact to Finage consultants to get more informaions about Finage
Featured Posts
Impact of AI on Forex Trading: Analyzing Advancements & Integration
April 19, 2024
Why Crypto & Blockchain Are So Important in 2024?
April 18, 2024
Emerging Markets and Their Influence on Global Stock Indices
April 17, 2024
Web3 Security Challenges and Solutions
April 16, 2024
Quantum Computing and Its Potential Impact
April 15, 2024
Categories
Forex
Finage Updates
Stocks
Real-Time Data
Finage News
Crypto
ETFs
Indices
Technical Guides
Financial Statements
Excel Plugin
Web3
Tags
WSCAT
terminal
cmd
real-time
financial data
data
websocket
bitcoin
cryptocurrency
stock
consultation
Finage
tutorial
guide
technical
connection
WS
Join Us
You can test all data feeds today!
Start Free Trial
If you need more information about data feeds, feel free to ask our team.
Request Consultation
Back to Blog
Please note that all data provided under Finage and on this website, including the prices displayed on the ticker and charts pages, are not necessarily real-time or accurate. They are strictly intended for informational purposes and should not be relied upon for investing or trading decisions. Redistribution of the information displayed on or provided by Finage is strictly prohibited. Please be aware that the data types offered are not sourced directly or indirectly from any exchanges, but rather from over-the-counter, peer-to-peer, and market makers. Therefore, the prices may not be accurate and could differ from the actual market prices. We want to emphasize that we are not liable for any trading or investing losses that you may incur. By using the data, charts, or any related information, you accept all responsibility for any risks involved. Finage will not accept any liability for losses or damages arising from the use of our data or related services. By accessing our website or using our services, all users/visitors are deemed to have accepted these conditions.