{"id":3387,"date":"2021-10-03T15:23:55","date_gmt":"2021-10-03T13:23:55","guid":{"rendered":"https:\/\/eodhd.com\/financial-apis\/?p=3387"},"modified":"2025-09-16T11:01:30","modified_gmt":"2025-09-16T09:01:30","slug":"new-real-time-data-api-websockets","status":"publish","type":"post","link":"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets","title":{"rendered":"Real-Time Data API via Websockets: US Stocks, Forex pairs, Digital Currencies"},"content":{"rendered":"\n<p>EODHD offers one of the best ways for investors, developers, and data analysts to incorporate real-time finance data for the US market, 1100+ Forex pairs, 1000+ Digital Currencies into their decision-making projects with a delay of <strong>less than 50ms<\/strong> via WebSockets. For US stocks our real-time data API supports <strong>pre-market and post-market hours<\/strong> (from 4 am to 8 pm EST). <\/p>\n\n\n\n<p>The subscription provides real-time access to prices for <strong>50 tickers simultaneously<\/strong> via WebSockets. Additionally, the 50-symbol limit can be increased through the <a href=\"https:\/\/eodhd.com\/cp\/dashboard#\">user dashboard<\/a>.<\/p>\n\n\n\n<p>For global markets and all exchanges around the world we also offer <a href=\"https:\/\/eodhd.com\/financial-apis\/live-realtime-stocks-api\/\">Live (Delayed) data<\/a> with 15min delay.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p class=\"has-text-align-center\"><a class=\"maxbutton-1 maxbutton maxbutton-subscribe-to-api external-css btn\" href=\"https:\/\/eodhd.com\/register\"><span class='mb-text'>Sign up &amp; Get Data<\/span><\/a><\/p>\n\n\n\n\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-is-websocket-protocol\">What is WebSocket protocol<\/h2>\n\n\n\n<p>WebSockets is a communication protocol that provides full-duplex communication channels over a single TCP connection. It enables real-time communication between a client and a server, allowing them to exchange messages continuously without the overhead of repeatedly establishing new connections. In the case of financial data providers, Websockets API provides real-time stock market information with minimal delay. <\/p>\n\n\n\n<p>Providing clients with the WebSocket protocol for real-time data answers the question: &#8216;What is the best stock market data API?&#8221;. Since websocket technology is quite resource consuming, &#8220;free stock API for real-time market data&#8221; stays as feature impossible to find. EODHD provides real-time data in paid plans <strong>EOD+Intraday<\/strong> and <strong>ALL-IN-ONE<\/strong>. Read more about plans <a href=\"https:\/\/eodhd.com\/pricing\">here<\/a>.<\/p>\n\n\n\n<div style=\"height:51px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-what-you-get-data-availability\">What you get (Data availability)<\/h2>\n\n\n\n<p><strong>US Stocks<\/strong> (<a href=\"https:\/\/eodhd.com\/exchange\/US\">full list of US tickers available<\/a>)<br>\u2022&nbsp;<em>Trade<\/em>&nbsp;stream (last price, size, conditions, etc.)<br>\u2022&nbsp;<em>Quote<\/em>&nbsp;stream (bid\/ask, sizes)<br>\u2022 Covers primary US exchanges (e.g., NASDAQ, NYSE)<br>\u2022&nbsp;Extended hours supported&nbsp;(pre\u2011 and post\u2011market)<\/p>\n\n\n\n<p><strong>FOREX<\/strong> <a href=\"https:\/\/eodhd.com\/exchange\/FOREX\">(full list of available currency pairs)<\/a><br>\u2022 Bid\/ask + day change\/difference<br>\u2022 Tickers like&nbsp;EURUSD,&nbsp;AUDUSD, etc.<\/p>\n\n\n\n<p><strong>Digital Currencies <\/strong>(<a href=\"https:\/\/eodhd.com\/exchange\/CC\">Full list of available crypto pairs<\/a>)<br>\u2022 Last price, quantity, day change\/difference<br>\u2022 Tickers like&nbsp;ETH-USD,&nbsp;BTC-USD<br><br>Lists of available tickers and pairs for Real-Time feeds can be retrieved in JSON format via <a href=\"https:\/\/eodhd.com\/financial-apis\/exchanges-api-list-of-tickers-and-trading-hours\">this API endpoint<\/a>, providing the full list of exchange or asset class components (use&nbsp;&#8220;US&#8221;&nbsp;for US stocks,&nbsp;&#8220;CC&#8221;&nbsp;for cryptocurrencies,&nbsp;&#8220;FOREX&#8221;&nbsp;for currency pairs).<\/p>\n\n\n\n<p><em>Demo access&nbsp;is available with API key&nbsp;&#8220;demo&#8221;&nbsp;for:&nbsp;AAPL,&nbsp;MSFT,&nbsp;TSLA,&nbsp;EURUSD,&nbsp;ETH-USD,&nbsp;BTC-USD.<\/em><\/p>\n\n\n\n<div style=\"height:51px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-updates-amp-latency\">Updates &amp; Latency<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Streaming<\/strong>&nbsp;updates pushed in real time over a persistent WebSocket connection.<\/li>\n\n\n\n<li>Typical transport latency&nbsp;<strong>&lt; 50 ms<\/strong>&nbsp;from our gateway to your client (excluding network distance).<\/li>\n\n\n\n<li>Market status flag indicates&nbsp;<strong>open<\/strong>,&nbsp;<strong>closed<\/strong>, or&nbsp;<strong>extended hours<\/strong>&nbsp;for US stocks.<\/li>\n<\/ul>\n\n\n\n<div style=\"height:51px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-endpoints\">Endpoints<\/h2>\n\n\n\n<p>Open connection &#8211; use&nbsp;<strong>wss:\/\/<\/strong>&nbsp;in production.&nbsp;<strong>ws:\/\/<\/strong>&nbsp;is available for local testing.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-us-equities-trades-and-quotes\">US Equities (Trades and Quotes):<\/h3>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"\" class=\"\"><code>wss:\/\/ws.eodhistoricaldata.com\/ws\/us?api_token=YOUR_API_KEY<\/code><\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"\" class=\"\"><code>wss:\/\/ws.eodhistoricaldata.com\/ws\/us-quote?api_token=YOUR_API_KEY<\/code><\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<h3 class=\"wp-block-heading\" id=\"h-forex\"><br>Forex<\/h3>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"\" class=\"\"><code>wss:\/\/ws.eodhistoricaldata.com\/ws\/forex?api_token=YOUR_API_KEY<\/code><\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<h3 class=\"wp-block-heading\" id=\"h-crypto\">Crypto<\/h3>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"\" class=\"\"><code>wss:\/\/ws.eodhistoricaldata.com\/ws\/crypto?api_token=YOUR_API_KEY<\/code><\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<div style=\"height:51px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-subscribe-unsubscribe\">Subscribe \/ Unsubscribe<\/h2>\n\n\n\n<p>After the socket is open, send JSON commands.<\/p>\n\n\n\n<p>Subscribe:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">{\"action\": \"subscribe\", \"symbols\": \"ETH-USD\"}<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Multiple symbols (comma\u2011separated):<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">{\"action\": \"subscribe\", \"symbols\": \"AAPL,TSLA\"}<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Unsubscribe:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">{\"action\": \"unsubscribe\", \"symbols\": \"ETH-USD,BTC-USD\"}<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<div style=\"height:51px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-response-schemas\">Response Schemas<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-us-trades-endpoint-nbsp-ws-us\">US Trades (endpoint:&nbsp;\/ws\/us):<\/h3>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">{\n\"s\": \"AAPL\",        \/\/ ticker\n\"p\": 227.31,        \/\/ last trade price\n\"v\": 100,           \/\/ trade size (shares)\n\"c\": 12,            \/\/ trade condition code (see glossary)\n\"dp\": false,        \/\/ dark pool (true\/false)\n\"ms\": \"open\",       \/\/ market status: open | closed | extended hours\n\"t\": 1725198451165  \/\/ epoch ms\n}<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p><strong>Note:<\/strong>&nbsp;US trade messages include &#8220;c&#8221; (numeric) that maps to a condition code. See the downloadable glossary in the <a href=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2024\/04\/Trade_Conditions_Glossary.pdf\">docs (pdf)<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-us-quotes-endpoint-nbsp-ws-us-quote\">US Quotes (endpoint:&nbsp;\/ws\/us-quote):<\/h3>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">{\n\"s\": \"AAPL\",         \/\/ ticker\n\"ap\": 227.33,        \/\/ ask price\n\"as\": 200,           \/\/ ask size\n\"bp\": 227.30,        \/\/ bid price\n\"bs\": 100,           \/\/ bid size\n\"t\": 1725198451165   \/\/ epoch ms\n}<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-forex-endpoint-ws-forex\">FOREX (endpoint: \/ws\/forex):<\/h3>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">{\n\"s\": \"EURUSD\",       \/\/ symbol\n\"a\": 1.08675,        \/\/ ask\n\"b\": 1.08665,        \/\/ bid\n\"dc\": 0.21,          \/\/ daily change, %\n\"dd\": 0.0023,        \/\/ daily difference, price units\n\"ppms\": false,       \/\/ pre\/post market status (always false for FX)\n\"t\": 1725198451165.  \/\/ epoch ms\n}<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-crypto-endpoint-ws-crypto\">Crypto (endpoint: \/ws\/crypto):<\/h3>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">{\n\"s\": \"ETH-USD\",       \/\/ symbol\n\"p\": 2874.12,         \/\/ last price\n\"q\": 0.145,           \/\/ trade quantity\n\"dc\": -0.54,          \/\/ daily change, %\n\"dd\": -15.61,         \/\/ daily difference, price units\n\"t\": 1725198451165.   \/\/ epoch ms\n}<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<div style=\"height:51px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-symbol-limits-amp-usage-notes\">Symbol Limits &amp; Usage Notes<\/h2>\n\n\n\n<p>Concurrent subscriptions: up to <strong>50 symbols per connection<\/strong> by default (upgradeable in user dashboard for extra fee).<br><br>Tickers:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>US: use plain tickers like AAPL, MSFT<\/li>\n\n\n\n<li>Forex: no separator, e.g., EURUSD<\/li>\n\n\n\n<li>Crypto: dash\u2011separated, e.g., BTC-USD<\/li>\n<\/ul>\n\n\n\n<p>Resubscribe on reconnect: if the socket reconnects, re\u2011send your current subscriptions.<br>Compression\/Throughput: consider batching symbol lists in a single subscribe call for efficiency.<\/p>\n\n\n\n<div style=\"height:51px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-examples-copy-paste-ready\">Examples (copy\u2011paste ready)<\/h2>\n\n\n\n<p><strong>Open connection for US trades:<\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><\/li>\n<\/ol>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"\" class=\"\">wss:\/\/ws.eodhistoricaldata.com\/ws\/us?api_token=demo<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Then send:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">{\"action\": \"subscribe\", \"symbols\": \"AMZN,TSLA\"}<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<h3 class=\"wp-block-heading\" id=\"h-\"><\/h3>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><br><\/p>\n\n\n\n<p><strong>Open connection for Forex pairs:<\/strong><\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"\" class=\"\">wss:\/\/ws.eodhistoricaldata.com\/ws\/forex?api_token=demo<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Then send:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">{\"action\": \"subscribe\", \"symbols\": \"EURUSD,AUDUSD\"}<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<h3 class=\"wp-block-heading\" id=\"h-\"><br><\/h3>\n\n\n\n<div style=\"height:40px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Open connection for Crypto:<\/strong><\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"\" class=\"\">wss:\/\/ws.eodhistoricaldata.com\/ws\/crypto?api_token=demo<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>Then send:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">{\"action\": \"subscribe\", \"symbols\": \"ETH-USD,BTC-USD\"}<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<div style=\"height:51px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-tools-for-testing\">Tools for Testing<\/h2>\n\n\n\n<p><strong>Chrome<\/strong>:&nbsp;<em><a href=\"https:\/\/chromewebstore.google.com\/detail\/simple-websocket-client\/gobngblklhkgmjhbpbdlkglbhhlafjnh?pli=1\">Simple WebSocket Client<\/a><\/em>&nbsp;extension (open a socket, paste open URL, send JSON quote).<br><\/p>\n\n\n\n<div style=\"height:31px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>EODHD Chrome extension<\/strong>: free mini ticker window for live Stocks\/FX\/Crypto. Perfect to see our real-time data feed. No commands needed. <a href=\"https:\/\/chromewebstore.google.com\/detail\/eodhd-ticker-prices-stock\/kgnlncdmcpebnpigmbggeloheigdlboe\">Install from here.<\/a><br><\/p>\n\n\n\n<div style=\"height:31px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><strong>Postman (or Insomnia) &#8211; point-and-click<\/strong>:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>New \u2192&nbsp;WebSocket Request<\/li>\n\n\n\n<li>URL:&nbsp;wss:\/\/ws.eodhistoricaldata.com\/ws\/crypto?api_token=demo<\/li>\n\n\n\n<li>Connect \u2192 send: {&#8220;action&#8221;:&#8221;subscribe&#8221;,&#8221;symbols&#8221;:&#8221;BTC-USD&#8221;}<br><\/li>\n<\/ol>\n\n\n\n<div style=\"height:31px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><br><strong>Python (minimal script):<\/strong><\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"python\" class=\"language-python\">import asyncio, websockets, json\n\nURL = \"wss:\/\/ws.eodhistoricaldata.com\/ws\/crypto?api_token=demo\"\nasync def main():\n    async with websockets.connect(URL) as ws:\n        await ws.send(json.dumps({\"action\":\"subscribe\",\"symbols\":\"BTC-USD\"}))\n        while True:\n            print(await ws.recv())\n\nasyncio.run(main())\n<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<div style=\"height:31px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p><br><strong>Mac Os Terminal &#8211; websocat (via Homebrew):<\/strong><\/p>\n\n\n\n<p>Install websocat:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code class=\"\">brew install websocat<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<p>One-liner command:<\/p>\n\n\n\n            <div class=\"code__wrapper\">\n                <div class=\"code__content\">\n                    \n<pre class=\"wp-block-code\"><code lang=\"json\" class=\"language-json\">printf '{\"action\":\"subscribe\",\"symbols\":\"BTC-USD\"}\\n' | \\\nwebsocat \"wss:\/\/ws.eodhistoricaldata.com\/ws\/crypto?api_token=demo\"<\/code><\/pre>\n\n                <\/div>\n                <div class=\"code__btns\">\n                    <button class=\"code__copy\" class=\"copy\" title=\"Copy url\">\n                        <svg class=\"code__copy__icon\" width=\"20\" height=\"20\" viewBox=\"0 0 20 20\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\">\n                            <use xlink:href=\"\/img\/icons\/copy.svg#copy\"><\/use>\n                        <\/svg>\n                        <img decoding=\"async\" class=\"code__copy__approve\" alt=\"\" src=\"\/img\/approve_ico.svg\" loading=\"eager\">\n                    <\/button>\n                <\/div>\n            <\/div>\n        \n\n\n<div style=\"height:51px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-quick-comparison-with-live-delayed-api-and-intraday-api\">Quick Comparison with Live (Delayed) API and Intraday API<\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Aspect<\/th><th><strong>Real-Time (WebSockets)<\/strong><\/th><th><strong><a href=\"https:\/\/eodhd.com\/financial-apis\/live-realtime-stocks-api\">Live (Delayed)<\/a><\/strong><\/th><th><strong><a href=\"https:\/\/eodhd.com\/financial-apis\/intraday-historical-data-api\">Intraday Historical<\/a><\/strong><\/th><\/tr><\/thead><tbody><tr><td><strong>Transport<\/strong><\/td><td>WebSocket (push)<\/td><td>HTTPS REST (pull)<\/td><td>HTTPS REST (pull)<\/td><\/tr><tr><td><strong>Latency \/ Freshness<\/strong><\/td><td>~live (&lt;50 ms transport)<\/td><td>Stocks: 15\u201320 min delay; Currencies: ~1 min<\/td><td>Finalized ~2\u20133 h after US after-hours close<\/td><\/tr><tr><td><strong>Data types<\/strong><\/td><td>US trades &amp; quotes; FX ticks; crypto ticks<\/td><td>Latest OHLCV snapshot (1-min updates)<\/td><td>OHLCV bars at 1m \/ 5m \/ 1h<\/td><\/tr><tr><td><strong>Time ranges<\/strong><\/td><td>n\/a (streaming)<\/td><td>n\/a (snapshot feed)<\/td><td>1m: 120 d \u00b7 5m: 600 d \u00b7 1h: 7200 d<\/td><\/tr><tr><td><strong>Markets &amp; assets<\/strong>*<\/td><td><strong>US stocks<\/strong>\u00a0(pre\/post supported),\u00a0<strong>Forex &amp;  Digital Currencies<\/strong><\/td><td><strong>US &amp; Global Stocks<\/strong>,\u00a0<strong>Forex &amp;  Digital Currencies<\/strong><\/td><td><strong>US &amp; Global Stocks<\/strong>,\u00a0<strong>Forex &amp;  Digital Currencies<\/strong><\/td><\/tr><tr><td><strong>Best for<\/strong><\/td><td>Dashboards, signals, market-making tools<\/td><td>Quote tickers, watchlists, lightweight UIs<\/td><td>Backtests, analytics, charting<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>* <a href=\"https:\/\/eodhd.com\/financial-apis\/covered-tickers-eodhd\">Get the full list of covered tickers.<\/a><\/p>\n\n\n\n<div style=\"height:51px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>EODHD offers one of the best ways for investors, developers, and data analysts to incorporate real-time finance data for the US market, 1100+ Forex pairs, 1000+ Digital Currencies into their decision-making projects with a delay of less than 50ms via WebSockets. For US stocks our real-time data API supports pre-market and post-market hours (from 4 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":6519,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[2],"tags":[],"coding-language":[],"ready-to-go-solution":[],"qualification":[],"financial-apis-category":[],"financial-apis-manuals":[],"class_list":["post-3387","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-historical-prices-live-data-apis","has_thumb"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v21.6 (Yoast SEO v26.7) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Real-Time Data API (WebSockets) for the best market trading, offers streaming stock data and price information<\/title>\n<meta name=\"description\" content=\"Real-Time Data API Offering Top Streaming of Stock Data, Market Trading Prices with Less Than 50ms Delay via WebSockets for US Markets, FOREX, and Alternative currencies.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Real-Time Data API via Websockets: US Stocks, Forex pairs, Digital Currencies\" \/>\n<meta property=\"og:description\" content=\"Real-Time Data API Offering Top Streaming of Stock Data, Market Trading Prices with Less Than 50ms Delay via WebSockets for US Markets, FOREX, and Alternative currencies.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets\" \/>\n<meta property=\"og:site_name\" content=\"Stock Price Data, Financial and Stock Market API\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/eodhistoricaldata\" \/>\n<meta property=\"article:published_time\" content=\"2021-10-03T13:23:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-16T09:01:30+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2021\/10\/Real-Time-Data-API-WebSockets.png\" \/>\n\t<meta property=\"og:image:width\" content=\"270\" \/>\n\t<meta property=\"og:image:height\" content=\"270\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"EOD Historical Data Support\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:site\" content=\"@EOD_data\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"EOD Historical Data Support\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets#article\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets\"},\"author\":{\"name\":\"EOD Historical Data Support\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/fa5be3606e0cd967a175978cebe97415\"},\"headline\":\"Real-Time Data API via Websockets: US Stocks, Forex pairs, Digital Currencies\",\"datePublished\":\"2021-10-03T13:23:55+00:00\",\"dateModified\":\"2025-09-16T09:01:30+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets\"},\"wordCount\":816,\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#organization\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2021\/10\/Real-Time-Data-API-WebSockets.png\",\"articleSection\":[\"1. Market Data APIs\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets\",\"name\":\"Real-Time Data API (WebSockets) for the best market trading, offers streaming stock data and price information\",\"isPartOf\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets#primaryimage\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets#primaryimage\"},\"thumbnailUrl\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2021\/10\/Real-Time-Data-API-WebSockets.png\",\"datePublished\":\"2021-10-03T13:23:55+00:00\",\"dateModified\":\"2025-09-16T09:01:30+00:00\",\"description\":\"Real-Time Data API Offering Top Streaming of Stock Data, Market Trading Prices with Less Than 50ms Delay via WebSockets for US Markets, FOREX, and Alternative currencies.\",\"breadcrumb\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets#primaryimage\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2021\/10\/Real-Time-Data-API-WebSockets.png\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2021\/10\/Real-Time-Data-API-WebSockets.png\",\"width\":270,\"height\":270,\"caption\":\"Real-Time Data API WebSockets\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/eodhd.com\/financial-apis\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Real-Time Data API via Websockets: US Stocks, Forex pairs, Digital Currencies\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#website\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/\",\"name\":\"Historical Stock Prices and Fundamental Financial Data APIs | EODHD\",\"description\":\"End Of Day (EOD), Fundamental and Real-time\/Live Data Market API\",\"publisher\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/eodhd.com\/financial-apis\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#organization\",\"name\":\"EODHD (EOD Historical Data)\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"contentUrl\":\"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png\",\"width\":159,\"height\":82,\"caption\":\"EODHD (EOD Historical Data)\"},\"image\":{\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/eodhistoricaldata\",\"https:\/\/x.com\/EOD_data\",\"https:\/\/www.reddit.com\/r\/EODHistoricalData\/\",\"https:\/\/eod-historical-data.medium.com\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/fa5be3606e0cd967a175978cebe97415\",\"name\":\"EOD Historical Data Support\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3599a531133e7fc83654b72e3103c05b1bbeb91168cf4786cbad64afa9b82413?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3599a531133e7fc83654b72e3103c05b1bbeb91168cf4786cbad64afa9b82413?s=96&d=mm&r=g\",\"caption\":\"EOD Historical Data Support\"}}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Real-Time Data API (WebSockets) for the best market trading, offers streaming stock data and price information","description":"Real-Time Data API Offering Top Streaming of Stock Data, Market Trading Prices with Less Than 50ms Delay via WebSockets for US Markets, FOREX, and Alternative currencies.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets","og_locale":"en_US","og_type":"article","og_title":"Real-Time Data API via Websockets: US Stocks, Forex pairs, Digital Currencies","og_description":"Real-Time Data API Offering Top Streaming of Stock Data, Market Trading Prices with Less Than 50ms Delay via WebSockets for US Markets, FOREX, and Alternative currencies.","og_url":"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets","og_site_name":"Stock Price Data, Financial and Stock Market API","article_publisher":"https:\/\/www.facebook.com\/eodhistoricaldata","article_published_time":"2021-10-03T13:23:55+00:00","article_modified_time":"2025-09-16T09:01:30+00:00","og_image":[{"width":270,"height":270,"url":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2021\/10\/Real-Time-Data-API-WebSockets.png","type":"image\/png"}],"author":"EOD Historical Data Support","twitter_card":"summary_large_image","twitter_creator":"@EOD_data","twitter_site":"@EOD_data","twitter_misc":{"Written by":"EOD Historical Data Support","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets#article","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets"},"author":{"name":"EOD Historical Data Support","@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/fa5be3606e0cd967a175978cebe97415"},"headline":"Real-Time Data API via Websockets: US Stocks, Forex pairs, Digital Currencies","datePublished":"2021-10-03T13:23:55+00:00","dateModified":"2025-09-16T09:01:30+00:00","mainEntityOfPage":{"@id":"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets"},"wordCount":816,"publisher":{"@id":"https:\/\/eodhd.com\/financial-apis\/#organization"},"image":{"@id":"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2021\/10\/Real-Time-Data-API-WebSockets.png","articleSection":["1. Market Data APIs"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets","url":"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets","name":"Real-Time Data API (WebSockets) for the best market trading, offers streaming stock data and price information","isPartOf":{"@id":"https:\/\/eodhd.com\/financial-apis\/#website"},"primaryImageOfPage":{"@id":"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets#primaryimage"},"image":{"@id":"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets#primaryimage"},"thumbnailUrl":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2021\/10\/Real-Time-Data-API-WebSockets.png","datePublished":"2021-10-03T13:23:55+00:00","dateModified":"2025-09-16T09:01:30+00:00","description":"Real-Time Data API Offering Top Streaming of Stock Data, Market Trading Prices with Less Than 50ms Delay via WebSockets for US Markets, FOREX, and Alternative currencies.","breadcrumb":{"@id":"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets#primaryimage","url":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2021\/10\/Real-Time-Data-API-WebSockets.png","contentUrl":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2021\/10\/Real-Time-Data-API-WebSockets.png","width":270,"height":270,"caption":"Real-Time Data API WebSockets"},{"@type":"BreadcrumbList","@id":"https:\/\/eodhd.com\/financial-apis\/new-real-time-data-api-websockets#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/eodhd.com\/financial-apis"},{"@type":"ListItem","position":2,"name":"Real-Time Data API via Websockets: US Stocks, Forex pairs, Digital Currencies"}]},{"@type":"WebSite","@id":"https:\/\/eodhd.com\/financial-apis\/#website","url":"https:\/\/eodhd.com\/financial-apis\/","name":"Historical Stock Prices and Fundamental Financial Data APIs | EODHD","description":"End Of Day (EOD), Fundamental and Real-time\/Live Data Market API","publisher":{"@id":"https:\/\/eodhd.com\/financial-apis\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/eodhd.com\/financial-apis\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/eodhd.com\/financial-apis\/#organization","name":"EODHD (EOD Historical Data)","url":"https:\/\/eodhd.com\/financial-apis\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/logo\/image\/","url":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","contentUrl":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2023\/12\/EODHD-Logo.png","width":159,"height":82,"caption":"EODHD (EOD Historical Data)"},"image":{"@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/eodhistoricaldata","https:\/\/x.com\/EOD_data","https:\/\/www.reddit.com\/r\/EODHistoricalData\/","https:\/\/eod-historical-data.medium.com\/"]},{"@type":"Person","@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/fa5be3606e0cd967a175978cebe97415","name":"EOD Historical Data Support","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/eodhd.com\/financial-apis\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3599a531133e7fc83654b72e3103c05b1bbeb91168cf4786cbad64afa9b82413?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3599a531133e7fc83654b72e3103c05b1bbeb91168cf4786cbad64afa9b82413?s=96&d=mm&r=g","caption":"EOD Historical Data Support"}}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/eodhd.com\/financial-apis\/wp-content\/uploads\/2021\/10\/Real-Time-Data-API-WebSockets.png","jetpack_shortlink":"https:\/\/wp.me\/p8NjB1-SD","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts\/3387","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/comments?post=3387"}],"version-history":[{"count":157,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts\/3387\/revisions"}],"predecessor-version":[{"id":7674,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/posts\/3387\/revisions\/7674"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/media\/6519"}],"wp:attachment":[{"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/media?parent=3387"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/categories?post=3387"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/tags?post=3387"},{"taxonomy":"coding-language","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/coding-language?post=3387"},{"taxonomy":"ready-to-go-solution","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/ready-to-go-solution?post=3387"},{"taxonomy":"qualification","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/qualification?post=3387"},{"taxonomy":"financial-apis-category","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/financial-apis-category?post=3387"},{"taxonomy":"financial-apis-manuals","embeddable":true,"href":"https:\/\/eodhd.com\/financial-apis\/wp-json\/wp\/v2\/financial-apis-manuals?post=3387"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}