{"id":618,"date":"2026-11-08T16:25:10","date_gmt":"2026-11-08T08:25:10","guid":{"rendered":"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/"},"modified":"2026-11-08T16:55:17","modified_gmt":"2026-11-08T08:55:17","slug":"polymarket-trading-systems","status":"publish","type":"page","link":"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/","title":{"rendered":"Building Trading Systems for Polymarket"},"content":{"rendered":"<p>I\u2019m building automated trading bots for Polymarket. The work sits somewhere between market research and systems engineering: processing live data, deciding what to quote, and dealing with what actually happens after an order goes out.<\/p>\n<dl class=\"case-facts\">\n<div>\n<dt>My role<\/dt>\n<dd>Independent developer and researcher<\/dd>\n<\/div>\n<div>\n<dt>Stack<\/dt>\n<dd>Python, Rust, WebSockets, REST APIs<\/dd>\n<\/div>\n<div>\n<dt>Focus<\/dt>\n<dd>Market making and event-driven execution<\/dd>\n<\/div>\n<div>\n<dt>Status<\/dt>\n<dd>Ongoing personal project<\/dd>\n<\/div>\n<\/dl>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_82_2 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/#What_Im_building\" >What I\u2019m building<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/#From_data_to_an_order\" >From data to an order<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/#Why_the_fills_matter\" >Why the fills matter<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/#What_this_project_brings_together\" >What this project brings together<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/#Related_work\" >Related work<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"What_Im_building\"><\/span>What I\u2019m building<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>One part of the project is market making: placing quotes on both sides of a market and studying when those quotes get filled. Another is event-driven execution, looking at price dislocations around changes in the underlying market or event.<\/p>\n<p>Both depend on the same basic problem. A strategy needs a useful picture of the market before it can make a useful decision. That means handling order-book updates, market data, and external price feeds as events arrive.<\/p>\n<figure class=\"system-diagram\"><a href=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/themes\/philip-engineering\/assets\/trading-pipeline.svg\" aria-label=\"Open full-size system diagram\"><img decoding=\"async\" src=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/themes\/philip-engineering\/assets\/trading-pipeline.svg\" alt=\"Market events flow through a tick-based pipeline into strategy and order execution, with results feeding back into research.\" width=\"1200\" height=\"650\" loading=\"lazy\"><\/a><figcaption>A high-level view of the project. The arrows show the data and research flow.<\/figcaption><\/figure>\n<h2><span class=\"ez-toc-section\" id=\"From_data_to_an_order\"><\/span>From data to an order<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ol class=\"process\">\n<li><strong>Receive market events.<\/strong> WebSocket feeds provide order-book and price updates; REST APIs cover request\/response interactions with the market.<\/li>\n<li><strong>Process the updates.<\/strong> Tick-based pipelines turn incoming events into inputs for the strategy.<\/li>\n<li><strong>Make an execution decision.<\/strong> The bot evaluates quotes or an event-driven opportunity and interacts with the order API.<\/li>\n<li><strong>Study the result.<\/strong> Execution and market data feed back into the research, including analysis of adverse selection.<\/li>\n<\/ol>\n<h2><span class=\"ez-toc-section\" id=\"Why_the_fills_matter\"><\/span>Why the fills matter<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>For a market-making strategy, getting filled is only part of the story. A quote can look attractive when it is placed, then get hit just as the market moves against it. That is why adverse selection is a central part of this work.<\/p>\n<p>I\u2019m interested in the connection between the strategy and its execution: the data the bot saw, the decision it made, and what the market did afterwards. It gives me a much more useful way to examine a trading system than looking at an isolated signal.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"What_this_project_brings_together\"><\/span>What this project brings together<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>This is where I use Python and Rust alongside streaming APIs and market data. It combines the research side of my Data Science background with the operational questions I deal with at work: what state is the system in, what changed, and how do I explain its behaviour?<\/p>\n<p>The project is ongoing. This page is an engineering overview; it doesn\u2019t publish private strategy parameters, account details, or trading performance claims.<\/p>\n<h2><span class=\"ez-toc-section\" id=\"Related_work\"><\/span>Related work<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Before this, I built MT4\/MT5 FX trading bots. I\u2019ve also written about reconstructing a midnight scalping strategy from old trade logs and researching a regime-aware DCA strategy. Both write-ups are in the <a href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/writing\/\">writing archive<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Python, Rust, and the practical work between a market signal and an executed order.<\/p>\n","protected":false},"author":0,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-618","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Building Trading Systems for Polymarket | Philip Mou<\/title>\n<meta name=\"description\" content=\"Python, Rust, and the practical work between a market signal and an executed order.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Building Trading Systems for Polymarket | Philip Mou\" \/>\n<meta property=\"og:description\" content=\"Python, Rust, and the practical work between a market signal and an executed order.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/\" \/>\n<meta property=\"og:site_name\" content=\"Philip Mou\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-08T08:55:17+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/themes\/philip-engineering\/assets\/trading-pipeline.svg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/polymarket-trading-systems\\\/\",\"url\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/polymarket-trading-systems\\\/\",\"name\":\"Building Trading Systems for Polymarket | Philip Mou\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/polymarket-trading-systems\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/polymarket-trading-systems\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/themes\\/philip-engineering\\/assets\\/trading-pipeline.svg\",\"datePublished\":\"2026-11-08T08:25:10+00:00\",\"dateModified\":\"2026-11-08T08:55:17+00:00\",\"description\":\"Python, Rust, and the practical work between a market signal and an executed order.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/polymarket-trading-systems\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/polymarket-trading-systems\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/polymarket-trading-systems\\\/#primaryimage\",\"url\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/themes\\/philip-engineering\\/assets\\/trading-pipeline.svg\",\"contentUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/themes\\/philip-engineering\\/assets\\/trading-pipeline.svg\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/index.php\\\/polymarket-trading-systems\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9801\",\"item\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Building Trading Systems for Polymarket\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#website\",\"url\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/\",\"name\":\"Philip\u2019s University Data Science Journey\",\"description\":\"Software, AI &amp; Systems Engineering\",\"publisher\":{\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#\\\/schema\\\/person\\\/ef4f7cedd9b3bde11e126c4dbe1f8414\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\\\/\\\/philip.twinight.co\\\/portfolio\\\/#\\\/schema\\\/person\\\/ef4f7cedd9b3bde11e126c4dbe1f8414\",\"name\":\"Philip\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\",\"url\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\",\"contentUrl\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\",\"width\":16,\"height\":16,\"caption\":\"Philip\"},\"logo\":{\"@id\":\"https:\\/\\/philip.twinight.co\\/portfolio\\/wp-content\\/uploads\\/2024\\/03\\/favicon.png\"},\"description\":\"Data Scientist &amp; Systems Engineer. Graduated from City University of Hong Kong. Previously founded Twinight Limited as CTO, developing AI investment analytics and automated trading solutions. Currently working as a Test and Integration Engineer on a Vessel Traffic Service (VTS) system in the maritime industry since December 2024.\",\"sameAs\":[\"https:\\\/\\\/philip.twinight.co\\\/portfolio\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Building Trading Systems for Polymarket | Philip Mou","description":"Python, Rust, and the practical work between a market signal and an executed order.","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:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/","og_locale":"en_GB","og_type":"article","og_title":"Building Trading Systems for Polymarket | Philip Mou","og_description":"Python, Rust, and the practical work between a market signal and an executed order.","og_url":"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/","og_site_name":"Philip Mou","article_modified_time":"2026-11-08T08:55:17+00:00","og_image":[{"url":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/themes\/philip-engineering\/assets\/trading-pipeline.svg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/","url":"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/","name":"Building Trading Systems for Polymarket | Philip Mou","isPartOf":{"@id":"https:\/\/philip.twinight.co\/portfolio\/#website"},"primaryImageOfPage":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/#primaryimage"},"image":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/#primaryimage"},"thumbnailUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/themes\/philip-engineering\/assets\/trading-pipeline.svg","datePublished":"2026-11-08T08:25:10+00:00","dateModified":"2026-11-08T08:55:17+00:00","description":"Python, Rust, and the practical work between a market signal and an executed order.","breadcrumb":{"@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/#primaryimage","url":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/themes\/philip-engineering\/assets\/trading-pipeline.svg","contentUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/themes\/philip-engineering\/assets\/trading-pipeline.svg"},{"@type":"BreadcrumbList","@id":"https:\/\/philip.twinight.co\/portfolio\/index.php\/polymarket-trading-systems\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9801","item":"https:\/\/philip.twinight.co\/portfolio\/"},{"@type":"ListItem","position":2,"name":"Building Trading Systems for Polymarket"}]},{"@type":"WebSite","@id":"https:\/\/philip.twinight.co\/portfolio\/#website","url":"https:\/\/philip.twinight.co\/portfolio\/","name":"Philip\u2019s University Data Science Journey","description":"Software, AI &amp; Systems Engineering","publisher":{"@id":"https:\/\/philip.twinight.co\/portfolio\/#\/schema\/person\/ef4f7cedd9b3bde11e126c4dbe1f8414"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/philip.twinight.co\/portfolio\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":["Person","Organization"],"@id":"https:\/\/philip.twinight.co\/portfolio\/#\/schema\/person\/ef4f7cedd9b3bde11e126c4dbe1f8414","name":"Philip","image":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png","url":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png","contentUrl":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png","width":16,"height":16,"caption":"Philip"},"logo":{"@id":"https:\/\/mlcznkdztmb6.i.optimole.com\/w:auto\/h:auto\/q:mauto\/f:best\/ig:avif\/https:\/\/philip.twinight.co\/portfolio\/wp-content\/uploads\/2024\/03\/favicon.png"},"description":"Data Scientist &amp; Systems Engineer. Graduated from City University of Hong Kong. Previously founded Twinight Limited as CTO, developing AI investment analytics and automated trading solutions. Currently working as a Test and Integration Engineer on a Vessel Traffic Service (VTS) system in the maritime industry since December 2024.","sameAs":["https:\/\/philip.twinight.co\/portfolio"]}]}},"_links":{"self":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/pages\/618","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/types\/page"}],"replies":[{"embeddable":true,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/comments?post=618"}],"version-history":[{"count":3,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/pages\/618\/revisions"}],"predecessor-version":[{"id":662,"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/pages\/618\/revisions\/662"}],"wp:attachment":[{"href":"https:\/\/philip.twinight.co\/portfolio\/index.php\/wp-json\/wp\/v2\/media?parent=618"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}