{"id":3363,"date":"2019-05-14T11:31:55","date_gmt":"2019-05-14T15:31:55","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=3363"},"modified":"2023-01-20T15:09:36","modified_gmt":"2023-01-20T20:09:36","slug":"ibkr-python-api-what-is-the-tws-api","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/ibkr-python-api-what-is-the-tws-api\/","title":{"rendered":"IBKR Python API &#8211; What is the TWS API?"},"content":{"rendered":"\n<figure class=\"wp-block-embed-youtube wp-block-embed is-type-video is-provider-youtube wp-embed-aspect-16-9 wp-has-aspect-ratio\"><div class=\"wp-block-embed__wrapper\"><div class=\"videoWrapper\">\r\n            <div data-youtube-id=\"tKPEpjEXAQ8\" class=\"yt-video-blocked video-overlay lazyload\"\r\n                 style=\"background-image:inherit;\" data-bg-image=\"url(&#039;https:\/\/img.youtube.com\/vi\/tKPEpjEXAQ8\/hqdefault.jpg&#039;)\">\r\n                <div>\r\n                    <p class=\"text-large mb-4\">\r\n                        To watch this video you must accept functional cookies.\r\n                    <\/p>\r\n                    <button class=\"btn btn-primary w-50 manage-cookies\">\r\n                        Manage Cookies\r\n                    <\/button>\r\n                <\/div>\r\n            <\/div>\r\n        <\/div>\n<\/div><\/figure>\n\n\n\n<p>In this initial lesson we introduce Trader Workstation (TWS), IBKR&#8217;s flagship desktop trading application, and the TWS Application Programming Interface (API). An overview is provided of what the TWS API is, what it can provide, and where it can be found. We discuss the hardware and software requirements for this course on programming with the TWS API, with experienced programmers as the intended audience. We end by discussing, and answering, the most frequently-asked questions about the API. For the entire course &#8211; go to Traders&#8217; Academy:   <a href=\"https:\/\/www.ibkr.com\/ibta\">https:\/\/www.ibkr.com\/ibta<\/a>&nbsp;&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this initial lesson we introduce Trader Workstation (TWS), IBKR&#8217;s flagship desktop trading application, and the TWS Application Programming Interface (API). An overview is provided of what the TWS API is, what it can provide, and where it can be found. <\/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,343,349,338,341,352,344],"tags":[575,595],"contributors-categories":[13576],"class_list":{"0":"post-3363","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-api-development","7":"category-programing-languages","8":"category-python-development","9":"category-ibkr-quant-news","10":"category-quant-development","11":"category-quant-north-america","12":"category-quant-regions","13":"tag-ibkr-api","14":"tag-python","15":"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 Python API &#8211; What is the TWS API? | IBKR Quant<\/title>\n<meta name=\"description\" content=\"IBKR Python API for Algo Trading. The TWS API is an open source interface to IBKR&#039;s flagship desktop trading application,\" \/>\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\/3363\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"IBKR Python API - What is the TWS API? | IBKR Campus US\" \/>\n<meta property=\"og:description\" content=\"IBKR Python API for Algo Trading. The TWS API is an open source interface to IBKR&#039;s flagship desktop trading application,\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/ibkr-python-api-what-is-the-tws-api\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2019-05-14T15:31:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-20T20:09:36+00:00\" \/>\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:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/ibkr-python-api-what-is-the-tws-api\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/ibkr-python-api-what-is-the-tws-api\\\/\"\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 Python API &#8211; What is the TWS API?\",\n\t            \"datePublished\": \"2019-05-14T15:31:55+00:00\",\n\t            \"dateModified\": \"2023-01-20T20:09:36+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/ibkr-python-api-what-is-the-tws-api\\\/\"\n\t            },\n\t            \"wordCount\": 103,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"keywords\": [\n\t                \"IBKR API\",\n\t                \"Python\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"IBKR API Development\",\n\t                \"Programming Languages\",\n\t                \"Python Development\",\n\t                \"Quant\",\n\t                \"Quant Development\",\n\t                \"Quant North America\",\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\\\/ibkr-python-api-what-is-the-tws-api\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/ibkr-python-api-what-is-the-tws-api\\\/\",\n\t            \"name\": \"IBKR Python API - What is the TWS API? | IBKR Campus US\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"datePublished\": \"2019-05-14T15:31:55+00:00\",\n\t            \"dateModified\": \"2023-01-20T20:09:36+00:00\",\n\t            \"description\": \"IBKR Python API for Algo Trading. The TWS API is an open source interface to IBKR's flagship desktop trading application,\",\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\\\/ibkr-python-api-what-is-the-tws-api\\\/\"\n\t                    ]\n\t                }\n\t            ]\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 Python API &#8211; What is the TWS API? | IBKR Quant","description":"IBKR Python API for Algo Trading. The TWS API is an open source interface to IBKR's flagship desktop trading application,","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\/3363\/","og_locale":"en_US","og_type":"article","og_title":"IBKR Python API - What is the TWS API? | IBKR Campus US","og_description":"IBKR Python API for Algo Trading. The TWS API is an open source interface to IBKR's flagship desktop trading application,","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/ibkr-python-api-what-is-the-tws-api\/","og_site_name":"IBKR Campus US","article_published_time":"2019-05-14T15:31:55+00:00","article_modified_time":"2023-01-20T20:09:36+00:00","author":"IBKR Quant","twitter_card":"summary_large_image","twitter_misc":{"Written by":"IBKR Quant"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/ibkr-python-api-what-is-the-tws-api\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/ibkr-python-api-what-is-the-tws-api\/"},"author":{"name":"IBKR Quant","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/8279da2435a7846d83a358a25c49b8f4"},"headline":"IBKR Python API &#8211; What is the TWS API?","datePublished":"2019-05-14T15:31:55+00:00","dateModified":"2023-01-20T20:09:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/ibkr-python-api-what-is-the-tws-api\/"},"wordCount":103,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"keywords":["IBKR API","Python"],"articleSection":["IBKR API Development","Programming Languages","Python Development","Quant","Quant Development","Quant North America","Quant Regions"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/ibkr-python-api-what-is-the-tws-api\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/ibkr-python-api-what-is-the-tws-api\/","name":"IBKR Python API - What is the TWS API? | IBKR Campus US","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"datePublished":"2019-05-14T15:31:55+00:00","dateModified":"2023-01-20T20:09:36+00:00","description":"IBKR Python API for Algo Trading. The TWS API is an open source interface to IBKR's flagship desktop trading application,","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/ibkr-python-api-what-is-the-tws-api\/"]}]},{"@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\/3363","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=3363"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/3363\/revisions"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=3363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=3363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=3363"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=3363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}