
Missing candles in OHLCV data: how to detect gaps and backfill them safely
Detect missing candles in OHLCV bar data with a UTC grid and a trading calendar, then backfill safely without forward-filling volume or range.
20 posts on python from the SiftingIO market data blog, spanning real-time and historical coverage across stocks, forex, crypto, commodities, and on-chain venues.

Detect missing candles in OHLCV bar data with a UTC grid and a trading calendar, then backfill safely without forward-filling volume or range.

How cursor-based pagination works in a market data REST API, with a Python loop that pulls years of 1-minute stock bars and handles gzip, rate limits, and gaps.

Pull US economic calendar events (CPI, NFP, FOMC) as JSON and join each release to the one-minute OHLCV bar that was open when it hit, using the real field names.

Pull Form 4 insider transactions for US stocks from a REST API, decode transaction codes P, S, M, and F, and separate open-market buys from routine noise.

Pull profit margins, ROE, and debt to equity from SEC filings with one API call, and drop down to raw XBRL concepts when a precomputed ratio isn't enough.

How to pull daily and intraday OHLCV stock bars from a REST API: request format, response fields, intervals, cursor pagination, history depth, and pitfalls.

How Quantitative Trading at Brown uses intraday US equities OHLCV bars from the SiftingIO API for student research on returns, volatility, and trading volume.

The cross rate formula with worked math: derive EURGBP from EURUSD and GBPUSD, carry bid and ask through the triangulation, and compute it in Python.

TA-Lib won't install? Skip the C compile and numpy version matrix: pull RSI, MACD, and moving average readings from two REST endpoints with plain requests.

1-minute OHLCV bars are the base timeframe. The exact rules for resampling minute bars into 5m, 15m, and 1h bars, with the alignment and gap traps to avoid.
Build a stock portfolio tracker with a US stocks API: positions as data, daily-bar backfill, unrealized P&L from live quotes, and a WebSocket upgrade path.

Five ways historical price data silently corrupts a backtest: adjustment method, venue-dependent highs and lows, gap policy, session cuts, and restated bars.

Build a total-return series from as-traded prices, split factors, and cash dividends with reinvestment math, and see where the adjusted-close shortcut misleads a backtest.

Pull SEC Form 4 insider transactions for a stock watchlist with Python: decode transaction codes, paginate the API, and build a screening table with pandas.

How to pull scheduled US economic events from one endpoint and align them with OHLCV bars so a backtest knows when CPI, NFP, and FOMC actually hit.

yfinance rate limited or throwing Too Many Requests? A call-for-call map to move daily history, intraday bars, and latest-price pulls to a keyed API in Python.

How to read bid and ask from a quote snapshot, compute the bid ask spread in basis points, and flag wide or stale quotes in Python before users see them.
How to diff 13F-HR holdings between reporting cycles using SiftingIO, find new positions, exits, and meaningful size changes.

How to pull scheduled US economic events from one endpoint and align them with OHLCV bars so a backtest knows when CPI, NFP, and FOMC actually hit.

How to pull historical OHLCV bars and XBRL fundamentals for one stock ticker from SiftingIO, and avoid the split and fiscal-year pitfalls.