SShortSingh.
Back to feed

Python Monitor Tracks Price Gaps Between Polymarket and Kalshi Prediction Markets

0
·1 views

A DEV Community tutorial shows how to build a Python agent that polls prediction markets Polymarket and Kalshi for the same event's probabilities. The author cites an October 18, 2024 example in which the two platforms priced the Fed's October rate decision about four percentage points apart. Manually tracking several platforms is impractical, so the agent automates polling, normalizes contract prices to a 0-1 probability scale, and computes the spread. The design uses asyncio for concurrent requests, public APIs only, and explicit termination via a maximum iteration count or keyboard interrupt. The post also flags challenges such as differing API formats, inconsistent contract wording, and error handling.

Read the full story at DEV Community

This is an AI-generated summary. ShortSingh links to the original source for the complete article.

Discussion (0)

Log in to join the discussion and vote.

Log in

Related stories

0
ProgrammingDEV Community ·

Low Chilled Water Delta-T Halved Chiller Capacity in One Building

A chilled water system's delta-T, the gap between warm return water and cold supply water, determines how much cooling a chiller delivers, and a drop in that gap can sharply reduce output even at full compressor speed. In one example, a 300-ton chiller running at 600 GPM fell from a 12°F design delta-T to 5°F, cutting its capacity to about 125 tons. Causes included three-way bypass valves on air handling coils, fouled coil surfaces, and pump speeds set too high, which forced a second chiller to run on peak days. Converting to two-way valves and chemically cleaning the coils restored the delta-T to 10°F, letting one chiller handle the load and saving an estimated $47,000 a year. The article advises measuring supply and return temperatures and comparing the result to design values to diagnose similar problems.

0
ProgrammingDEV Community ·

Analyst's '5% for chatbots' compute figure may obscure how workloads are classified

A Nomura estimate suggesting chatbots consume about 5% of global AI compute has circulated among Chinese AI developers as a humbling corrective. The author argues the figure is rough and lacks a public methodology, so its bucket boundaries, especially where tool-using agent sessions fall, are unclear. Because agentic workloads are largely chatbot-style sessions with tool calls added, assigning them to a separate category could understate conversational inference. The piece also contends that chatbot inference is synchronous and latency-sensitive, making it costlier per unit than batched recommendation workloads. Therefore, a small percentage of total compute may not imply that chatbot infrastructure is unimportant to future planning.

0
ProgrammingDEV Community ·

Four Python scripts that packaged 39 stock products and cut out tedious upload errors

A developer describes an evening of repeated CSV rejections from stock platforms, which pushed them to write small tools instead of relying on manual spreadsheet fixes. The package includes a metadata generator that builds platform-specific upload files, an upload tracker that prevents duplicate submissions, and utilities for converting Markdown to PDF and bundling products with covers and thumbnails. The author recommends running one process at a time on limited hardware and measuring peak memory usage. Only two of the four scripts need third-party libraries, so some users can skip installing them entirely.

0
ProgrammingDEV Community ·

Developer's Upload Pipeline Uses Ledger Script to Prevent Duplicate Stock Asset Posts

After accidentally re-posting 14 vectors to a marketplace, which drew a complaint email, a developer built a small upload pipeline to stop duplicate submissions. The kit includes four scripts: a metadata builder that outputs the exact CSV header each platform requires, a standard-library ledger that tracks completed uploads, a Markdown-to-PDF converter, and a packager that creates zips with cover images and thumbnails. The developer reports the workflow handled 39 products totaling 856 MB on a single-core server with 2 GB of RAM and no GPU. The project relies on only two third-party packages, Pillow and reportlab, while the metadata and tracker scripts use the standard library alone.