Automated collector for Apex DEX (ApeX Omni) historical perpetual swap candles, published as immutable UTC date-tagged GitHub Releases every Sunday.
| Property | Value |
|---|---|
| Exchange | ApeX Omni |
| Markets | All active USDT-margined perpetual swaps exposed by CCXT plus active ApeX stockContract tokenized equities/ETFs |
| Timeframes | 1m · 5m · 15m · 30m · 1h · 2h · 4h · 6h · 12h · 1d · 1w |
| History | ~2024-06-15 to present (varies by asset) |
| Format | Freqtrade feather ({BASE}_{QUOTE}_{SETTLE}-{tf}-futures.feather) |
| Update cadence | Weekly (Sunday 06:00 UTC) |
# Find dated snapshots
gh release list --repo Ankvik-Tech-Labs/Apex-Historical-Data --limit 100
# Download a specific 1h snapshot for all pairs
SNAPSHOT=2026-07-14
gh release download "$SNAPSHOT" \
--pattern "apex-ohlcv-1h.zip" \
--repo Ankvik-Tech-Labs/Apex-Historical-Data
unzip apex-ohlcv-1h.zip -d data/# All timeframes from one snapshot
SNAPSHOT=2026-07-14
for TF in 1m 5m 15m 30m 1h 2h 4h 6h 12h 1d 1w; do
gh release download "$SNAPSHOT" --pattern "apex-ohlcv-${TF}.zip" \
--repo Ankvik-Tech-Labs/Apex-Historical-Data
unzip apex-ohlcv-${TF}.zip -d data/
done# Via curl (no gh CLI needed)
curl -L https://github.com/Ankvik-Tech-Labs/Apex-Historical-Data/releases/download/2026-07-14/apex-ohlcv-1d.zip \
-o apex-ohlcv-1d.zipimport pandas as pd
df = pd.read_feather("BTC_USDT_USDT-1h-futures.feather")
# columns: date (UTC datetime), open, high, low, close, volume
print(df.head())Drop the feathers into your user_data/data/apex/futures/ directory:
unzip apex-ohlcv-1h.zip -d user_data/data/apex/futures/GitHub Actions (weekly)
├── setup — generates shard matrix, snapshot tag, and UTC cutoff
├── ohlcv — parallel matrix jobs by timeframe/shard
│ ├── 1m × 8 shards
│ ├── 5m / 15m × 4 shards
│ ├── 30m / 1h × 2 shards
│ └── 2h / 4h / 6h / 12h / 1d / 1w × 1 shard
├── funding — parallel funding-rate shards
└── publish — validate full-history shards → zip per timeframe → immutable dated release
Each weekly run fetches the full live Apex API history from DATA_GENESIS through one workflow-wide UTC cutoff. The publish step uses the previous dated snapshot only as a validation baseline; it never supplies candle rows for the new release.
The standard CCXT fetchOHLCV with since is unreliable for Apex — the v3/klines endpoint requires both start and end in UNIX seconds, and returns empty when limit > 200. The collector uses publicGetV3Klines directly with explicit sliding windows of 200 × candle_duration seconds.
CCXT's Apex market loader omits ApeX Omni stockContract markets (tokenized equities/ETFs such as AAPL/USDT:USDT, SPY/USDT:USDT, QQQ/USDT:USDT, etc.). The collector explicitly reads /v3/symbols, appends active stockContract entries, and fetches their candles through the same /v3/klines endpoint.
Every release includes manifest.json with machine-readable coverage per asset:
{
"generated": "2026-06-10",
"snapshot_date": "2026-06-10",
"base_snapshot": "2026-06-03",
"exchange": "apex",
"assets": {
"BTC_USDT_USDT": {
"timeframes": {
"1h": { "first": "2024-06-15", "last": "2026-06-10", "candles": 17520 }
}
}
}
}pip install -r requirements.txt
# Full-history snapshot through "now" in UTC
python collector/collect_ohlcv.py --timeframe 1h --until "$(date -u +%s)" --out-dir data/
# Shard 0 of 4 (matches CI matrix)
python collector/collect_ohlcv.py --timeframe 15m --shard 0 --total-shards 4 --until "$(date -u +%s)" --out-dir data/