torchtrade commited on
Commit
4afda52
·
verified ·
1 Parent(s): 0e7af6a

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +114 -33
README.md CHANGED
@@ -1,35 +1,116 @@
1
  ---
2
- dataset_info:
3
- features:
4
- - name: timestamp
5
- dtype: timestamp[ms]
6
- - name: open
7
- dtype: float64
8
- - name: high
9
- dtype: float64
10
- - name: low
11
- dtype: float64
12
- - name: close
13
- dtype: float64
14
- - name: volume
15
- dtype: float64
16
- - name: quote_volume
17
- dtype: float64
18
- - name: num_trades
19
- dtype: int64
20
- - name: taker_buy_base_volume
21
- dtype: float64
22
- - name: taker_buy_quote_volume
23
- dtype: float64
24
- splits:
25
- - name: train
26
- num_bytes: 203327360
27
- num_examples: 2541592
28
- download_size: 136104558
29
- dataset_size: 203327360
30
- configs:
31
- - config_name: default
32
- data_files:
33
- - split: train
34
- path: data/train-*
35
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: mit
3
+ task_categories:
4
+ - time-series-forecasting
5
+ - reinforcement-learning
6
+ tags:
7
+ - finance
8
+ - cryptocurrency
9
+ - bitcoin
10
+ - trading
11
+ - ohlcv
12
+ - perpetual-futures
13
+ - derivatives
14
+ - binance
15
+ size_categories:
16
+ - 1M<n<10M
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  ---
18
+
19
+ # BTCUSDT Perpetual Futures 1-Minute OHLCV (1 2021 - Mar 2026)
20
+
21
+ ![Price History](price_history.png)
22
+
23
+ ## Overview
24
+
25
+ 1-minute OHLCV candlestick data for the **BTC/USDT USDT-margined perpetual futures** contract on Binance, covering **May 1, 2021** to **February 28, 2026**.
26
+
27
+ - **Rows**: 2,541,592
28
+ - **Completeness**: ~100% (only 7 single-bar month-boundary gaps from data packaging)
29
+
30
+ ## Why futures OHLCV?
31
+
32
+ Perpetual futures are the most actively traded crypto instruments, with volume typically **3-10x higher** than spot. This dataset provides several signals not available in spot data:
33
+
34
+ - **Futures volume**: Higher liquidity and more representative of actual trading interest
35
+ - **Taker buy/sell ratio**: `taker_buy_base_volume / volume` shows whether aggressive buyers or sellers dominate each candle (>0.5 = buyer-dominated)
36
+ - **Number of trades**: Trade count as a proxy for market activity independent of order size
37
+ - **Quote volume**: Notional value traded, useful for comparing activity across price levels
38
+
39
+ ## Columns
40
+
41
+ | Column | Type | Description |
42
+ |--------|------|-------------|
43
+ | `timestamp` | `datetime64[ns]` | Candle open time (UTC) |
44
+ | `open` | `float64` | Opening price (USDT) |
45
+ | `high` | `float64` | Highest price in the candle |
46
+ | `low` | `float64` | Lowest price in the candle |
47
+ | `close` | `float64` | Closing price (USDT) |
48
+ | `volume` | `float64` | Trading volume (base asset) |
49
+ | `quote_volume` | `float64` | Trading volume (USDT notional) |
50
+ | `num_trades` | `int64` | Number of trades |
51
+ | `taker_buy_base_volume` | `float64` | Taker buy volume (base asset) |
52
+ | `taker_buy_quote_volume` | `float64` | Taker buy volume (USDT notional) |
53
+
54
+ ## Statistics
55
+
56
+ | Metric | Value |
57
+ |--------|-------|
58
+ | Start price | $57,550.00 |
59
+ | End price | $66,937.10 |
60
+ | Min price | $15,502.00 |
61
+ | Max price | $126,086.80 |
62
+ | Return | +16.3% |
63
+ | Avg daily volume | 345,284 BTC |
64
+ | Mean taker buy ratio | 0.4971 |
65
+ | Mean trades/candle | 2,600 |
66
+
67
+ ## Data Quality
68
+
69
+ The only gaps are single missing bars at month boundaries (23:59 -> 00:01, missing the 00:00 candle). This is a Binance data packaging artifact, not actual missing trading data. Completeness is effectively 100%.
70
+
71
+ ## Joining with spot OHLCV
72
+
73
+ This dataset complements the spot OHLCV dataset [`Torch-Trade/btcusdt_spot_1m_05_2021_to_03_2026`](https://huggingface.co/datasets/Torch-Trade/btcusdt_spot_1m_05_2021_to_03_2026). To join at training time:
74
+
75
+ ```python
76
+ from datasets import load_dataset
77
+ import pandas as pd
78
+
79
+ # Load both
80
+ spot = load_dataset("Torch-Trade/btcusdt_spot_1m_05_2021_to_03_2026")["train"].to_pandas()
81
+ spot["timestamp"] = pd.to_datetime(spot["timestamp"])
82
+
83
+ futures = load_dataset("Torch-Trade/btcusdt_perp_1m_05_2021_to_02_2026")["train"].to_pandas()
84
+ futures["timestamp"] = pd.to_datetime(futures["timestamp"])
85
+
86
+ # Merge — rename futures columns to avoid clash
87
+ futures = futures.rename(columns={
88
+ "open": "fut_open", "high": "fut_high", "low": "fut_low", "close": "fut_close",
89
+ "volume": "fut_volume", "quote_volume": "fut_quote_volume",
90
+ "num_trades": "fut_num_trades",
91
+ "taker_buy_base_volume": "fut_taker_buy_volume",
92
+ "taker_buy_quote_volume": "fut_taker_buy_quote_volume",
93
+ })
94
+ df = spot.merge(futures, on="timestamp", how="left")
95
+
96
+ # Derive taker buy ratio
97
+ df["taker_buy_ratio"] = df["fut_taker_buy_volume"] / df["fut_volume"]
98
+ ```
99
+
100
+ ## Usage
101
+
102
+ ```python
103
+ from datasets import load_dataset
104
+ import pandas as pd
105
+
106
+ ds = load_dataset("Torch-Trade/btcusdt_perp_1m_05_2021_to_02_2026")
107
+ df = ds["train"].to_pandas()
108
+ df["timestamp"] = pd.to_datetime(df["timestamp"])
109
+
110
+ print(df.shape) # (2541592, 10)
111
+ print(df.head())
112
+ ```
113
+
114
+ ## License
115
+
116
+ MIT -- data sourced from [Binance Data Collection](https://data.binance.vision/).