Choosing a data API from a Chinese provider for backtesting a crypto trading bot means checking what the feed actually supplies at the event level, not how long its advertised history runs. A usable backtest dataset needs timestamps that align across venues, trades and book snapshots recorded as they occurred, explicit handling for missing or stale periods, and a refresh policy that keeps later batches consistent with earlier ones. Buyers who select on history length alone often build a harness around data that omits gaps, mixes time zones, or lacks the depth their strategy actually needs. This article lays out the API specifications that matter, separates the two deciding ones, and sets out the ongoing maintenance cost to plan for. Crypto trading and derivatives analysis may be restricted or prohibited in some jurisdictions, so the buyer should obtain local legal advice before any deployment; the material below is technical information, not investment advice, and contains no profit, yield, or performance projection.
What a backtesting data API has to deliver
A backtest replays recorded market events to evaluate a rule set, so the data must represent what the market showed at each past moment. That means consistent timestamp conventions, a defined unit for each record, and enough detail to model orders at the granularity the strategy uses. A harness built on coarse candles cannot evaluate a strategy that reacts to individual trades, and one built on a venue’s adjusted or derived series may miss the actual order-book conditions that existed.
The provider’s documentation should state the source venue for each series, whether records are raw feeds or recomputed summaries, how time is stamped and converted, and which pairs or products are covered. Buyers should also check whether the feed carries spot, futures, funding, and settlement data separately, since a strategy that trades leveraged contracts needs margin and funding history that a spot price series does not provide. The sample volume should match the project’s scale: a provider may advertise ten years of candles but only a few months of trade-level book data, and the advertised headline does not describe every series on offer. Why backtest results rarely repeat under live conditions is examined in why bot backtests rarely repeat, and data quality is one of the first places that gap originates.
Access behavior matters to the harness as well: how many records a request returns, whether history is paginated, and how the provider responds when the buyer requests older or bulk ranges. Rate limits and failure handling on data endpoints are reviewed in exchange API rate limits and failures, and a backtest pipeline that pulls large history batches should be built within the same limits rather than assumed to run uninterrupted.
Specification table: endpoint types and what each supplies
| Endpoint or series type | Records supplied | Suitable strategy questions | Check before use |
|---|---|---|---|
| Trade history | Individual executed trades: price, size, side marker, time | Trade-flow reaction rules, short-term momentum checks | Time alignment, missing-trade handling, venue source |
| Candles or OHLCV | Aggregated open, high, low, close, volume per interval | Interval-based rules, range and band checks | Interval definition, how out-of-hours gaps are represented |
| Order-book snapshots | Top-of-book or depth levels at recorded times | Liquidity-aware sizing, spread and depth checks | Snapshot interval, depth retained, stale snapshot marking |
| Futures and funding series | Contract prices, open interest, funding rates, settlement | Margin and leverage strategy evaluation | Contract specs, funding interval, adjustment method |
| Derived indicators | Pre-computed measures computed by the provider | Reference context, not primary event replay | Formula and inputs disclosed; not substituted for raw events |
Each endpoint type answers a different level of strategy detail. A candle series is cheap to store and convenient for interval rules, but it hides intra-interval sequence; a trade series preserves that sequence at higher storage and processing cost. Order-book snapshots reveal depth only at the recorded instants, and between snapshots the book’s state is unknown. Buyers should match the series to the strategy’s actual reaction level rather than defaulting to whichever series the provider makes easiest to download.
Coverage gaps should be read directly from the feed’s coverage list: pairs dropped or listed late, products delisted before the test window, and venues with partial history. A series that begins partway through a period cannot support a comparison across the whole window, and delisted pairs that disappear from the feed create a survivorship question the harness must handle deliberately. Buyers should also check whether the feed includes only currently listed pairs or retains records for delisted ones, because the two collections answer different research questions.
First deciding spec: granularity and event integrity
Granularity is the finest unit the data preserves, and it must match the strategy’s reaction horizon. A strategy that enters on individual trade prints needs trade-level records; one that evaluates on hourly bands can work on hourly candles, provided the interval definition matches the backtest’s own clock. Mismatch in either direction distorts the evaluation: too coarse hides the events the rule reacts to, too fine demands storage and processing the project may not need.
Event integrity covers whether records reflect what actually occurred. Timestamps should use a stated clock and timezone, with consistent ordering within each record. Duplicate trades, corrected records, or venue reprints should be handled in a defined way rather than left for the harness to infer. Buyers should sample a short period against the venue’s own public history where available, comparing prices, sizes, and timestamps for a small set of records before committing to a full dataset. A feed that recomputes summaries after the fact should disclose its adjustment method, because adjusted history no longer matches the conditions a bot would have observed live.
Integrity also covers how the feed represents errors. A dropped interval should appear as a marked gap, not be filled by an interpolated value that looks like real market activity. The backtest should be able to distinguish a quiet market period from a missing data period; mixing the two lets a strategy appear to trade through information the harness never actually held. Buyers should also check how corporate-style venue events such as pair renames, contract expiries, or feed switches are recorded, since an unresolved change in naming or source can split one series into two without an obvious break.
Second deciding spec: continuity, gaps, and refresh policy
Continuity asks whether the series runs unbroken across the test window, and how gaps are reported and repaired. Providers may exclude periods where the venue feed failed, split a pair’s history across sources, or fill later batches with a different processing version. The buyer should request a gap report for the intended window: missing intervals, discontinuities in timestamps, and periods sourced from a different feed. A dataset with undisclosed gaps cannot support a reliable evaluation, because the strategy’s performance through those periods is simply unknown.
The refresh policy governs how new data arrives and how past records are revised. Buyers should check whether historical batches are frozen once published, whether corrections can alter earlier records, and whether subsequent downloads overwrite or append to existing files. A backtest whose own stored copy drifts because the provider revises history undermines reproducibility: the same rule run against two versions of the dataset is not the same test. The pipeline should store source files with their retrieval date and provider version, so a result can be traced to the exact data it used.
Cross-venue continuity matters where the strategy compares or routes across exchanges. Timestamps, pair naming, and settlement conventions differ between venues, and the feed should expose enough metadata to align them. A backtest that assumes aligned clocks between venues can invent signals that arise only from offset recording rather than from real price differences.
Maintenance cost and the vendor record to plan for
The maintenance cost of a data setup appears after the first download. Feeds require periodic refresh to extend history, stored files need validation against gap reports, and schema or endpoint changes can break the loader. Buyers should plan for repeat fetching, validation scripts, and storage growth rather than treating the dataset as a one-time purchase. Ongoing access may carry a subscription tier, a per-call fee, or limits on bulk history, and those charges should be projected across the test horizon rather than estimated from the first free sample.
Vendor records that reduce later maintenance include documentation of endpoint schemas, sample files, a change log for revisions, and a support channel that answers data-quality questions in writing. Buyers should note the provider’s support timezone and language, since cross-border support delays matter when a gap appears right before a testing deadline. The agreement should record what the provider warrants about feed accuracy and continuity, and what it does not warrant, so expectations about data quality are set in advance. A buyer should also confirm whether bulk exports, migration between data tiers, and future series additions carry separate pricing, so the maintenance budget does not expand once the harness is built.
Parameter choices made on a dataset should be checked for overfitting to that specific sample, as covered in choosing bot parameters without overfitting. Data APIs are the input to that process, and a clean, well-documented feed is the precondition for distinguishing a robust rule from one tuned to one historical window. The material above describes how backtest data APIs are specified and maintained; it does not recommend any provider, pair, or strategy, and it makes no claim about how a bot would perform under live market conditions.
Leave a Reply