{"id":3080,"date":"2026-07-01T10:00:00","date_gmt":"2026-07-01T10:00:00","guid":{"rendered":"https:\/\/oddspapi.io\/blog\/?p=3080"},"modified":"2026-06-21T15:29:41","modified_gmt":"2026-06-21T15:29:41","slug":"polymarket-odds-converter-python","status":"publish","type":"post","link":"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/","title":{"rendered":"Odds Converter in Python: Decimal, American, Fractional &#038; Polymarket Shares"},"content":{"rendered":"<p>Every odds tool eventually hits the same wall: the data comes in one format and your model wants another. Pinnacle ships decimal, US books quote American, the UK still prints fractional, and prediction markets like Polymarket price everything as a <strong>share price between 0 and 1<\/strong>. Before you can compare a single line, you have to normalise all of it.<\/p>\n<p>This guide gives you a tested, dependency-free Python module that converts between <strong>decimal, American, fractional, implied probability, and Polymarket share prices<\/strong> in both directions. Then it shows you the shortcut: a free odds API that already ships every format for you, so the only converter you really need is the one for prediction-market shares.<\/p>\n<h2>Why Hand-Rolled Converters Bite You<\/h2>\n<p>The math looks trivial until you hit the edge cases that quietly corrupt a betting model:<\/p>\n<ul>\n<li><strong>The +100 \/ 2.00 boundary.<\/strong> American odds use a different formula above and below even money. Get the branch wrong and every favourite in your dataset is mispriced.<\/li>\n<li><strong>Fractional rounding.<\/strong> 1.493 decimal is <em>not<\/em> exactly 35\/71, it is an approximation. Naive code prints <code>493\/1000<\/code> and looks amateur.<\/li>\n<li><strong>Share-price inversion.<\/strong> Polymarket and Kalshi quote a 0&ndash;1 probability, not odds. A YES share at 0.67 is decimal 1.493, but only if you remember to invert and not just multiply by 100.<\/li>\n<li><strong>Vig contamination.<\/strong> Implied probability straight off a single book includes the bookmaker margin. Treat it as a true probability and your expected-value math is wrong from the first line.<\/li>\n<\/ul>\n<p>None of this is hard. It is just easy to get subtly wrong, and a subtle error in a converter poisons everything downstream. Below is a module that handles all of it, validated against live data from the <a href=\"https:\/\/oddspapi.io\/blog\/free-odds-api-350-bookmakers\/\">OddsPapi feed<\/a>.<\/p>\n<h2>The Old Way vs The OddsPapi Way<\/h2>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>Task<\/th>\n<th>Old Way (DIY)<\/th>\n<th>OddsPapi<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Decimal odds<\/td>\n<td>Write + test the formula<\/td>\n<td><code>price<\/code> field, ready to use<\/td>\n<\/tr>\n<tr>\n<td>American odds<\/td>\n<td>Branch on the 2.00 boundary<\/td>\n<td><code>priceAmerican<\/code> string<\/td>\n<\/tr>\n<tr>\n<td>Fractional odds<\/td>\n<td>Continued-fraction approximation<\/td>\n<td><code>priceFractional<\/code> string<\/td>\n<\/tr>\n<tr>\n<td>Polymarket share price<\/td>\n<td>Scrape the CLOB, invert yourself<\/td>\n<td><code>price<\/code> already in decimal odds<\/td>\n<\/tr>\n<tr>\n<td>Coverage<\/td>\n<td>One book at a time<\/td>\n<td>350+ books, sharps + exchanges<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p>OddsPapi pre-converts every price into decimal, American, and fractional on the way out of the feed. The headline trick: it also normalises Polymarket and Kalshi <strong>share prices into decimal odds<\/strong> for you, which is the one conversion most developers get wrong. More on that below.<\/p>\n<h2>The Converter Module (Pure Python, No Dependencies)<\/h2>\n<p>Drop this into <code>odds_convert.py<\/code>. It uses only the standard library (<code>fractions<\/code> for clean fractional output). Every function round-trips with the others.<\/p>\n<pre class=\"wp-block-code\"><code>from fractions import Fraction\n\n\ndef decimal_to_american(d: float) -> str:\n    \"\"\"Decimal odds -> American moneyline string (e.g. '-203', '+186').\"\"\"\n    if d &lt;= 1:\n        raise ValueError(\"decimal odds must be &gt; 1\")\n    if d &gt;= 2:\n        return f\"+{round((d - 1) * 100)}\"\n    return f\"{round(-100 \/ (d - 1))}\"\n\n\ndef american_to_decimal(a) -> float:\n    \"\"\"American moneyline -> decimal odds.\"\"\"\n    a = int(a)\n    if a &gt; 0:\n        return round(1 + a \/ 100, 4)\n    return round(1 + 100 \/ abs(a), 4)\n\n\ndef decimal_to_fractional(d: float, max_den: int = 100) -> str:\n    \"\"\"Decimal odds -> reduced fractional string (e.g. '13\/7').\"\"\"\n    frac = Fraction(d - 1).limit_denominator(max_den)\n    return f\"{frac.numerator}\/{frac.denominator}\"\n\n\ndef fractional_to_decimal(frac: str) -> float:\n    \"\"\"Fractional string -> decimal odds.\"\"\"\n    num, den = frac.split(\"\/\")\n    return round(1 + int(num) \/ int(den), 4)\n\n\ndef decimal_to_probability(d: float) -> float:\n    \"\"\"Decimal odds -> implied probability (%). NOTE: includes the vig.\"\"\"\n    return round(100 \/ d, 2)\n\n\ndef probability_to_decimal(p: float) -> float:\n    \"\"\"Implied probability (%) -> decimal odds.\"\"\"\n    return round(100 \/ p, 4)\n\n\ndef share_to_decimal(cents: float) -> float:\n    \"\"\"Prediction-market share price (0-1) -> decimal odds.\"\"\"\n    if not 0 &lt; cents &lt; 1:\n        raise ValueError(\"share price must be between 0 and 1\")\n    return round(1 \/ cents, 3)\n\n\ndef decimal_to_share(d: float) -> float:\n    \"\"\"Decimal odds -> share price (0-1).\"\"\"\n    return round(1 \/ d, 4)\n\n\nif __name__ == \"__main__\":\n    for d in (1.493, 2.857, 14.286):\n        print(d, decimal_to_american(d), decimal_to_fractional(d),\n              f\"{decimal_to_probability(d)}%\")\n    print(\"share 0.67 ->\", share_to_decimal(0.67), \"decimal\")\n<\/code><\/pre>\n<p>Running it prints the exact values OddsPapi returns for a live fixture (verified below):<\/p>\n<pre class=\"wp-block-code\"><code>1.493 -203 35\/71 66.98%\n2.857 +186 13\/7 35.0%\n14.286 +1329 93\/7 7.0%\nshare 0.67 -> 1.493 decimal\n<\/code><\/pre>\n<h2>Verifying Against Live Data<\/h2>\n<p>Here is the part most &#8220;odds converter&#8221; tutorials skip: testing the math against a real bookmaker feed. We pulled a live Brazilian Serie B fixture (Ava&iacute; vs Cuiab&aacute;) from the OddsPapi <code>\/v4\/odds<\/code> endpoint, with Polymarket priced on the Full Time Result (1X2) market. Auth is a query parameter, never a header.<\/p>\n<pre class=\"wp-block-code\"><code>import requests\n\nAPI_KEY = \"YOUR_API_KEY\"\nBASE = \"https:\/\/api.oddspapi.io\/v4\"\n\nparams = {\n    \"apiKey\": API_KEY,\n    \"fixtureId\": \"id1000039068822998\",\n    \"bookmakers\": \"polymarket,pinnacle,draftkings\",\n}\ndata = requests.get(f\"{BASE}\/odds\", params=params).json()\n\n# Full Time Result is market 101; outcomes 101=Home, 102=Draw, 103=Away\npm = data[\"bookmakerOdds\"][\"polymarket\"][\"markets\"][\"101\"][\"outcomes\"]\nfor outcome_id, outcome in pm.items():\n    px = outcome[\"players\"][\"0\"]\n    print(outcome_id, px[\"price\"], px[\"priceAmerican\"], px[\"priceFractional\"])\n<\/code><\/pre>\n<p>Output, captured live on Jun 21, 2026:<\/p>\n<pre class=\"wp-block-code\"><code>101 1.493 -203 35\/71      # Avai (home)\n102 2.857 +186  13\/7      # Draw\n103 14.286 +1329 93\/7     # Cuiaba (away)\n<\/code><\/pre>\n<p>The feed hands you <code>price<\/code> (decimal), <code>priceAmerican<\/code>, and <code>priceFractional<\/code> in one shot. Note the American and fractional fields are <strong>strings<\/strong>, so cast before you do math on them. Your converter and the feed agree to the cent, which is exactly what you want to confirm before trusting either.<\/p>\n<h2>The Conversion Everyone Gets Wrong: Polymarket Shares<\/h2>\n<p>Prediction markets are the reason this post leads with Polymarket. A market like Polymarket or Kalshi does not quote odds at all. It quotes a <strong>share price between 0 and 1<\/strong> that reads directly as an implied probability. A YES share trading at 0.67 means the market prices that outcome at 67%, which is decimal odds of <code>1 \/ 0.67 = 1.493<\/code>.<\/p>\n<p>OddsPapi exposes the raw share price inside <code>exchangeMeta<\/code> as the <code>cents<\/code> field, alongside the depth-of-book ladder. Here is the back side of that same Polymarket outcome, straight from the feed:<\/p>\n<pre class=\"wp-block-code\"><code>back = data[\"bookmakerOdds\"][\"polymarket\"][\"markets\"][\"101\"] \\\n           [\"outcomes\"][\"101\"][\"players\"][\"0\"][\"exchangeMeta\"][\"back\"]\n\nfor level in back:\n    print(f\"share {level['cents']}  ->  decimal {level['price']}  \"\n          f\"(size {level['size']})\")\n<\/code><\/pre>\n<pre class=\"wp-block-code\"><code>share 0.67  ->  decimal 1.493  (size 60.6)\nshare 0.72  ->  decimal 1.389  (size 314.0)\nshare 0.78  ->  decimal 1.282  (size 55.0)\n<\/code><\/pre>\n<p>Every level confirms the rule: <code>decimal = 1 \/ share<\/code>. The feed has already done the inversion in the <code>price<\/code> field, so unlike scraping the Polymarket CLOB directly, <strong>you never have to convert share prices yourself<\/strong>. If you do pull raw shares from elsewhere, <code>share_to_decimal()<\/code> above is all you need. For the full Gamma vs CLOB breakdown, see our <a href=\"https:\/\/oddspapi.io\/blog\/polymarket-api-gamma-clob-json-format\/\">Polymarket API deep dive<\/a> and the <a href=\"https:\/\/oddspapi.io\/blog\/kalshi-vs-polymarket-api\/\">Kalshi vs Polymarket comparison<\/a>.<\/p>\n<h2>Stripping the Vig: From Implied Probability to True Odds<\/h2>\n<p>One trap worth calling out: <code>decimal_to_probability()<\/code> gives you the <em>implied<\/em> probability, which still contains the bookmaker margin. Add the three 1X2 probabilities from any single book and they sum to more than 100% &mdash; that overround is the vig. To get a fair probability you must de-vig. The simplest two-outcome version normalises the implied probabilities so they sum to 1:<\/p>\n<pre class=\"wp-block-code\"><code>def devig_proportional(decimals: list[float]) -> list[float]:\n    \"\"\"Normalise implied probabilities to remove the overround.\"\"\"\n    implied = [1 \/ d for d in decimals]\n    total = sum(implied)\n    return [round(p \/ total, 4) for p in implied]  # fair probabilities\n\n\n# Three-way 1X2 example\nfair = devig_proportional([1.493, 2.857, 14.286])\nprint(fair)  # -> [0.6539, 0.3417, 0.0683]  (sums to 1.0)\n<\/code><\/pre>\n<p>Now those probabilities are usable for expected-value math. For a sharper benchmark across hundreds of books, see our <a href=\"https:\/\/oddspapi.io\/blog\/consensus-odds-fair-odds-calculator-python\/\">consensus odds calculator<\/a> and the <a href=\"https:\/\/oddspapi.io\/blog\/vig-calculator-python-sportsbook-margin\/\">vig calculator<\/a>, which measures margin across 350+ books instead of trusting one.<\/p>\n<h2>Why Let the Feed Do It<\/h2>\n<p>A converter module is twenty lines and worth keeping for offline data. But for live work, the feed that already ships every format is the bigger win:<\/p>\n<ul>\n<li><strong>350+ bookmakers<\/strong> &mdash; sharps (Pinnacle, SBOBet), US books (DraftKings, FanDuel), and exchanges (Betfair, Polymarket, Kalshi) all normalised to the same shape.<\/li>\n<li><strong>Free historical odds<\/strong> &mdash; pull the full price history of any fixture on the free tier, already converted, for backtesting.<\/li>\n<li><strong>Prediction markets in decimal<\/strong> &mdash; Polymarket and Kalshi share prices inverted to odds for you, so cross-book comparison just works.<\/li>\n<\/ul>\n<p>You stop maintaining converters and start shipping the actual analysis. Pair this with <a href=\"https:\/\/oddspapi.io\/blog\/line-shopping-python-best-odds\/\">line shopping across 350+ books<\/a> to see the formats in action.<\/p>\n<h2>Frequently Asked Questions<\/h2>\n<h3>How do I convert American odds to decimal in Python?<\/h3>\n<p>For positive American odds, decimal = 1 + (american \/ 100). For negative, decimal = 1 + (100 \/ abs(american)). So +186 becomes 2.86 and -203 becomes 1.493. The <code>american_to_decimal()<\/code> function above handles both branches.<\/p>\n<h3>How do I convert a Polymarket share price to odds?<\/h3>\n<p>A Polymarket share price is a probability between 0 and 1. Decimal odds = 1 \/ share price, so a 0.67 share is 1.493 in decimal. OddsPapi already returns Polymarket prices as decimal odds in the <code>price<\/code> field, so no conversion is needed when you use the API.<\/p>\n<h3>What is the difference between implied probability and true probability?<\/h3>\n<p>Implied probability (1 \/ decimal odds) includes the bookmaker&#8217;s margin, so a book&#8217;s outcomes sum to more than 100%. True (fair) probability removes that overround by normalising the implied probabilities to sum to 1, as in the <code>devig_proportional()<\/code> example.<\/p>\n<h3>Does OddsPapi convert odds formats for me?<\/h3>\n<p>Yes. Every price in the OddsPapi feed ships as decimal (<code>price<\/code>), American (<code>priceAmerican<\/code>), and fractional (<code>priceFractional<\/code>) simultaneously, across 350+ bookmakers. The American and fractional fields are strings, so cast them before doing math.<\/p>\n<h3>Is fractional odds conversion exact?<\/h3>\n<p>No, fractional odds are an approximation of the decimal price using the nearest small-denominator fraction (1.493 becomes 35\/71, not 493\/1000). Use <code>Fraction(d - 1).limit_denominator(100)<\/code>, or just take the canonical <code>priceFractional<\/code> string the feed provides.<\/p>\n<h2>Start Converting Less, Shipping More<\/h2>\n<p>The converter module above is yours to keep. But the real time-saver is a feed that hands you every format, including prediction-market shares as decimal odds, across 350+ books. <a href=\"https:\/\/oddspapi.io\/\">Get your free OddsPapi API key<\/a> and stop writing converters.<\/p>\n<p><script type=\"application\/ld+json\">\n{\n  \"@context\": \"https:\/\/schema.org\",\n  \"@type\": \"FAQPage\",\n  \"mainEntity\": [\n    {\"@type\": \"Question\", \"name\": \"How do I convert American odds to decimal in Python?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"For positive American odds, decimal = 1 + (american \/ 100). For negative, decimal = 1 + (100 \/ abs(american)). So +186 becomes 2.86 and -203 becomes 1.493.\"}},\n    {\"@type\": \"Question\", \"name\": \"How do I convert a Polymarket share price to odds?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"A Polymarket share price is a probability between 0 and 1. Decimal odds = 1 \/ share price, so a 0.67 share is 1.493 decimal. OddsPapi already returns Polymarket prices as decimal odds, so no conversion is needed.\"}},\n    {\"@type\": \"Question\", \"name\": \"What is the difference between implied probability and true probability?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Implied probability (1 \/ decimal odds) includes the bookmaker margin, so outcomes sum to more than 100%. True probability removes that overround by normalising the implied probabilities to sum to 1.\"}},\n    {\"@type\": \"Question\", \"name\": \"Does OddsPapi convert odds formats for me?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Yes. Every price in the OddsPapi feed ships as decimal, American, and fractional simultaneously across 350+ bookmakers. The American and fractional fields are strings, so cast them before doing math.\"}},\n    {\"@type\": \"Question\", \"name\": \"Is fractional odds conversion exact?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"No, fractional odds approximate the decimal price using the nearest small-denominator fraction (1.493 becomes 35\/71). Use Fraction(d - 1).limit_denominator(100), or take the canonical priceFractional string the feed provides.\"}}\n  ]\n}\n<\/script><\/p>\n<p><!--\nFocus Keyphrase: odds converter python\nSEO Title: Odds Converter in Python: Decimal, American, Fractional & Polymarket Shares\nMeta Description: Convert betting odds between decimal, American, fractional & Polymarket share prices in Python. Plus a free API that pre-converts every format across 350+ books.\nSlug: polymarket-odds-converter-python\n--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Convert betting odds between decimal, American, fractional &#038; Polymarket share prices in Python. Plus a free API that pre-converts every format across 350+ books.<\/p>\n","protected":false},"author":2,"featured_media":3081,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[8,9,14,11,10],"class_list":["post-3080","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to-guides","tag-free-api","tag-odds-api","tag-polymarket","tag-python","tag-sports-betting-api"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Odds Converter in Python: Decimal, American, Fractional &amp; Polymarket Shares | OddsPapi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Odds Converter in Python: Decimal, American, Fractional &amp; Polymarket Shares | OddsPapi Blog\" \/>\n<meta property=\"og:description\" content=\"Convert betting odds between decimal, American, fractional &amp; Polymarket share prices in Python. Plus a free API that pre-converts every format across 350+ books.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/\" \/>\n<meta property=\"og:site_name\" content=\"OddsPapi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-07-01T10:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/oddspapi.io\/blog\/wp-content\/uploads\/2026\/06\/polymarket-odds-converter-python-scaled.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"2560\" \/>\n\t<meta property=\"og:image:height\" content=\"1429\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"Odds API Writer\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/oddspapi.io\/logo-v2.webp\" \/>\n<meta name=\"twitter:creator\" content=\"@oddspapiapi\" \/>\n<meta name=\"twitter:site\" content=\"@oddspapiapi\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Odds API Writer\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/\"},\"author\":{\"name\":\"Odds API Writer\",\"@id\":\"https:\/\/oddspapi.io\/blog\/#\/schema\/person\/b6f21e649c4f556f0a95c23a0f1efa13\"},\"headline\":\"Odds Converter in Python: Decimal, American, Fractional &#038; Polymarket Shares\",\"datePublished\":\"2026-07-01T10:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/\"},\"wordCount\":1135,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/oddspapi.io\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/oddspapi.io\/blog\/wp-content\/uploads\/2026\/06\/polymarket-odds-converter-python-scaled.webp\",\"keywords\":[\"Free API\",\"Odds API\",\"Polymarket\",\"Python\",\"Sports Betting API\"],\"articleSection\":[\"How To Guides\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/\",\"url\":\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/\",\"name\":\"Odds Converter in Python: Decimal, American, Fractional & Polymarket Shares | OddsPapi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/oddspapi.io\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/oddspapi.io\/blog\/wp-content\/uploads\/2026\/06\/polymarket-odds-converter-python-scaled.webp\",\"datePublished\":\"2026-07-01T10:00:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#primaryimage\",\"url\":\"https:\/\/oddspapi.io\/blog\/wp-content\/uploads\/2026\/06\/polymarket-odds-converter-python-scaled.webp\",\"contentUrl\":\"https:\/\/oddspapi.io\/blog\/wp-content\/uploads\/2026\/06\/polymarket-odds-converter-python-scaled.webp\",\"width\":2560,\"height\":1429,\"caption\":\"Odds Converter in Python - OddsPapi API Blog\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/oddspapi.io\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Odds Converter in Python: Decimal, American, Fractional &#038; Polymarket Shares\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/oddspapi.io\/blog\/#website\",\"url\":\"https:\/\/oddspapi.io\/blog\/\",\"name\":\"OddsPapi\",\"description\":\"Sports Odds API Tutorials &amp; Guides\",\"publisher\":{\"@id\":\"https:\/\/oddspapi.io\/blog\/#organization\"},\"alternateName\":\"Odds Papi\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/oddspapi.io\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/oddspapi.io\/blog\/#organization\",\"name\":\"OddsPapi\",\"url\":\"https:\/\/oddspapi.io\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/oddspapi.io\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/oddspapi.io\/blog\/wp-content\/uploads\/2025\/11\/oddspapi.png\",\"contentUrl\":\"https:\/\/oddspapi.io\/blog\/wp-content\/uploads\/2025\/11\/oddspapi.png\",\"width\":135,\"height\":135,\"caption\":\"OddsPapi\"},\"image\":{\"@id\":\"https:\/\/oddspapi.io\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/oddspapiapi\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/oddspapi.io\/blog\/#\/schema\/person\/b6f21e649c4f556f0a95c23a0f1efa13\",\"name\":\"Odds API Writer\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/oddspapi.io\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/33b204f24af3d02e35b25ae730c0536121ca6a783fdb196e7611c9e49fcd13eb?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/33b204f24af3d02e35b25ae730c0536121ca6a783fdb196e7611c9e49fcd13eb?s=96&d=mm&r=g\",\"caption\":\"Odds API Writer\"},\"url\":\"https:\/\/oddspapi.io\/blog\/author\/andy-lavelle\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Odds Converter in Python: Decimal, American, Fractional & Polymarket Shares | OddsPapi Blog","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:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/","og_locale":"en_US","og_type":"article","og_title":"Odds Converter in Python: Decimal, American, Fractional & Polymarket Shares | OddsPapi Blog","og_description":"Convert betting odds between decimal, American, fractional & Polymarket share prices in Python. Plus a free API that pre-converts every format across 350+ books.","og_url":"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/","og_site_name":"OddsPapi Blog","article_published_time":"2026-07-01T10:00:00+00:00","og_image":[{"width":2560,"height":1429,"url":"https:\/\/oddspapi.io\/blog\/wp-content\/uploads\/2026\/06\/polymarket-odds-converter-python-scaled.webp","type":"image\/webp"}],"author":"Odds API Writer","twitter_card":"summary_large_image","twitter_image":"https:\/\/oddspapi.io\/logo-v2.webp","twitter_creator":"@oddspapiapi","twitter_site":"@oddspapiapi","twitter_misc":{"Written by":"Odds API Writer","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#article","isPartOf":{"@id":"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/"},"author":{"name":"Odds API Writer","@id":"https:\/\/oddspapi.io\/blog\/#\/schema\/person\/b6f21e649c4f556f0a95c23a0f1efa13"},"headline":"Odds Converter in Python: Decimal, American, Fractional &#038; Polymarket Shares","datePublished":"2026-07-01T10:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/"},"wordCount":1135,"commentCount":0,"publisher":{"@id":"https:\/\/oddspapi.io\/blog\/#organization"},"image":{"@id":"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#primaryimage"},"thumbnailUrl":"https:\/\/oddspapi.io\/blog\/wp-content\/uploads\/2026\/06\/polymarket-odds-converter-python-scaled.webp","keywords":["Free API","Odds API","Polymarket","Python","Sports Betting API"],"articleSection":["How To Guides"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/","url":"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/","name":"Odds Converter in Python: Decimal, American, Fractional & Polymarket Shares | OddsPapi Blog","isPartOf":{"@id":"https:\/\/oddspapi.io\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#primaryimage"},"image":{"@id":"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#primaryimage"},"thumbnailUrl":"https:\/\/oddspapi.io\/blog\/wp-content\/uploads\/2026\/06\/polymarket-odds-converter-python-scaled.webp","datePublished":"2026-07-01T10:00:00+00:00","breadcrumb":{"@id":"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#primaryimage","url":"https:\/\/oddspapi.io\/blog\/wp-content\/uploads\/2026\/06\/polymarket-odds-converter-python-scaled.webp","contentUrl":"https:\/\/oddspapi.io\/blog\/wp-content\/uploads\/2026\/06\/polymarket-odds-converter-python-scaled.webp","width":2560,"height":1429,"caption":"Odds Converter in Python - OddsPapi API Blog"},{"@type":"BreadcrumbList","@id":"https:\/\/oddspapi.io\/blog\/polymarket-odds-converter-python\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/oddspapi.io\/blog\/"},{"@type":"ListItem","position":2,"name":"Odds Converter in Python: Decimal, American, Fractional &#038; Polymarket Shares"}]},{"@type":"WebSite","@id":"https:\/\/oddspapi.io\/blog\/#website","url":"https:\/\/oddspapi.io\/blog\/","name":"OddsPapi","description":"Sports Odds API Tutorials &amp; Guides","publisher":{"@id":"https:\/\/oddspapi.io\/blog\/#organization"},"alternateName":"Odds Papi","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/oddspapi.io\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/oddspapi.io\/blog\/#organization","name":"OddsPapi","url":"https:\/\/oddspapi.io\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/oddspapi.io\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/oddspapi.io\/blog\/wp-content\/uploads\/2025\/11\/oddspapi.png","contentUrl":"https:\/\/oddspapi.io\/blog\/wp-content\/uploads\/2025\/11\/oddspapi.png","width":135,"height":135,"caption":"OddsPapi"},"image":{"@id":"https:\/\/oddspapi.io\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/oddspapiapi"]},{"@type":"Person","@id":"https:\/\/oddspapi.io\/blog\/#\/schema\/person\/b6f21e649c4f556f0a95c23a0f1efa13","name":"Odds API Writer","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/oddspapi.io\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/33b204f24af3d02e35b25ae730c0536121ca6a783fdb196e7611c9e49fcd13eb?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/33b204f24af3d02e35b25ae730c0536121ca6a783fdb196e7611c9e49fcd13eb?s=96&d=mm&r=g","caption":"Odds API Writer"},"url":"https:\/\/oddspapi.io\/blog\/author\/andy-lavelle\/"}]}},"_links":{"self":[{"href":"https:\/\/oddspapi.io\/blog\/wp-json\/wp\/v2\/posts\/3080","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/oddspapi.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/oddspapi.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/oddspapi.io\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/oddspapi.io\/blog\/wp-json\/wp\/v2\/comments?post=3080"}],"version-history":[{"count":1,"href":"https:\/\/oddspapi.io\/blog\/wp-json\/wp\/v2\/posts\/3080\/revisions"}],"predecessor-version":[{"id":3082,"href":"https:\/\/oddspapi.io\/blog\/wp-json\/wp\/v2\/posts\/3080\/revisions\/3082"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/oddspapi.io\/blog\/wp-json\/wp\/v2\/media\/3081"}],"wp:attachment":[{"href":"https:\/\/oddspapi.io\/blog\/wp-json\/wp\/v2\/media?parent=3080"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/oddspapi.io\/blog\/wp-json\/wp\/v2\/categories?post=3080"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/oddspapi.io\/blog\/wp-json\/wp\/v2\/tags?post=3080"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}