Did Your Historical Forex API Return Every Minute? Check the Window, Not the Count

TickDB Research ·

A historical forex API can return successfully without covering the period you asked for. Split a capped request into smaller windows, then compare the timestamps you received with the minutes the feed is expected to publish. A row count on its own cannot tell you whether data is missing.

Conceptual one-minute Forex bar coverage

A full response can still be incomplete

Suppose you ask for two hours of one-minute EUR/USD candles and expect 120 bars. If the response has 100 rows and your request limit is 100, it has hit the ceiling. That does not tell you which minutes are absent, which direction the server truncated, or whether the underlying series has a gap. Equally, a response below the limit can contain duplicate timestamps and still miss a minute.

TickDB's Candlestick Data reference documents a default limit of 100 and a maximum of 1,000 for historical bar queries. The Free plan can query candlesticks but cannot specify a date range with start_time or end_time. Do not remove those bounds and count a successful unbounded request as evidence for the original period.

Synthetic example: a two-hour period returns 100 of 120 expected minutes at the cap; two shorter one-hour windows each return 60 of 60.

In this synthetic example, each smaller window contains all 60 expected minutes. That is evidence of truncation in the broad response in this example, not a general guarantee about the API.

Test adjoining windows with explicit boundaries

Use closed historical periods and a single instrument and interval. Keep adjacent target windows as [start, stop) in your code. Before mapping those bounds to the API, test a short request with known boundary bars and check which timestamps it returns. The TickDB reference specifies millisecond request timestamps; do not assume an inclusive upper bound or a particular return order. Normalize each response to your target window and retain out-of-window rows as a diagnostic.

Build the expected timestamp list separately using the pair's applicable session and the feed's bar-generation rules. A scheduled closure, a provider-defined break, or a minute for which the feed does not publish a bar is not automatically a data defect. If you cannot verify those rules, label a minute as unobserved, not lost. Avoid the current still-forming candle in the test.

A small Python check for known candle starts

The input below is a list of normalized candle-start timestamps in UTC milliseconds for one symbol and one-minute bars. Supply your own independently determined expected timestamps. The example is a local check, not a live API test.

STEP = 60_000

def audit(rows, start, stop, limit, expected):
    """One symbol/interval. Times are verified candle starts in UTC ms."""
    if stop <= start or (stop - start) % STEP or limit <= 0:
        raise ValueError("invalid window or limit")
    grid = set(range(start, stop, STEP))
    if not expected <= grid:
        raise ValueError("expected minutes outside the window")
    seen, duplicates, outside, off_grid = set(), set(), set(), set()
    for t in rows:
        if not start <= t < stop:
            outside.add(t)
        elif (t - start) % STEP:
            off_grid.add(t)
        else:
            if t in seen:
                duplicates.add(t)
            seen.add(t)
    return {
        "hit_limit": len(rows) >= limit,
        "missing_expected": sorted(expected - seen),
        "duplicates": sorted(duplicates),
        "outside": sorted(outside),
        "off_grid": sorted(off_grid),
    }

Run it first on the broad response, then on two adjoining smaller responses. In a local synthetic test, a broad response hit its 100-row limit and omitted 20 expected minutes. The two smaller observations passed. The test also caught a duplicate, an off-grid timestamp and a timestamp equal to the excluded stop. If two requests disagree on values for the same timestamp, preserve both responses for investigation; this timestamp check alone cannot settle which value is correct.

A range is ready for this stage of validation only when the sampled windows have no unexplained omissions, duplicates or boundary surprises. That says nothing by itself about price accuracy or tick-level completeness.

Source checked: TickDB Candlestick Data reference. Figure and test data are synthetic.

Category coverage

Forex & metals
1,228
12/2/2026

Explore related data tools

Related articles

How to Recover a Forex WebSocket Feed Without Showing Stale Quotes

A reopened Forex WebSocket is not a recovered quote feed. Resubscribe, invalidate cached quotes, and mark each pair live only after a valid update from the new connection. An offline Python test shows why a delayed message from the previous socket must be dropped.

TickDB Research ·

How to Check Forex API Quotes with a Cross Rate

EUR/JPY can differ from the rate implied by EUR/USD and USD/JPY without a broken feed. Check timestamp skew first, then compare bid/ask intervals using a reproducible Python example.

TickDB Research ·

What Does XAUUSD Mean? Read a Gold Quote Without Assuming a Contract

XAUUSD commonly denotes gold quoted in US dollars per troy ounce. It tells you how to read a price, not how much gold an order represents or which contract you are buying. Separating the quote unit from quantity and product terms makes a simple ounce-to-gram conversion useful without turning it into an invented lot calculator.

TickDB Research ·