Market Data API Guides — Python, WebSocket & AI | TickDB Blog · Page 2

Choose a market data API, fetch quotes with Python and check historical data for backtests. Explore code examples, WebSocket reconnection guides and AI data workflows.

A-share market data API: Why a 300-stock report still needs a trading-date check

An after-close job can receive all 300 quotes and still contain a quote from the wrong day. In a local replay of a real CSI 300 sample, complete input updated the date in the reader file to November 20. Removing a row or changing one quote to an older date left the file on November 19. The file contained the date and row count only.

TickDB Research ·

US stock kline API: How to check batch downloads for missing and duplicate bars

How do you verify coverage after downloading US daily bars in batches? A complete AAPL response contained 15 bars. The same window with limit=2 returned the final two. Splitting the 15 bars offline produced either an extra row or a missing date at the boundary. Here is how to distinguish those cases and check your downloaded batches against a trading calendar.

TickDB Research ·

Financial data in a backtest: When can you use earnings reported after the close?

If your stock screen runs at 4 p.m. New York time, when can it use Apple's latest quarterly net income? Using EDGAR acceptance as a proxy, the July 31 screen cannot use the figure, while the August 1 screen can. We verify the amount against TickDB's response and the SEC exhibit, then show a cutoff check you can run on your own records.

TickDB Research ·

US stock minute data API: Where to look first in a post-session watchlist review

Two watchlist entries gained about 1% from the open to the final one-minute close. Which part of the session should you review first? In two archived TickDB samples, AAPL ended 0.20% below its intraday high and NVDA ended 0.82% below its high. Record the minute containing the high alongside those two percentages to find where to start.

TickDB Research ·

Did Your Watchlist Follow the Index? A Midday Review with a Real-Time China A-Share Stock API

On November 23, the ChiNext Index opened lower and was up 1.22% by midday. Yet 209 stocks in our example watchlist were still below their previous close. Use opening prices, previous closes, and midday quotes from a real-time China A-share stock API to see which stocks rebounded, which turned positive, and whether your watchlist still warrants a risk flag.

TickDB Research ·