FMP

FMP

Enter

Company Web Socket API

Provides a Real-time feed of stock price and quote data.

About Company Web Socket API

A WebSocket is a type of communication protocol that allows for real-time updates, such as company stock prices and quote data.

Login: { "event": "login", "data": { "apiKey": "your_api_key" } }
Subscribe: { "event": "subscribe", "data": { "ticker": ["aapl", "msft"] } }
Unsubscribe: { "event": "unsubscribe", "data": { "ticker": ["aapl", "msft"] } }

Parameter:
ticker: Subscribe to single ticker by providing as a string, or Subscribe to multiple tickers by providing list of tickers as following example.
data: { "ticker": "aapl" } or { "ticker": ["aapl", "msft"] }.

Response:
s: Ticker related to the asset.
t: Timestamp
type: Trade type (Communicates what type of price update this is. Will always be 'T' for last trade message, 'Q' for top-of-book update message, and 'B' for trade break messages.)
ap: The current lowest ask price. Only available for Quote updates, null otherwise.
as: The number of shares at the ask price. Only available for Quote updates, null otherwise.
bs: The number shares at the bid price. Only available for Quote updates, null otherwise.
bp: The current highest bid price. Only available for Quote updates, null otherwise.
lp: The last price the last trade was executed at. Only available for Trade and Break updates, null otherwise.
ls: The amount of shares (volume) traded at the last price. Only available for Trade and Break updates, null otherwise.

How it works

How-it-works Signup

Get Started: Sign Up Today!

Begin your data journey by signing up and accessing our API endpoints. Get instant access to a vast array of financial data to power your applications and analyses.

How-it-works Free plan

Dive into Data: Free Plan Access

Explore our free data plan and access a wide range of financial data through our API endpoints. Start integrating real-time data into your applications and projects.

How-it-works Upgrade-Premium

Unlock Premium Data: Upgrade Now!

Upgrade to our premium plan for exclusive access to advanced financial datasets via our API endpoints. Take your analyses to the next level and gain a competitive edge in the market.

Related Company Web Socket APIs

link-image
Crypto Web Socket

Provides a Real-time feed of crypto price and quote data. Login: { \"event\": \"login\", \"data\": { \"apiKey\": \"your_api_key\" } } Subscribe: { \"event\": \"subscribe\", \"data\": { \"ticker\": [... Read more

link-image
Forex Web Socket

Provides a Real-time feed of forex price and quote data. Login: { \"event\": \"login\", \"data\": { \"apiKey\": \"your_api_key\" } } Subscribe: { \"event\": \"subscribe\", \"data\": { \"ticker\": [\... Read more

Company Web Socket API FAQs

How can I connect to a Financial Modeling Prep WebSocket?

Our WebSocket APIs are based on entitlements that control which WebSocket Clusters you can connect to and which kinds of data you can access.

What is advanced data and what is websocket?

Advanced data refers to the detailed and specialized information provided through our API endpoints. WebSocket is a technology that allows for real-time price data for US stocks, Forex, and Crypto to be delivered instantly.

I have a premium membership, but I cannot access Websockets. How can I resolve this issue?

If you are facing issues accessing Websockets with your premium membership, please follow these steps: 1. Ensure you are using the correct API key. 2. Check if you are following the correct instructions to access the WebSocket data. 3. If you are still unable to access Websockets, please contact our support team for further assistance.

How can I resolve the 'Unauthorized' response when trying to connect to the streaming (websocket) API?

If you are receiving an 'Unauthorized' response when trying to connect to the streaming (websocket) API, please make sure you are using the correct API key. Double-check that the API key you are using is correct and properly formatted in your request. If you continue to experience issues, please refer to the documentation provided on our website or reach out to our support team for further assistance.

Why am I experiencing intermittent connection issues with the Crypto WebSocket service?

Intermittent connection issues with the Crypto WebSocket service can be caused by various factors such as gateway timeout errors, bad gateway errors, connection reset errors, and connection refused errors. These errors can occur randomly during normal operation and may require a server restart to temporarily resolve the issue. It is recommended to maintain an open WebSocket connection constantly, subscribe to specific symbols only when users request them, and unsubscribe from symbols when no users are watching. If you are experiencing these issues, please provide detailed logs and snapshots for further investigation.

Can I use unlimited websockets with the Ultimate plan for real-time prices?

Yes, with the Ultimate plan, you can use unlimited websockets for real-time prices.

How should I subscribe to a symbol on WebSocket?

You should use the instructions on our documentation and always subscribe to a symbol in lowercase. e.g. "aapl".

Unlock Premium Financial Insights Today!

Join Financial Modeling Prep now to access real-time data, in-depth analysis, and personalized insights tailored to your financial goals. Stay ahead of the game and make informed decisions with our comprehensive tools and dedicated support. Sign up today and take the first step towards financial success!

Start Your Journey Now!
FMP

FMP

Financial Modeling Prep API provides real time stock price, company financial statements, major index prices, stock historical data, forex real time rate and cryptocurrencies. Financial Modeling Prep stock price API is in real time, the company reports can be found in quarter or annual format, and goes back 30 years in history.
twitterlinkedin
2017-2025 © Financial Modeling Prep