Urgent.News

What's breaking now, across thousands of outlets.

Tech

My quote feed returns two premium numbers. I only show one when they agree.

Over a week-long holiday I built a small dashboard for a narrow problem: investors in mainland China who want US index exposure. The context: many onshore Nasdaq-100 funds now cap purchases at ¥5–100 a day, or have paused them entirely. Demand moved to exchange-traded ETFs, and on Sep 30 those were trading 10–11% above their indicative NAV (IOPV). Put ¥10,000 in and you pay roughly ¥900–1,000…

During a week-long holiday, I crafted a compact dashboard to address a specific issue faced by investors in mainland China seeking exposure to US index funds. These investors encountered restrictions on onshore Nasdaq-100 funds, with daily purchase caps ranging from ¥5 to ¥100, or complete suspensions. Consequently, demand shifted towards exchange-traded ETFs, which were trading 10-11% above their indicated Net Asset Value (IOPV) on September 30th.

The dashboard presented a straightforward layout, displaying a list of ETFs sorted by their premium. The primary challenge lied in obtaining reliable data, as the source endpoints lagged, imposed rate limits, and exhibited inconsistent structures. To prevent misleading information, the dashboard implemented several safeguards. First, it required two numbers from the same response to match before accepting the IOPV.

The IOPV was calculated as (price / IOPV - 1) * 100, and if the calculated premium differed by more than 0.05 percentage points from the reported value, the IOPV was marked as unavailable. This validation process ensured the accuracy of the displayed premium.

Furthermore, the dashboard accounted for failed fetches by returning the last valid payload, marked as stale, complete with the timestamp of the failed attempt and the error message. This approach kept the data's original timestamp and prevented stale information from being displayed as fresh. The UI presented this information, featuring a stale badge next to the date.

By integrating these safeguards, the dashboard aimed to provide investors with reliable and up-to-date information, minimizing the risk of financial losses due to inaccurate data.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Your video breaks when you serve it from your own server, and 416 is usually the reason

If you moved private files off presigned URLs and started serving them through your own route, you have probably hit this: images are fine, PDFs are mostly fine, and video is broken.

  • Video files fail to load properly when served from private servers.
  • Range header causes issues when proxying requests instead of using presigned URLs.
  • Correctly handling ranges is crucial to prevent data corruption.

Two 32 MB tokenizers: hunting a memory floor in a Rust proxy

cliproxy-rs is a Rust rewrite of CLIProxyAPI. It's one local server that Codex CLI, Claude Code and other tools talk to, and it forwards to whatever you've configured: your own API keys, your own…

  • Two 32 MB tokenizers consume excessive memory in cliproxy-rs
  • Memory leak starts with upward trend, never decreases
  • Fix implements shared encoder per encoding to reduce memory

More from Wednesday 7 October →