| <!doctype html> |
| <html lang="en"> |
| <head> |
| <meta charset="utf-8"> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <title>Order status — Polymarket microstructure data</title> |
| <style> |
| |
| |
| :root { |
| |
| |
| |
| --paper: #f7f6f3; |
| --paper-sunk: #edebe6; |
| --ink: #14161a; |
| --ink-2: #6a6e77; |
| --ink-3: #8a8f96; |
| --rule: #dcd8d1; |
| --rule-strong: #b9b4ab; |
| --bid: #0a6f63; |
| --ask: #a33f34; |
| --flag: #94670f; |
| |
| |
| |
| --serif: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, |
| "Liberation Mono", "Courier New", monospace; |
| --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace; |
| |
| --measure: 64ch; |
| --page: 960px; |
| } |
| |
| @media (prefers-color-scheme: dark) { |
| :root { |
| --paper: #0e0f12; |
| --paper-sunk: #16181d; |
| --ink: #e8e6e1; |
| --ink-2: #888d96; |
| --ink-3: #6d727a; |
| --rule: #262a31; |
| --rule-strong: #3c414a; |
| --bid: #3ad4bd; |
| --ask: #d98276; |
| --flag: #d9a94e; |
| } |
| } |
| |
| :root[data-theme="dark"] { |
| --paper:#0e0f12; --paper-sunk:#16181d; --ink:#e8e6e1; --ink-2:#888d96; |
| --ink-3:#6d727a; --rule:#262a31; --rule-strong:#3c414a; |
| --bid:#3ad4bd; --ask:#d98276; --flag:#d9a94e; |
| } |
| :root[data-theme="light"] { |
| --paper:#f7f6f3; --paper-sunk:#edebe6; --ink:#14161a; --ink-2:#6a6e77; |
| --ink-3:#8a8f96; --rule:#dcd8d1; --rule-strong:#b9b4ab; |
| --bid:#0a6f63; --ask:#a33f34; --flag:#94670f; |
| } |
| |
| * { box-sizing: border-box; } |
| |
| body { |
| margin: 0; |
| background: var(--paper); |
| color: var(--ink); |
| font-family: var(--serif); |
| font-size: 17px; |
| line-height: 1.6; |
| -webkit-font-smoothing: antialiased; |
| text-rendering: optimizeLegibility; |
| } |
| |
| .page { max-width: var(--page); margin: 0 auto; padding: 0 28px; } |
| |
| p { max-width: var(--measure); margin: 0 0 1.1em; } |
| p:last-child { margin-bottom: 0; } |
| |
| a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 2px; } |
| |
| .label { |
| font-family: var(--mono); |
| font-size: 11px; |
| letter-spacing: 0.13em; |
| text-transform: uppercase; |
| color: var(--ink-3); |
| } |
| |
| .masthead { |
| display: flex; |
| justify-content: space-between; |
| align-items: baseline; |
| gap: 20px; |
| flex-wrap: wrap; |
| padding: 22px 0 20px; |
| border-bottom: 1px solid var(--rule-strong); |
| } |
| |
| .masthead .mark { |
| font-family: var(--mono); |
| font-size: 12px; |
| letter-spacing: 0.16em; |
| text-transform: uppercase; |
| } |
| |
| .masthead nav a { text-decoration: none; } |
| .masthead nav a:hover { text-decoration: underline; } |
| |
| .opener { padding: 76px 0 60px; } |
| |
| h1 { |
| font-family: var(--serif); |
| font-weight: 400; |
| font-size: clamp(30px, 4.6vw, 44px); |
| line-height: 1.12; |
| letter-spacing: -0.015em; |
| text-wrap: balance; |
| margin: 0 0 20px; |
| max-width: 20ch; |
| } |
| |
| h2 { |
| font-family: var(--serif); |
| font-weight: 400; |
| font-size: 24px; |
| line-height: 1.2; |
| letter-spacing: -0.01em; |
| margin: 40px 0 8px; |
| } |
| |
| .standfirst { |
| font-size: 19px; |
| line-height: 1.5; |
| color: var(--ink-2); |
| max-width: 54ch; |
| } |
| |
| code { |
| font-family: var(--mono); |
| font-size: 0.88em; |
| background: var(--paper-sunk); |
| padding: 1px 5px; |
| border-radius: 2px; |
| } |
| |
| |
| |
| .notice { |
| margin-top: 40px; |
| padding-left: 18px; |
| border-left: 2px solid var(--rule-strong); |
| max-width: var(--measure); |
| } |
| .notice .label { display: block; margin-bottom: 7px; } |
| .notice p { font-size: 16px; color: var(--ink-2); } |
| |
| .notice.ok { border-left-color: var(--bid); } |
| .notice.ok .label { color: var(--bid); } |
| .notice.warn { border-left-color: var(--flag); } |
| .notice.warn .label { color: var(--flag); } |
| .notice.err { border-left-color: var(--ask); } |
| .notice.err .label { color: var(--ask); } |
| |
| .dim { color: var(--ink-2); font-size: 15px; } |
| |
| |
| |
| .file-row { |
| display: flex; |
| justify-content: space-between; |
| align-items: center; |
| flex-wrap: wrap; |
| gap: 12px 20px; |
| padding: 14px 0; |
| border-bottom: 1px solid var(--rule); |
| } |
| .file-row:first-child { border-top: 1px solid var(--rule-strong); } |
| |
| .file-row .path { |
| font-family: var(--mono); |
| font-size: 13px; |
| word-break: break-all; |
| } |
| |
| .file-row .path .err { |
| display: block; |
| font-size: 12px; |
| color: var(--ask); |
| margin-top: 4px; |
| } |
| |
| .dl-btn { |
| font-family: var(--mono); |
| font-size: 12.5px; |
| letter-spacing: 0.06em; |
| text-transform: uppercase; |
| padding: 9px 0 7px; |
| background: none; |
| border: 0; |
| border-bottom: 1px solid var(--ink); |
| color: var(--ink); |
| cursor: pointer; |
| white-space: nowrap; |
| flex-shrink: 0; |
| } |
| .dl-btn:hover:not(:disabled) { border-bottom-width: 2px; padding-bottom: 6px; } |
| .dl-btn:disabled { color: var(--ink-3); border-bottom-color: var(--rule); cursor: not-allowed; } |
| |
| .fineprint { |
| margin-top: 22px; |
| font-size: 13px; |
| color: var(--ink-3); |
| max-width: var(--measure); |
| } |
| |
| |
| |
| .grab-all { |
| margin: 26px 0 30px; |
| padding: 20px 22px; |
| background: var(--paper-sunk); |
| border-left: 2px solid var(--ink); |
| } |
| .grab-all .label { display: block; margin-bottom: 8px; } |
| .grab-all p { font-size: 15px; color: var(--ink-2); max-width: var(--measure); } |
| .grab-all .fineprint { margin-top: 16px; } |
| .grab-all .dl-btn { font-size: 15px; } |
| |
| |
| |
| |
| .os-tabs { display: flex; gap: 2px; margin-top: 8px; } |
| .os-tab { |
| padding: 6px 12px; |
| border: 1px solid var(--rule); |
| border-bottom: 0; |
| background: transparent; |
| color: var(--ink-3); |
| font: inherit; |
| font-size: 12.5px; |
| cursor: pointer; |
| } |
| .os-tab:hover { color: var(--ink-2); } |
| .os-tab[aria-selected="true"] { |
| background: var(--paper); |
| color: var(--ink); |
| border-color: var(--rule); |
| } |
| .os-tabs + .cmd { margin-top: 0; } |
| |
| |
| |
| .cmd { |
| margin: 8px 0 0; |
| padding: 11px 13px; |
| overflow-x: auto; |
| background: var(--paper); |
| border: 1px solid var(--rule); |
| font-family: var(--mono); |
| font-size: 13px; |
| line-height: 1.5; |
| white-space: pre; |
| } |
| |
| #files-details summary { |
| cursor: pointer; |
| padding: 10px 0; |
| color: var(--ink-2); |
| } |
| #files-details summary:hover { color: var(--ink); } |
| #files-details[open] summary { margin-bottom: 6px; } |
| |
| footer { padding: 44px 0 72px; } |
| footer p { font-size: 14px; color: var(--ink-3); max-width: 62ch; } |
| |
| :focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; } |
| |
| @media (prefers-reduced-motion: reduce) { |
| * { animation: none !important; transition: none !important; } |
| } |
| </style> |
| </head> |
| <body> |
|
|
| <div class="page"> |
|
|
| <header class="masthead"> |
| <div class="mark">Polymarket microstructure</div> |
| <nav class="label"><a href="index.html">← Back to dataset</a></nav> |
| </header> |
|
|
| <div class="opener"> |
| <h1 id="heading">Checking your order…</h1> |
| <p class="standfirst" id="subtext">Hang on while we confirm payment and prepare your download links.</p> |
|
|
| <div class="notice" id="status-panel"> |
| <span class="label" id="status-label">Status</span> |
| <p id="status-text">Looking for your order in this browser…</p> |
| </div> |
|
|
| <div id="files-section" hidden> |
| <h2>Your files</h2> |
| <p class="dim" id="files-meta"></p> |
|
|
| |
| |
| |
| <div class="grab-all" id="software-note" hidden> |
| <span class="label">Install it</span> |
| <p class="dim">One archive: code, trained models, installer, systemd units and the documentation. Download it below, then on your server:</p> |
| <pre class="cmd" id="software-cmd"></pre> |
| <p class="fineprint">Read <span class="m">README.md</span> first, then <span class="m">docs/INSTALL.md</span>. The installer never starts trading — the bot comes up switched off and stays that way until you turn it on from Telegram. Live edition: <span class="m">docs/LIVE_TRADING.md</span> before you connect a wallet.</p> |
| <p class="fineprint">The archive ships with a manifest carrying a sha256 for every file, and the release sha256 is published next to the download. Keep a copy of the tarball: this link expires with your grant.</p> |
| </div> |
|
|
| <div class="grab-all" id="grab-all" hidden> |
| <span class="label">Take the whole range in one go</span> |
| <p class="dim">A range purchase is one file per asset, per table, per day — clicking through them by hand is not the intended path. Save the link list and hand it to any downloader.</p> |
| <p><a class="dl-btn" id="urls-link" download="polymarket-dataset-urls.txt">Save link list (<span id="urls-count"></span> files)</a></p> |
| <p class="fineprint">Then, in the folder where you want the data:</p> |
| <div class="os-tabs" id="os-tabs"> |
| <button type="button" class="os-tab" data-os="unix">Linux / macOS</button> |
| <button type="button" class="os-tab" data-os="win">Windows (PowerShell)</button> |
| </div> |
| <pre class="cmd" id="grab-cmd"></pre> |
| <p class="fineprint">The list holds one URL per file and carries your access token, so keep it private. Files land under their full <span class="m">asset_daily_date_table.parquet</span> names.</p> |
| </div> |
|
|
| <details id="files-details"> |
| <summary class="label">Or download files one by one</summary> |
| <div id="files-list"></div> |
| </details> |
|
|
| <p class="fineprint">Links are tied to a fresh token issued just now. Reopening this page later re-claims the order and issues a new token, which invalidates both the saved list and the individual links — grab everything you need in this visit.</p> |
|
|
| <div class="grab-all" id="recovery" hidden> |
| <span class="label">Save this to get back in</span> |
| <p class="dim">Your claim secret lives only in this browser. This link carries it, so it restores access from any device — and it is the only way back if you clear your browser data. Treat it like a password: anyone holding it can re-claim this order.</p> |
| <p><a class="dl-btn" id="recovery-link" download="polymarket-dataset-recovery.txt">Save recovery link</a></p> |
| <pre class="cmd" id="recovery-url"></pre> |
| </div> |
| </div> |
|
|
| <div id="recover-form" hidden> |
| <h2>Restore access</h2> |
| <p class="dim">Paste the recovery link you saved when you bought (or the whole address it points to). It contains the claim secret this browser is missing.</p> |
| <p><input id="recover-input" type="text" placeholder="https://…/paid.html?order=…#s=…" style="width:100%;padding:8px;font:inherit"></p> |
| <p><button class="dl-btn" id="recover-go">Restore</button></p> |
| <p class="fineprint" id="recover-err"></p> |
| </div> |
| </div> |
|
|
| <footer> |
| <p>Something not adding up? The order id is in the page URL. Message <a href="https://t.me/Datasets_support_bot">@Datasets_support_bot</a> on Telegram with it and we'll sort it out.</p> |
| </footer> |
|
|
| </div> |
|
|
| <script> |
| |
| const FUNCTIONS_URL = "https://otaolntxdltbyojbbyhg.supabase.co/functions/v1"; |
| const ANON = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6Im90YW9sbnR4ZGx0YnlvamJieWhnIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODQ2NjMxNTIsImV4cCI6MjEwMDIzOTE1Mn0.8Axxbhd2vIRaQzXqOcKf-L6lTzrbuUybZlOHC9a6TaM"; |
| |
| const POLL_INTERVAL_MS = 5000; |
| const POLL_TIMEOUT_MS = 5 * 60 * 1000; |
| |
| const heading = document.getElementById("heading"); |
| const subtext = document.getElementById("subtext"); |
| const panel = document.getElementById("status-panel"); |
| const label = document.getElementById("status-label"); |
| const text = document.getElementById("status-text"); |
| const filesSection = document.getElementById("files-section"); |
| const filesMeta = document.getElementById("files-meta"); |
| const filesList = document.getElementById("files-list"); |
| |
| |
| function showStatus(kind, labelText, bodyText) { |
| panel.hidden = false; |
| panel.className = "notice " + kind; |
| label.textContent = labelText; |
| text.textContent = bodyText; |
| } |
| |
| |
| |
| |
| function secretFromHash(hash) { |
| const h = (hash != null ? hash : location.hash) || ""; |
| const m = /(?:^#|[#&])s=([^&]+)/.exec(h); |
| try { return m ? decodeURIComponent(m[1]) : null; } catch { return null; } |
| } |
| |
| function recoveryUrl(orderId, secret) { |
| return location.origin + location.pathname + |
| "?order=" + encodeURIComponent(orderId) + "#s=" + encodeURIComponent(secret); |
| } |
| |
| function showRecovery(orderId, secret) { |
| const url = recoveryUrl(orderId, secret); |
| document.getElementById("recovery-url").textContent = url; |
| const a = document.getElementById("recovery-link"); |
| a.href = URL.createObjectURL(new Blob([url + "\n"], { type: "text/plain" })); |
| document.getElementById("recovery").hidden = false; |
| } |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| const GRAB_COMMANDS = { |
| unix: (name) => |
| 'while read -r u; do\n' + |
| ' [ -z "$u" ] && continue\n' + |
| ' curl -sL -o "${u##*%2F}" "$u"\n' + |
| "done < " + name, |
| win: (name) => |
| "Get-Content " + name + " | ForEach-Object {\n" + |
| " $u = $_.Trim()\n" + |
| " if (-not $u) { return }\n" + |
| " $n = ($u -split '%2F')[-1]\n" + |
| " curl.exe -sL -o $n $u\n" + |
| "}", |
| }; |
| |
| function renderGrabCommand(listName) { |
| const pre = document.getElementById("grab-cmd"); |
| const tabs = [...document.querySelectorAll(".os-tab")]; |
| |
| const select = (os) => { |
| pre.textContent = GRAB_COMMANDS[os](listName); |
| for (const t of tabs) { |
| t.setAttribute("aria-selected", String(t.dataset.os === os)); |
| } |
| }; |
| |
| |
| |
| const ua = navigator.userAgent || ""; |
| select(/Windows|Win32|Win64/i.test(ua) ? "win" : "unix"); |
| |
| for (const t of tabs) { |
| t.addEventListener("click", () => select(t.dataset.os)); |
| } |
| } |
| |
| function renderFiles(data) { |
| heading.textContent = "Payment confirmed"; |
| subtext.textContent = "Your files are ready below."; |
| panel.hidden = true; |
| filesSection.hidden = false; |
| |
| const expires = data.expires_at ? new Date(data.expires_at).toLocaleString() : "unknown"; |
| filesMeta.textContent = |
| (data.downloads_left != null ? data.downloads_left + " download(s) left" : "") + |
| (data.expires_at ? " · link expires " + expires : ""); |
| |
| const files = data.files || []; |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| const urlFor = (path) => |
| FUNCTIONS_URL + "/download?token=" + encodeURIComponent(data.token) + |
| "&path=" + encodeURIComponent(path); |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| const listFileName = (paths) => { |
| const dates = []; |
| for (const p of paths) { |
| const m = /(\d{4}-\d{2}-\d{2})/.exec(p); |
| if (m) dates.push(m[1]); |
| } |
| if (!dates.length) return "datasets_polymarket.txt"; |
| dates.sort(); |
| const from = dates[0]; |
| const to = dates[dates.length - 1]; |
| return from === to |
| ? "datasets_polymarket_" + from + ".txt" |
| : "datasets_polymarket_" + from + "_" + to + ".txt"; |
| }; |
| |
| |
| |
| |
| const software = files.length > 0 && files.every((p) => p.indexOf("software/") === 0); |
| if (software) { |
| const archive = files[0].split("/").pop(); |
| document.getElementById("software-cmd").textContent = |
| "tar xzf " + archive + "\n" + |
| "cd " + archive.replace(/\.tar\.gz$/, "") + "\n" + |
| "./install.sh"; |
| document.getElementById("software-note").hidden = false; |
| document.getElementById("files-details").open = true; |
| renderFileRows(files, urlFor); |
| return; |
| } |
| |
| if (files.length > 1) { |
| const listText = files.map(urlFor).join("\n") + "\n"; |
| const listName = listFileName(files); |
| const blob = new Blob([listText], { type: "text/plain" }); |
| const urlsLink = document.getElementById("urls-link"); |
| urlsLink.href = URL.createObjectURL(blob); |
| urlsLink.download = listName; |
| document.getElementById("urls-count").textContent = String(files.length); |
| renderGrabCommand(listName); |
| document.getElementById("grab-all").hidden = false; |
| |
| |
| document.getElementById("files-details").open = false; |
| } else { |
| |
| document.getElementById("files-details").open = true; |
| } |
| |
| renderFileRows(files, urlFor); |
| } |
| |
| |
| |
| |
| function renderFileRows(files, urlFor) { |
| filesList.innerHTML = ""; |
| files.forEach((path) => { |
| const row = document.createElement("div"); |
| row.className = "file-row"; |
| |
| const pathEl = document.createElement("div"); |
| pathEl.className = "path"; |
| pathEl.textContent = path; |
| |
| |
| |
| |
| |
| |
| |
| const link = document.createElement("a"); |
| link.className = "dl-btn"; |
| link.textContent = "Download"; |
| link.href = urlFor(path); |
| link.setAttribute("download", ""); |
| |
| row.appendChild(pathEl); |
| row.appendChild(link); |
| filesList.appendChild(row); |
| }); |
| } |
| |
| |
| |
| |
| |
| |
| |
| async function startDownload(btn, pathEl, token, path) { |
| const url = FUNCTIONS_URL + "/download?token=" + encodeURIComponent(token) + |
| "&path=" + encodeURIComponent(path); |
| const original = btn.textContent; |
| btn.disabled = true; |
| btn.textContent = "Preparing…"; |
| |
| const existingErr = pathEl.querySelector(".err"); |
| if (existingErr) existingErr.remove(); |
| |
| try { |
| const res = await fetch(url, { |
| method: "GET", |
| redirect: "follow", |
| headers: { apikey: ANON, Authorization: "Bearer " + ANON }, |
| }); |
| if (!res.ok) { |
| let msg = "download failed (" + res.status + ")"; |
| try { |
| const data = await res.json(); |
| if (data && data.error) msg = data.error; |
| } catch (_) { } |
| throw new Error(msg); |
| } |
| window.location = res.url; |
| btn.textContent = "Started"; |
| setTimeout(() => { btn.disabled = false; btn.textContent = original; }, 3000); |
| } catch (err) { |
| btn.disabled = false; |
| btn.textContent = original; |
| const errEl = document.createElement("span"); |
| errEl.className = "err"; |
| errEl.textContent = "Download failed (" + err.message + "). "; |
| const retryLink = document.createElement("a"); |
| retryLink.href = url; |
| retryLink.textContent = "Try opening the link directly."; |
| errEl.appendChild(retryLink); |
| pathEl.appendChild(errEl); |
| } |
| } |
| |
| async function pollClaim(orderId, secret, startedAt) { |
| let res, data; |
| try { |
| res = await fetch(FUNCTIONS_URL + "/claim", { |
| method: "POST", |
| |
| |
| headers: { "content-type": "application/json" }, |
| body: JSON.stringify({ order_id: orderId, claim_secret: secret }), |
| }); |
| data = await res.json(); |
| } catch (err) { |
| |
| if (Date.now() - startedAt < POLL_TIMEOUT_MS) { |
| showStatus("warn", "Connection trouble", "Could not reach the server, retrying…"); |
| setTimeout(() => pollClaim(orderId, secret, startedAt), POLL_INTERVAL_MS); |
| } else { |
| showStatus("err", "Could not reach the server", "Refresh this page to try again."); |
| } |
| return; |
| } |
| |
| if (res.ok) { |
| renderFiles(data); |
| showRecovery(orderId, secret); |
| return; |
| } |
| |
| if (res.status === 403 && data && data.error === "not_available") { |
| if (Date.now() - startedAt < POLL_TIMEOUT_MS) { |
| showStatus("warn", "Waiting for payment confirmation", |
| "This can take a few minutes — we'll keep checking automatically."); |
| setTimeout(() => pollClaim(orderId, secret, startedAt), POLL_INTERVAL_MS); |
| } else { |
| heading.textContent = "Still waiting"; |
| showStatus("err", "Still not confirmed", |
| "Payment can take a few minutes to confirm on-chain. Refresh this page later to check again."); |
| } |
| return; |
| } |
| |
| |
| |
| heading.textContent = "Couldn't claim this order"; |
| showStatus("err", "Error", (data && data.error) ? data.error : "Something went wrong claiming this order."); |
| } |
| |
| (function init() { |
| const params = new URLSearchParams(location.search); |
| const orderId = params.get("order"); |
| |
| if (!orderId) { |
| heading.textContent = "Bad link"; |
| subtext.textContent = ""; |
| showStatus("err", "Missing order id", "This link is missing an order id. Go back to the dataset page and buy again."); |
| return; |
| } |
| |
| |
| |
| |
| |
| |
| const secret = secretFromHash() || localStorage.getItem("claim:" + orderId); |
| if (!secret) { |
| heading.textContent = "Can't find your order"; |
| subtext.textContent = ""; |
| showStatus("err", "No claim secret in this browser", |
| "The claim secret is stored only in the browser you bought from. Open that browser, or paste your saved recovery link below."); |
| const form = document.getElementById("recover-form"); |
| const input = document.getElementById("recover-input"); |
| const err = document.getElementById("recover-err"); |
| form.hidden = false; |
| document.getElementById("recover-go").addEventListener("click", () => { |
| const raw = input.value.trim(); |
| |
| const pasted = secretFromHash(raw.includes("#") ? raw.slice(raw.indexOf("#")) : "#s=" + raw); |
| if (!pasted) { |
| err.textContent = "That doesn't look like a recovery link. It should contain #s= followed by your secret."; |
| return; |
| } |
| localStorage.setItem("claim:" + orderId, pasted); |
| err.textContent = ""; |
| form.hidden = true; |
| showStatus("warn", "Checking…", "Confirming your payment…"); |
| pollClaim(orderId, pasted, Date.now()); |
| }); |
| return; |
| } |
| |
| |
| localStorage.setItem("claim:" + orderId, secret); |
| if (location.hash) history.replaceState(null, "", location.pathname + location.search); |
| |
| showStatus("warn", "Checking…", "Confirming your payment…"); |
| pollClaim(orderId, secret, Date.now()); |
| })(); |
| </script> |
|
|
| </body> |
| </html> |
|
|