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| 2 |
+
license: mit
|
| 3 |
+
task_categories:
|
| 4 |
+
- time-series-forecasting
|
| 5 |
+
language:
|
| 6 |
+
- en
|
| 7 |
+
tags:
|
| 8 |
+
- tsfile
|
| 9 |
+
- timeseries
|
| 10 |
+
- time-series
|
| 11 |
+
pretty_name: Crypto Trading Bot Data (TsFile)
|
| 12 |
+
configs:
|
| 13 |
+
- config_name: default
|
| 14 |
+
data_files:
|
| 15 |
+
- split: btc_dominance
|
| 16 |
+
path: btc_dominance.tsfile
|
| 17 |
+
- split: fear_greed
|
| 18 |
+
path: fear_greed.tsfile
|
| 19 |
+
- split: features_d
|
| 20 |
+
path: features_d.tsfile
|
| 21 |
+
- split: funding_rates
|
| 22 |
+
path: funding_rates.tsfile
|
| 23 |
+
- split: klines_1h
|
| 24 |
+
path: klines_1h.tsfile
|
| 25 |
+
- split: macro_indicators
|
| 26 |
+
path: macro_indicators.tsfile
|
| 27 |
+
- split: ohlcv_1
|
| 28 |
+
path: ohlcv_1.tsfile
|
| 29 |
+
- split: ohlcv_1m_1
|
| 30 |
+
path: ohlcv_1m_1.tsfile
|
| 31 |
+
- split: ohlcv_1m_10
|
| 32 |
+
path: ohlcv_1m_10.tsfile
|
| 33 |
+
- split: ohlcv_1m_11
|
| 34 |
+
path: ohlcv_1m_11.tsfile
|
| 35 |
+
- split: ohlcv_1m_12
|
| 36 |
+
path: ohlcv_1m_12.tsfile
|
| 37 |
+
- split: ohlcv_1m_13
|
| 38 |
+
path: ohlcv_1m_13.tsfile
|
| 39 |
+
- split: ohlcv_1m_14
|
| 40 |
+
path: ohlcv_1m_14.tsfile
|
| 41 |
+
- split: ohlcv_1m_15
|
| 42 |
+
path: ohlcv_1m_15.tsfile
|
| 43 |
+
- split: ohlcv_1m_16
|
| 44 |
+
path: ohlcv_1m_16.tsfile
|
| 45 |
+
- split: ohlcv_1m_17
|
| 46 |
+
path: ohlcv_1m_17.tsfile
|
| 47 |
+
- split: ohlcv_1m_18
|
| 48 |
+
path: ohlcv_1m_18.tsfile
|
| 49 |
+
- split: ohlcv_1m_19
|
| 50 |
+
path: ohlcv_1m_19.tsfile
|
| 51 |
+
- split: ohlcv_1m_2
|
| 52 |
+
path: ohlcv_1m_2.tsfile
|
| 53 |
+
- split: ohlcv_1m_20
|
| 54 |
+
path: ohlcv_1m_20.tsfile
|
| 55 |
+
- split: ohlcv_1m_21
|
| 56 |
+
path: ohlcv_1m_21.tsfile
|
| 57 |
+
- split: ohlcv_1m_22
|
| 58 |
+
path: ohlcv_1m_22.tsfile
|
| 59 |
+
- split: ohlcv_1m_23
|
| 60 |
+
path: ohlcv_1m_23.tsfile
|
| 61 |
+
- split: ohlcv_1m_24
|
| 62 |
+
path: ohlcv_1m_24.tsfile
|
| 63 |
+
- split: ohlcv_1m_25
|
| 64 |
+
path: ohlcv_1m_25.tsfile
|
| 65 |
+
- split: ohlcv_1m_3
|
| 66 |
+
path: ohlcv_1m_3.tsfile
|
| 67 |
+
- split: ohlcv_1m_4
|
| 68 |
+
path: ohlcv_1m_4.tsfile
|
| 69 |
+
- split: ohlcv_1m_5
|
| 70 |
+
path: ohlcv_1m_5.tsfile
|
| 71 |
+
- split: ohlcv_1m_6
|
| 72 |
+
path: ohlcv_1m_6.tsfile
|
| 73 |
+
- split: ohlcv_1m_7
|
| 74 |
+
path: ohlcv_1m_7.tsfile
|
| 75 |
+
- split: ohlcv_1m_8
|
| 76 |
+
path: ohlcv_1m_8.tsfile
|
| 77 |
+
- split: ohlcv_1m_9
|
| 78 |
+
path: ohlcv_1m_9.tsfile
|
| 79 |
+
- split: ohlcv_2
|
| 80 |
+
path: ohlcv_2.tsfile
|
| 81 |
+
- split: ohlcv_3
|
| 82 |
+
path: ohlcv_3.tsfile
|
| 83 |
+
- split: ohlcv_4
|
| 84 |
+
path: ohlcv_4.tsfile
|
| 85 |
+
- split: ohlcv_5
|
| 86 |
+
path: ohlcv_5.tsfile
|
| 87 |
+
- split: open_interest
|
| 88 |
+
path: open_interest.tsfile
|
| 89 |
+
---
|
| 90 |
+
|
| 91 |
+
# Crypto Trading Bot Data (TsFile)
|
| 92 |
+
|
| 93 |
+
Apache TsFile version of [`jponfiru/crypto-trading-bot-data`](https://huggingface.co/datasets/jponfiru/crypto-trading-bot-data).
|
| 94 |
+
|
| 95 |
+
## Overview
|
| 96 |
+
|
| 97 |
+
OHLCV market data and derived features for a Binance spot trading bot: 1-minute klines for the top-20 USDT pairs (2024 onward), 5-minute klines for 2026, 1-hour klines, funding rates, open interest, macro indicators, the Fear & Greed index, BTC dominance, and a labelled feature table for the project's Model D.
|
| 98 |
+
|
| 99 |
+
- **TsFile shards:** 37 (1054.2 MB total, 29,706,465 rows across 9 table(s)).
|
| 100 |
+
- `btc_dominance` — 6 rows in 1 shard(s), 2026-05-18 01:06:09.359000 → 2026-05-21 12:34:43.211000 (UTC)
|
| 101 |
+
- `fear_greed` — 3,028 rows in 1 shard(s), 2018-02-01 00:00:00 → 2026-05-21 00:00:00 (UTC)
|
| 102 |
+
- `features_d` — 219,043 rows in 1 shard(s), 2024-01-09 08:00:00 → 2026-05-10 14:00:00 (UTC)
|
| 103 |
+
- `funding_rates` — 57,360 rows in 1 shard(s), 2024-01-01 00:00:00 → 2026-05-21 12:00:00 (UTC)
|
| 104 |
+
- `klines_1h` — 383,190 rows in 1 shard(s), 2024-01-01 00:00:00 → 2026-05-11 15:00:00 (UTC)
|
| 105 |
+
- `macro_indicators` — 54 rows in 1 shard(s), 2026-05-11 04:00:00 → 2026-05-21 07:00:00 (UTC)
|
| 106 |
+
- `ohlcv` — 4,610,042 rows in 5 shard(s), 2024-01-01 00:00:00 → 2026-05-14 03:00:00 (UTC)
|
| 107 |
+
- `ohlcv_1m` — 24,432,100 rows in 25 shard(s), 2024-01-01 00:00:00 → 2026-05-21 12:34:00 (UTC)
|
| 108 |
+
- `open_interest` — 1,642 rows in 1 shard(s), 2026-05-18 02:00:00 → 2026-05-21 12:00:00 (UTC)
|
| 109 |
+
|
| 110 |
+
## Conversion notes
|
| 111 |
+
|
| 112 |
+
- The source stores its series inside two SQLite databases; TsFile cannot read SQLite, so every table is streamed out of its database into a TsFile table of its own. Table list, row counts and skipped tables are recorded in `conversion_summary.json`.
|
| 113 |
+
- Tables with a `pair` (or `symbol`) column — `ohlcv_1m`, `ohlcv`, `klines_1h`, `funding_rates`, `open_interest`, `macro_indicators` and `features_d` — declare it as the TAG, so each instrument is one TsFile device with its own timeline; `fear_greed` and `btc_dominance` are single-device tables.
|
| 114 |
+
- Time = the source timestamp column at millisecond precision: `ts_ms` is already epoch milliseconds, `ts` is epoch seconds, and `ohlcv.timestamp` is an ISO-8601 string.
|
| 115 |
+
- No column and no row is dropped. `ohlcv_1m` (2024 onward) and `ohlcv` (2026) overlap; both are kept as separate tables rather than merged, and no duplicate key is removed because the two tables cover different timeframes.
|
| 116 |
+
- Not converted: `download_state (data_2026.db), download_progress (data_extended.db)` — bookkeeping tables recording the crawler's own progress, not time series.
|
| 117 |
+
- Not converted: `features_extended.csv` — 2.1 GB CSV of event features that was not downloaded for this conversion; the compact `features_d.csv` subset (219,043 rows) is included instead.
|
| 118 |
+
- The TsFiles are written with the `zstd` compressor. The Apache TsFile **Java** SDK reads every compressor, but the **Python** SDK (`pip install tsfile`) implements only `UNCOMPRESSED`, `SNAPPY`, `GZIP` and `LZ4`; opening these files with it returns no rows. Read them with the Java SDK, as shown below.
|
| 119 |
+
|
| 120 |
+
## Usage
|
| 121 |
+
|
| 122 |
+
> **Read this dataset with the Java SDK.** It is written with the `zstd` compressor. The Apache TsFile Java SDK reads every compressor, but the Python SDK (`pip install tsfile`) implements only `UNCOMPRESSED`, `SNAPPY`, `GZIP` and `LZ4`; opening this file with it yields no rows.
|
| 123 |
+
|
| 124 |
+
Read a converted file with the Apache TsFile Java SDK (`org.apache.tsfile:tsfile`):
|
| 125 |
+
|
| 126 |
+
```java
|
| 127 |
+
import org.apache.tsfile.file.metadata.IDeviceID;
|
| 128 |
+
import org.apache.tsfile.read.TsFileReader;
|
| 129 |
+
import org.apache.tsfile.read.TsFileSequenceReader;
|
| 130 |
+
import org.apache.tsfile.read.common.Path;
|
| 131 |
+
import org.apache.tsfile.read.expression.QueryExpression;
|
| 132 |
+
import org.apache.tsfile.read.query.dataset.QueryDataSet;
|
| 133 |
+
import org.apache.tsfile.write.schema.MeasurementSchema;
|
| 134 |
+
|
| 135 |
+
import java.util.ArrayList;
|
| 136 |
+
import java.util.List;
|
| 137 |
+
|
| 138 |
+
String path = "btc_dominance.tsfile";
|
| 139 |
+
try (TsFileReader reader = new TsFileReader(new TsFileSequenceReader(path))) {
|
| 140 |
+
for (String deviceId : reader.getAllDeviceIds()) {
|
| 141 |
+
IDeviceID device = IDeviceID.Factory.DEFAULT_FACTORY.create(deviceId);
|
| 142 |
+
List<Path> paths = new ArrayList<>();
|
| 143 |
+
for (MeasurementSchema schema : reader.getMeasurement(device)) {
|
| 144 |
+
String name = schema.getMeasurementName();
|
| 145 |
+
if (name != null && !name.isEmpty() && !name.equalsIgnoreCase("Time")) {
|
| 146 |
+
paths.add(new Path(device, name, true));
|
| 147 |
+
}
|
| 148 |
+
}
|
| 149 |
+
QueryDataSet dataSet = reader.query(QueryExpression.create(paths, null));
|
| 150 |
+
while (dataSet.hasNext()) {
|
| 151 |
+
System.out.println(dataSet.next());
|
| 152 |
+
}
|
| 153 |
+
}
|
| 154 |
+
}
|
| 155 |
+
```
|
| 156 |
+
|
| 157 |
+
## Source & license
|
| 158 |
+
|
| 159 |
+
- Original dataset: [`jponfiru/crypto-trading-bot-data`](https://huggingface.co/datasets/jponfiru/crypto-trading-bot-data)
|
| 160 |
+
- License: mit (as declared by the original dataset).
|