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 volume-confirmed breakout has two conditions: price and volume. We checked 16 AAPL trading dates using TickDB historical bars. Three passed the price check alone and two passed the volume check alone. None passed both. Use the same check on your own bars to see which condition each date failed.
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.
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.
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.
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.
A quote dashboard can start moving again while its chart still has a gap. A local replay of real Cambricon candles shows how to resubscribe, backfill with REST and decide when the recovery alert can be cleared.
The same lookup can return Monday quotes in China and Hong Kong, a Friday US regular quote, and a Monday US premarket quote. Use real REST and MCP payloads to decide which price to show and how to preserve its market time.
If a daily strategy confirms a breakout at the close, can it still enter at the next open? Use historical AAPL candles to record the signal, the opening-price condition and the fill assumption separately.
A benchmark can fall while most of the names on a watchlist rise. To find out what happened inside the index, match batch quotes to the constituent roster effective on the review date. On one Hang Seng TECH session, changing the roster alone moved the share of advancing stocks from 33.3% to 52%.
Export historical stock candles with a request and response manifest. Verify the Python example with synthetic data and keep unknown coverage explicit.
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.