klines-gateio
收藏资源简介:
Gate.io USDT OHLCV K线数据集是一个用于时间序列预测的金融数据集,专注于加密货币市场。它提供了 Gate.io 交易所上 USDT 计价市场的历史 OHLCV(开盘价、最高价、最低价、收盘价、成交量)K线数据,以 zstd 压缩的 Parquet 格式存储。数据集覆盖约 3,300 个现货 USDT 交易对,历史数据可追溯至 2013 年(针对最早上市的交易对),并包含期货市场(U本位永续合约)的数据,但期货历史较短(仅约 180 天)。时间帧包括 5分钟、15分钟、1小时、4小时和1日(所有交易对),以及1分钟(适用于约 1,300 个交易对的子集)。数据按市场(spot 或 futures)、时间帧和交易对组织为独立的 Parquet 文件,每个文件包含以下列:date(UTC 时间戳)、open、high、low、close(均为浮点数价格)和 volume(浮点数成交量)。该数据集适用于加密货币价格预测、量化交易回测、市场分析等研究任务。数据为静态快照(截至约2025年5月),计划定期更新,初始数据源来自 DigiTuccar 的 HistoricalDataForTradeBacktest 快照。使用需注意:数据集查看器被禁用,需直接加载文件;时间戳为 UTC;数据按原样提供,不保证准确性或完整性。
The Gate.io USDT OHLCV K-line dataset is a financial dataset for time series forecasting, focusing on the cryptocurrency market. It provides historical OHLCV (Open, High, Low, Close, Volume) K-line data for USDT-denominated markets on the Gate.io exchange, stored in zstd-compressed Parquet format. The dataset covers approximately 3,300 spot USDT trading pairs, with historical data dating back to 2013 (for the earliest listed pairs), and includes futures market (USDT-margined perpetual contracts) data, though the futures history is shorter (only about 180 days). Timeframes include 5-minute, 15-minute, 1-hour, 4-hour, and 1-day (for all trading pairs), as well as 1-minute (for a subset of about 1,300 pairs). Data is organized into separate Parquet files by market (spot or futures), timeframe, and trading pair, with each file containing the following columns: date (UTC timestamp), open, high, low, close (all floating-point prices), and volume (floating-point volume). This dataset is suitable for research tasks such as cryptocurrency price prediction, quantitative trading backtesting, and market analysis. The data is a static snapshot (as of approximately May 2025) with plans for regular updates, and the initial data source is from DigiTuccars HistoricalDataForTradeBacktest snapshot. Usage notes: the dataset viewer is disabled, requiring direct file loading; timestamps are in UTC; data is provided as-is, with no guarantees of accuracy or completeness.
数据集概述:Gate.io USDT OHLCV Klines
- 许可证:MIT
- 任务类别:时间序列预测
- 语言:英语
- 标签:加密货币、金融、OHLCV、K线、Gate.io、交易
- 数据集名称:Gate.io USDT OHLCV Klines
- 数据集大小:10亿至100亿条记录
数据覆盖范围
| 属性 | 详情 |
|---|---|
| 交易所 | Gate.io |
| 市场 | 现货(主要)、期货(USDT永续合约,历史有限) |
| 时间周期 | 5分钟、15分钟、1小时、4小时、1天(所有交易对);约1300个交易对额外提供1分钟 |
| 交易对数量 | 约3300个现货USDT交易对 |
| 历史数据 | 最早可追溯至2013年(针对最早上线交易对) |
| 数据截止时间 | 静态快照(约2025年5月);计划定期更新 |
| 数据来源 | 源自 DigiTuccar 的 HistoricalDataForTradeBacktest 快照 |
文件结构
数据以 zstd 压缩的 Parquet 格式存储,目录结构如下:
{market}/{timeframe}/{PAIR}.parquet
- 示例:
spot/1d/BTC_USDT.parquetspot/5m/ETH_USDT.parquet
每个 Parquet 文件包含一个交易对在一个时间周期内的数据,列字段如下:
| 列名 | 类型 | 描述 |
|---|---|---|
date |
datetime (UTC) | K线开盘时间 |
open |
float | 开盘价 |
high |
float | 最高价 |
low |
float | 最低价 |
close |
float | 收盘价 |
volume |
float | 基础资产成交量 |
使用方式
加载单个文件: python from huggingface_hub import hf_hub_download import pandas as pd
path = hf_hub_download("rogerdehe/klines-gateio", "spot/1d/BTC_USDT.parquet", repo_type="dataset") df = pd.read_parquet(path)
下载子集或全部数据: python from huggingface_hub import snapshot_download snapshot_download("rogerdehe/klines-gateio", repo_type="dataset", allow_patterns=["spot/1d/*"]) # 例如仅下载日线现货数据
注意事项
- 期货历史数据有限:Gate.io API 在快照时仅提供约180天的历史,因此
futures/目录数据量较少,如需深度历史请使用现货数据。 - 1分钟周期:仅对约1300个交易对可用,其他周期覆盖全部交易对。
- 数据集查看器已禁用:因采用自定义的每交易对文件布局,无法通过 Hugging Face 数据集查看器浏览,需按上述方法直接加载文件。
- 时间戳:均为UTC时间。
- 数据用途:按原样提供,仅用于研究目的,不保证准确性或完整性。




