{"id":185940,"date":"2023-03-02T11:40:48","date_gmt":"2023-03-02T16:40:48","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=185940"},"modified":"2023-03-14T15:27:52","modified_gmt":"2023-03-14T19:27:52","slug":"exploring-the-finnhub-io-api","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/exploring-the-finnhub-io-api\/","title":{"rendered":"Exploring the finnhub.io API"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\"><em>Excerpt<\/em><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"exploring-the-finnhubio-api\">The changing face of market data providers<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Over the last few years, a number of new market data providers have come online. They tend to have modern websites, broad coverage, and well-documented RESTful APIs. Their services are often priced very competitively \u2013 especially for personal use \u2013 and usually have generous free tiers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One such newcomer is\u00a0finnhub.io\u00a0(https:\/\/robotwealth.com\/finnhub-api\/finnhub.io) Its offering includes stock, bond, crpto, and FX historical price data and real time trades and quotes. Their fundamental data offering is noticably broad and includes current values and point-in-time snapshots for numerous metrics. There are also some interesting alternative data sets including measures of social media sentiment, insider transactions and insider sentiment, senate lobbying, government spending, and others. In addition, there\u2019s a real-time newsfeed delivered over websockets.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The free tier is quite generous and offers more than enough for doing proof of concept work and testing ideas. While you only get a year\u2019s worth of historical data per API call on the free tier (more if you specify a lower resolution, like monthly), you can make up to 50 calls per minute.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this post, we\u2019ll explore the finnhub.io free tier via its REST API.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"get-started\">Get started<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A nice&nbsp;<a href=\"https:\/\/github.com\/Finnhub-Stock-API\/finnhub-python\">python library for working with the finnhub.io<\/a>&nbsp;is available:&nbsp;<code>pip install finnhub-python<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To access the API, you\u2019ll need an API key.&nbsp;<a href=\"https:\/\/finnhub.io\/register\">Get one here<\/a>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To get started, import the libraries we need and set up a&nbsp;<code>finnhub.Client<\/code>&nbsp;with your API key:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">import finnhub\nimport os\nimport time\nimport datetime\nfrom zoneinfo import ZoneInfo\nimport pandas as pd\nimport numpy as np\nimport seaborn as sns\nimport matplotlib.pyplot as plt\n\n# Set up client\n# Note the FINNHUB_KEY environment variable stores my API key\nfinnhub_client = finnhub.Client(api_key=os.environ['FINNHUB_KEY'])<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"ohlcv-stock-prices\">OHLCV stock prices<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The stock prices endpoint requires a symbol, a resolution (\u2018D\u2019 for daily data), and a date range consisting of \u2018from\u2019 and \u2018to\u2019 values as UNIX timestamps.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We\u2019ll get a week\u2019s worth of AAPL data from February 2023.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># helper function for making UNIX timestamps\ndef unix_timestamp_from_date(date, format='%Y-%m-%d'):\n    '''Transform human readable date string to UNIX timestamp'''\n    return int(\n        datetime.datetime.strptime(date, format)\n        .replace(tzinfo=ZoneInfo('US\/Eastern'))\n        .timestamp()\n    )\n\n# api query paramters\nsymbol = 'AAPL'\nresolution = 'D'\nfrom_date = unix_timestamp_from_date('2023-02-06')\nto_date =  unix_timestamp_from_date('2023-02-10')\n\n# make request and print\nres = finnhub_client.stock_candles(\n        symbol,\n        resolution,\n        from_date,\n        to_date\n      )\n\ndisplay(res)<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">{'c': [151.73, 154.65, 151.92, 150.87, 151.01],\n 'h': [153.1, 155.23, 154.58, 154.33, 151.3401],\n 'l': [150.78, 150.64, 151.168, 150.42, 149.22],\n 'o': [152.575, 150.64, 153.88, 153.775, 149.46],\n 's': 'ok',\n 't': [1675641600, 1675728000, 1675814400, 1675900800, 1675987200],\n 'v': [69858306, 83322551, 64120079, 56007143, 57450708]}<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The data comes down as a dictionary of lists. The docs state that prices are adjusted for splits. Spot checking some data against other sources suggests it\u2019s also adjusted for dividends.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The dictionary keys consist of letters that represent:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>c<\/code>: close prices<\/li>\n\n\n\n<li><code>h<\/code>: high prices<\/li>\n\n\n\n<li><code>l<\/code>: low prices<\/li>\n\n\n\n<li><code>o<\/code>: open prices<\/li>\n\n\n\n<li><code>s<\/code>: status<\/li>\n\n\n\n<li><code>t<\/code>: timestamps<\/li>\n\n\n\n<li><code>v<\/code>: volume traded<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">We\u2019ll want to transform that response data into a&nbsp;<code>pandas DataFrame<\/code>:<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Ditch the status code\ntry:\n  res.pop('s')\nexcept KeyError as e:\n  print(\"Already ditched status code\")\n\n# Create dataframe from remaining records\ndf = pd.DataFrame(res) \\\n  .rename(columns={\n    'c': 'close',\n    'h': 'high',\n    'l': 'low',\n    'o': 'open',\n    't': 'timestamp',\n    'v': 'volume'\n    }) \\\n  .set_index(keys = 'timestamp')\n\n# I like things in a certain order\ndf = df[['open', 'high', 'low', 'close', 'volume']]\n\n# Convert index to human-readable date format\ndf.index = pd.to_datetime(df.index, unit='s')\n\ndisplay(df)<\/pre>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td><\/td><td><strong>open<\/strong><\/td><td><strong>high<\/strong><\/td><td><strong>low<\/strong><\/td><td><strong>close<\/strong><\/td><td><strong>volume<\/strong><\/td><\/tr><tr><td><strong>timestamp<\/strong><\/td><td><\/td><td><\/td><td><\/td><td><\/td><td><\/td><\/tr><tr><td>2023-02-06<\/td><td>152.575<\/td><td>153.1000<\/td><td>150.780<\/td><td>151.73<\/td><td>69858306<\/td><\/tr><tr><td>2023-02-07<\/td><td>150.640<\/td><td>155.2300<\/td><td>150.640<\/td><td>154.65<\/td><td>83322551<\/td><\/tr><tr><td>2023-02-08<\/td><td>153.880<\/td><td>154.5800<\/td><td>151.168<\/td><td>151.92<\/td><td>64120079<\/td><\/tr><tr><td>2023-02-09<\/td><td>153.775<\/td><td>154.3300<\/td><td>150.420<\/td><td>150.87<\/td><td>56007143<\/td><\/tr><tr><td>2023-02-10<\/td><td>149.460<\/td><td>151.3401<\/td><td>149.220<\/td><td>151.01<\/td><td>57450708<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Looks good!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"fundamental-data\">Fundamental data<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The basic company financials endpoint serves quite a lot of data. The response object is a dictionary of dictionaries that includes current values for various metrics (under the&nbsp;<code>metric<\/code>&nbsp;outer key) as well as historical point-in-time snapshots (under the&nbsp;<code>series<\/code>&nbsp;outer key).<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"># Get basic company financials\nfinancials = finnhub_client.company_basic_financials(symbol, 'all')\n\n# Outer keys of response object\ndisplay(financials.keys())<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">dict_keys(['metric', 'metricType', 'series', 'symbol'])<\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Originally posted on <a href=\"https:\/\/robotwealth.com\/finnhub-api\/\">Robot Wealth<\/a> Blog.<\/em> <em>Visit Robot Wealth to read the full article.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Over the last few years, a number of new market data providers have come online. They tend to have modern websites, broad coverage, and well-documented RESTful APIs. <\/p>\n","protected":false},"author":271,"featured_media":185953,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[339,343,349,338,350,341,344],"tags":[14846,14845,865,5110,4659,1225,1224,595,4580],"contributors-categories":[13676],"class_list":["post-185940","post","type-post","status-publish","format-standard","has-post-thumbnail","category-data-science","category-programing-languages","category-python-development","category-ibkr-quant-news","category-quant-asia-pacific","category-quant-development","category-quant-regions","tag-finnhub","tag-finnhub-io-api","tag-github","tag-historical-data","tag-matplotlib","tag-numpy","tag-pandas","tag-python","tag-seaborn","contributors-categories-robot-wealth"],"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v28.0) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Exploring the finnhub.io API | IBKR Quant<\/title>\n<meta name=\"description\" content=\"Over the last few years, a number of new market data providers have come online. They tend to have modern websites, broad coverage, and well-documented...\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/185940\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Exploring the finnhub.io API | IBKR Campus US\" \/>\n<meta property=\"og:description\" content=\"Over the last few years, a number of new market data providers have come online. They tend to have modern websites, broad coverage, and well-documented RESTful APIs.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/exploring-the-finnhub-io-api\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-02T16:40:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-03-14T19:27:52+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/03\/python-green-purple-background.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"563\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Kris Longmore\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kris Longmore\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/exploring-the-finnhub-io-api\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/exploring-the-finnhub-io-api\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Kris Longmore\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/79c2a2775a70a4da1accf0068d731933\"\n\t            },\n\t            \"headline\": \"Exploring the finnhub.io API\",\n\t            \"datePublished\": \"2023-03-02T16:40:48+00:00\",\n\t            \"dateModified\": \"2023-03-14T19:27:52+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/exploring-the-finnhub-io-api\\\/\"\n\t            },\n\t            \"wordCount\": 439,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/exploring-the-finnhub-io-api\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/03\\\/python-green-purple-background.jpg\",\n\t            \"keywords\": [\n\t                \"finnhub\",\n\t                \"finnhub.io API\",\n\t                \"GitHub\",\n\t                \"historical data\",\n\t                \"Matplotlib\",\n\t                \"NumPy\",\n\t                \"Pandas\",\n\t                \"Python\",\n\t                \"Seaborn\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Python Development\",\n\t                \"Quant\",\n\t                \"Quant Asia Pacific\",\n\t                \"Quant Development\",\n\t                \"Quant Regions\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/exploring-the-finnhub-io-api\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/exploring-the-finnhub-io-api\\\/\",\n\t            \"name\": \"Exploring the finnhub.io API | IBKR Campus US\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/exploring-the-finnhub-io-api\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/exploring-the-finnhub-io-api\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/03\\\/python-green-purple-background.jpg\",\n\t            \"datePublished\": \"2023-03-02T16:40:48+00:00\",\n\t            \"dateModified\": \"2023-03-14T19:27:52+00:00\",\n\t            \"description\": \"Over the last few years, a number of new market data providers have come online. They tend to have modern websites, broad coverage, and well-documented RESTful APIs.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/exploring-the-finnhub-io-api\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/exploring-the-finnhub-io-api\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/03\\\/python-green-purple-background.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2023\\\/03\\\/python-green-purple-background.jpg\",\n\t            \"width\": 1000,\n\t            \"height\": 563,\n\t            \"caption\": \"Python\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/79c2a2775a70a4da1accf0068d731933\",\n\t            \"name\": \"Kris Longmore\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/krislongmore\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Exploring the finnhub.io API | IBKR Quant","description":"Over the last few years, a number of new market data providers have come online. They tend to have modern websites, broad coverage, and well-documented...","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:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/185940\/","og_locale":"en_US","og_type":"article","og_title":"Exploring the finnhub.io API | IBKR Campus US","og_description":"Over the last few years, a number of new market data providers have come online. They tend to have modern websites, broad coverage, and well-documented RESTful APIs.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/exploring-the-finnhub-io-api\/","og_site_name":"IBKR Campus US","article_published_time":"2023-03-02T16:40:48+00:00","article_modified_time":"2023-03-14T19:27:52+00:00","og_image":[{"width":1000,"height":563,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/03\/python-green-purple-background.jpg","type":"image\/jpeg"}],"author":"Kris Longmore","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kris Longmore","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/exploring-the-finnhub-io-api\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/exploring-the-finnhub-io-api\/"},"author":{"name":"Kris Longmore","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/79c2a2775a70a4da1accf0068d731933"},"headline":"Exploring the finnhub.io API","datePublished":"2023-03-02T16:40:48+00:00","dateModified":"2023-03-14T19:27:52+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/exploring-the-finnhub-io-api\/"},"wordCount":439,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/exploring-the-finnhub-io-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/03\/python-green-purple-background.jpg","keywords":["finnhub","finnhub.io API","GitHub","historical data","Matplotlib","NumPy","Pandas","Python","Seaborn"],"articleSection":["Data Science","Programming Languages","Python Development","Quant","Quant Asia Pacific","Quant Development","Quant Regions"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/exploring-the-finnhub-io-api\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/exploring-the-finnhub-io-api\/","name":"Exploring the finnhub.io API | IBKR Campus US","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/exploring-the-finnhub-io-api\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/exploring-the-finnhub-io-api\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/03\/python-green-purple-background.jpg","datePublished":"2023-03-02T16:40:48+00:00","dateModified":"2023-03-14T19:27:52+00:00","description":"Over the last few years, a number of new market data providers have come online. They tend to have modern websites, broad coverage, and well-documented RESTful APIs.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/exploring-the-finnhub-io-api\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/exploring-the-finnhub-io-api\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/03\/python-green-purple-background.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/03\/python-green-purple-background.jpg","width":1000,"height":563,"caption":"Python"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/79c2a2775a70a4da1accf0068d731933","name":"Kris Longmore","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/krislongmore\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2023\/03\/python-green-purple-background.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/185940","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/271"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=185940"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/185940\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/185953"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=185940"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=185940"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=185940"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=185940"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}