{"id":21411,"date":"2019-12-24T09:07:00","date_gmt":"2019-12-24T14:07:00","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=21411"},"modified":"2023-01-20T15:08:26","modified_gmt":"2023-01-20T20:08:26","slug":"ibkr-api-depth-mark","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/ibkr-api-depth-mark\/","title":{"rendered":"IBKR API &#8211; Depth of Market Subscriptions"},"content":{"rendered":"\n<p>Interested in retrieving depth\nof market (DOM) quotes via <strong>IBKR API<\/strong>?\nCheck out the functionality the parameter <strong>isSmartDepth\n<\/strong>provides via <em>reqMktDepth<\/em>. Set it to\n<strong>True<\/strong> to get depth of market (DOM)\nquotes from the Level 1 and Level 2 <a href=\"https:\/\/www.interactivebrokers.com\/en\/index.php?f=14193\">Market\ndata feeds<\/a>. <\/p>\n\n\n\n<p>For step-by-step instructions, see the <a href=\"https:\/\/www.interactivebrokers.com\/en\/index.php?f=5061\">API Release Notes<\/a> and&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/interactivebrokers.github.io\/tws-api\/market_depth.html\" target=\"_blank\">GitHub Guide<\/a>, and be sure to practice with API source files and samples:&nbsp;<a rel=\"noreferrer noopener\" href=\"https:\/\/interactivebrokers.github.io\/\" target=\"_blank\">https:\/\/interactivebrokers.github.io\/<\/a><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"624\" height=\"106\" data-src=\"\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/image-81.png\" alt=\"\" class=\"wp-image-29316 lazyload\" data-srcset=\"https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/image-81.png 624w, https:\/\/ibkrcampus.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/image-81-300x51.png 300w\" data-sizes=\"(max-width: 624px) 100vw, 624px\" src=\"data:image\/svg+xml;base64,PHN2ZyB3aWR0aD0iMSIgaGVpZ2h0PSIxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjwvc3ZnPg==\" style=\"--smush-placeholder-width: 624px; aspect-ratio: 624\/106;\" \/><\/figure>\n\n\n\n<p><em>Notes:<\/em><\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><em>TWS version needed: 974 or higher<\/em><\/li><li><em>Sample code from IBKR API <\/em><a href=\"https:\/\/interactivebrokers.github.io\/tws-api\/market_depth.html\" target=\"_blank\" rel=\"noreferrer noopener\"><em>GitHub Guide<\/em><\/a><em><\/em><\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Check out the parameter isSmartDepth, which faciliates retrieving depth of market (DOM) quotes via IBKR API<\/p>\n","protected":false},"author":90,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[340,338,341],"tags":[851,5121,4923,806,4922,494,4921],"contributors-categories":[13576],"class_list":{"0":"post-21411","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-api-development","7":"category-ibkr-quant-news","8":"category-quant-development","9":"tag-algo-trading","10":"tag-big-data","11":"tag-computational-finance","12":"tag-data-science","13":"tag-econometrics","14":"tag-quant","15":"tag-quantitative-finance","16":"contributors-categories-interactive-brokers"},"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 v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>IBKR API &#8211; Depth of Market Subscriptions | IBKR Quant<\/title>\n<meta name=\"description\" content=\"Check out the parameter isSmartDepth, which faciliates retrieving depth of market (DOM) quotes via IBKR API\" \/>\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\/21411\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"IBKR API - Depth of Market Subscriptions | Quant Blog\" \/>\n<meta property=\"og:description\" content=\"Check out the parameter isSmartDepth, which faciliates retrieving depth of market (DOM) quotes via IBKR API\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/ibkr-api-depth-mark\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2019-12-24T14:07:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-20T20:08:26+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.ibkrcampusdev.wpengine.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/image-81.png\" \/>\n<meta name=\"author\" content=\"IBKR Quant\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"IBKR Quant\" \/>\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:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/ibkr-api-depth-mark\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/ibkr-api-depth-mark\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"IBKR Quant\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/8279da2435a7846d83a358a25c49b8f4\"\n\t            },\n\t            \"headline\": \"IBKR API &#8211; Depth of Market Subscriptions\",\n\t            \"datePublished\": \"2019-12-24T14:07:00+00:00\",\n\t            \"dateModified\": \"2023-01-20T20:08:26+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/ibkr-api-depth-mark\\\/\"\n\t            },\n\t            \"wordCount\": 88,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/ibkr-api-depth-mark\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.ibkrcampusdev.wpengine.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/12\\\/image-81.png\",\n\t            \"keywords\": [\n\t                \"Algo Trading\",\n\t                \"Big Data\",\n\t                \"Computational Finance\",\n\t                \"Data Science\",\n\t                \"Econometrics\",\n\t                \"Quant\",\n\t                \"Quantitative Finance\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"IBKR API Development\",\n\t                \"Quant\",\n\t                \"Quant Development\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/ibkr-api-depth-mark\\\/\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/ibkr-api-depth-mark\\\/\",\n\t            \"name\": \"IBKR API - Depth of Market Subscriptions | Quant Blog\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/ibkr-api-depth-mark\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/ibkr-api-depth-mark\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.ibkrcampusdev.wpengine.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/12\\\/image-81.png\",\n\t            \"datePublished\": \"2019-12-24T14:07:00+00:00\",\n\t            \"dateModified\": \"2023-01-20T20:08:26+00:00\",\n\t            \"description\": \"Check out the parameter isSmartDepth, which faciliates retrieving depth of market (DOM) quotes via IBKR API\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/ibkr-api-depth-mark\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/ibkr-quant-news\\\/ibkr-api-depth-mark\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.ibkrcampusdev.wpengine.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/12\\\/image-81.png\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.ibkrcampusdev.wpengine.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2019\\\/12\\\/image-81.png\"\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\\\/8279da2435a7846d83a358a25c49b8f4\",\n\t            \"name\": \"IBKR Quant\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/ibkrquant\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"IBKR API &#8211; Depth of Market Subscriptions | IBKR Quant","description":"Check out the parameter isSmartDepth, which faciliates retrieving depth of market (DOM) quotes via IBKR API","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\/21411\/","og_locale":"en_US","og_type":"article","og_title":"IBKR API - Depth of Market Subscriptions | Quant Blog","og_description":"Check out the parameter isSmartDepth, which faciliates retrieving depth of market (DOM) quotes via IBKR API","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/ibkr-api-depth-mark\/","og_site_name":"IBKR Campus US","article_published_time":"2019-12-24T14:07:00+00:00","article_modified_time":"2023-01-20T20:08:26+00:00","og_image":[{"url":"https:\/\/www.ibkrcampusdev.wpengine.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/image-81.png","type":"","width":"","height":""}],"author":"IBKR Quant","twitter_card":"summary_large_image","twitter_misc":{"Written by":"IBKR Quant"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/ibkr-api-depth-mark\/#article","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/ibkr-api-depth-mark\/"},"author":{"name":"IBKR Quant","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/8279da2435a7846d83a358a25c49b8f4"},"headline":"IBKR API &#8211; Depth of Market Subscriptions","datePublished":"2019-12-24T14:07:00+00:00","dateModified":"2023-01-20T20:08:26+00:00","mainEntityOfPage":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/ibkr-api-depth-mark\/"},"wordCount":88,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/ibkr-api-depth-mark\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ibkrcampusdev.wpengine.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/image-81.png","keywords":["Algo Trading","Big Data","Computational Finance","Data Science","Econometrics","Quant","Quantitative Finance"],"articleSection":["IBKR API Development","Quant","Quant Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/ibkr-api-depth-mark\/","url":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/ibkr-api-depth-mark\/","name":"IBKR API - Depth of Market Subscriptions | Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/ibkr-api-depth-mark\/#primaryimage"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/ibkr-api-depth-mark\/#primaryimage"},"thumbnailUrl":"https:\/\/www.ibkrcampusdev.wpengine.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/image-81.png","datePublished":"2019-12-24T14:07:00+00:00","dateModified":"2023-01-20T20:08:26+00:00","description":"Check out the parameter isSmartDepth, which faciliates retrieving depth of market (DOM) quotes via IBKR API","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/ibkr-api-depth-mark\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/ibkr-quant-news\/ibkr-api-depth-mark\/#primaryimage","url":"https:\/\/www.ibkrcampusdev.wpengine.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/image-81.png","contentUrl":"https:\/\/www.ibkrcampusdev.wpengine.com\/campus\/wp-content\/uploads\/sites\/2\/2019\/12\/image-81.png"},{"@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\/8279da2435a7846d83a358a25c49b8f4","name":"IBKR Quant","url":"https:\/\/www.interactivebrokers.com\/campus\/author\/ibkrquant\/"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/21411","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\/90"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=21411"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/21411\/revisions"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=21411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=21411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=21411"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=21411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}