Flat-File Access with AWS CLI
The fastest way to validate your flat-file access is to export the temporary credentials from the dashboard and run standard `aws s3` commands against the R2 endpoint.
1. Export The Credentials
export AWS_ACCESS_KEY_ID="<TEMP_ACCESS_KEY_ID>"
export AWS_SECRET_ACCESS_KEY="<TEMP_SECRET_ACCESS_KEY>"
export AWS_SESSION_TOKEN="<TEMP_SESSION_TOKEN>"
export CHD_BUCKET="cryptohftdata-processed"
export CHD_ENDPOINT="https://e5de051a8af1332b58a11bd5b2e40258.r2.cloudflarestorage.com"2. List The Bucket
This confirms that the temporary credentials, endpoint, and session token are all accepted by the R2 S3-compatible API.
aws s3 ls "s3://$CHD_BUCKET/binance_spot/" \
--endpoint-url "$CHD_ENDPOINT" \
--region auto3. Download A Known Object
aws s3 cp "s3://$CHD_BUCKET/binance_spot/2025-08-01/20/BTCUSDT_trades.parquet" ./BTCUSDT_trades.parquet \
--endpoint-url "$CHD_ENDPOINT" \
--region auto4. Download All Data For One Date
Object keys follow the pattern {exchange}/{YYYY-MM-DD}/{HH}/{symbol}_{data_type}.parquet. To pull every hour for one exchange on one date, copy that date prefix recursively.
Parquet files carry ZSTD compression inside the file, so they open directly in pandas, Polars, or DuckDB with no separate decompression step. Objects collected before 19 August 2026 are stored under a .parquet.zst key instead and need zstd -d first. S3 access reads the bucket directly, so the key has to match exactly; the /download API accepts either spelling for any date.
aws s3 cp "s3://$CHD_BUCKET/binance_spot/2025-08-01/" ./binance_spot_2025-08-01/ \
--recursive \
--endpoint-url "$CHD_ENDPOINT" \
--region autoRequired Parameters
Keep `--endpoint-url` pointed at your account-specific R2 endpoint and keep `--region auto`. Both are required for standard AWS tooling to work correctly against R2.