Exporting Crypto Prices to CSV: Four Checks Before Analysis

A successfully downloaded CSV can contain valid numbers while still being unsuitable for the intended comparison. Verify the series, time conventions, values and merge logic before calculating returns or indicators. Preserve the source version and processing choices so the result can be reviewed instead of relying on a filename suggesting completeness.

A successfully downloaded CSV can contain valid numbers while still being unsuitable for the intended comparison. Verify the series, time conventions, values and merge logic before calculating returns or indicators. Preserve the source version and processing choices so the result can be reviewed instead of relying on a filename suggesting completeness.

A hypothetical one-hour minute-data window
10:00 inclusiveFirst opening timestamp
11:00 exclusiveUpper boundary
60 expectedIf the source emits every minute

A count of sixty alone does not rule out one duplicated minute and another missing minute.

BTKWIN.COM · EDUCATIONAL EXAMPLE

Check one: identity and actual download coverage

Record asset identifier, pair, venue, product, quote currency, provider and download date. A composite reference and local spot market differ, as do spot and derivative series. Two files named bitcoin can therefore describe different inputs. Save the exact source definition beside the data.

The TradingView export guide explains the relationship between loaded chart data and exported coverage. Inspect first and last timestamps and row count after downloading rather than assuming that the selected daily timeframe delivers the asset’s entire history.

The CoinGecko historical-granularity explanation illustrates how resolution can depend on the requested duration and service plan. Read current documentation and measure actual intervals rather than reusing remembered limits from another request.

Preserve a short description and an unchanged source copy

A useful description might identify hourly closes of a named spot pair, UTC opening timestamps, base-asset volume and an excluded ongoing final bar. Include requested versus received date ranges and any unexplained gaps. That is more informative than a file named complete-prices.

Retain the original download and create a dated working version. Record processing steps in order. If historical data is later corrected, the saved versions can explain why a previous result differs. Overwriting the only copy and reconstructing transformations from memory weakens reproducibility.

Source identity, sorting, deleted rows and filled values can affect the answer as much as the final formula. Keep those decisions explicit rather than describing the resulting file as clean without explaining what changed.

Check two: timestamp unit and period meaning

A timestamp can be text, seconds, milliseconds or another documented representation. Reading milliseconds as seconds can produce implausible dates. Test a known row against the source before transforming the whole series, and preserve enough precision for the task.

Identify whether a timestamp marks opening or ending time and whether boundaries are inclusive or exclusive. One file labeling an hour by 10:00 and another by its 11:00 end can look shifted despite describing the same underlying period. Do not move timestamps merely until a chart looks aligned.

Convert the working comparison to one timezone while retaining original values. A local text time without an offset can be ambiguous, particularly around seasonal clock changes. A time-display conversion also does not automatically rebuild candles around different daily boundaries.

Test a complete one-hour window carefully

Assume one-minute opening timestamps for a window starting at 10:00 inclusive and ending at 11:00 exclusive. If the source emits every minute, expect sixty unique rows from 10:00 through 10:59. Some sources can omit no-trade intervals, so inspect that policy before classifying every absence as a failed download.

With fifty-nine rows, locate the missing minute and investigate. With sixty-one, look for a duplicate, included ending row or unfinished period. Even sixty can contain both a duplicate and a missing minute. Check the unique timestamp set, order and intervals rather than only the total.

Check three: numeric fields and missing-value semantics

Read column definitions before importing. Decimal and thousands separators can cause a price to become text, change magnitude or split across columns under unsuitable locale settings. Test large and small values and avoid rounding every price to two decimals before analysis.

Blank, zero, N/A and an error code should not silently become the same value. A zero price changes a return calculation differently from an unknown price. Do not invent volume to fill gaps. If carrying forward a price for a specific modeled purpose, mark it imputed rather than treating it as a new trade.

For standard OHLC, check that low does not exceed high and that open and close lie within the range. A failure can indicate field order, transformation or source issues. Do not repair the row by selecting its largest number as high when another column might represent volume.

Field groupInformation to preserve
PriceClose, trade, mark, index or another series
VolumeBase units, quote value or contracts
TimeUnit, timezone and opening/ending meaning
Missing valuesOriginal marker and handling rule
CoverageMissing periods and unfinished observations
DuplicatesActual key and reason for retaining/removing

Rolling and cumulative volumes cannot simply be summed

A twenty-four-hour volume value observed each hour is not the volume of that hour. Adding twenty-four overlapping windows counts many trades repeatedly. Identify whether the field is rolling, cumulative since an anchor or an independent period value.

In a hypothetical cumulative sequence of 100, 250 and 400 within one session, final total is 400. Incremental differences are 100, 150 and 150 if zero is the valid starting baseline. If a counter resets between rows, a negative difference is not automatically negative trading volume. Detect the reset before differencing.

Multiplying total base volume by closing price also does not generally recover precise quote turnover when trades used multiple prices. Use a documented quote-value field where available or clearly label the conversion as an approximation.

Check four: merge using a key that identifies the observation

Timestamp alone is not unique in a dataset containing several markets or timeframes. Two rows at 10:00 can belong to different pairs and both be valid. A suitable key can require market identity, timeframe, timestamp and value type. Keep conflicting rows for investigation when keys match but values differ.

Sort chronologically before calculating successive changes and verify direction. In an illustrative series 100, 110, 99, consecutive returns are +10% and −10%, while the overall change is −1%. That small check exposes reversed comparisons and incorrect addition of returns.

When combining smaller bars, take first open, maximum high, minimum low and final close, and sum compatible independent volumes. Multiply return factors or compare endpoints rather than summing simple returns. Confirm exact window coverage, not merely a convenient number of adjacent rows.

Validate the result and keep its limits visible

Compare selected dates with the original source, including the start, end, a volatile period and a known gap. Recalculate a small example manually before applying the formula to thousands of rows. If processing changes the result, identify the responsible step and why it fits the intended question.

Use the watchlist to retain market identity and the candle-boundary guide for interval alignment. A reviewed dataset combines described values, explicit timing and repeatable processing. Its analysis remains conditional on that coverage and methodology rather than guaranteeing execution or future returns.

Continue reading

English content and examples reviewed: 27 October 2026. Read the Arabic edition.

تامر طعمه
تامر طعمه
Articles: 484