minute-analysis
What it does
This skill fetches short-interval price candles, such as 1-minute or 5-minute bars, and runs intraday tests on them. It is for traders who work within a single trading day.
When to use it
- ✓When you want to look at 5-minute or 1-hour price bars for a crypto coin or stock.
- ✓When you want to test an intraday strategy on past minute data.
- ✓When you need intraday measures such as VWAP or TWAP for a trade.
Skill link
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/minute-analysis/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Pull the last two weeks of 5-minute Bitcoin candles and test a simple strategy.”
5 new skills a week. 1 minute to read.
How it works
It downloads candles from a data source and calculates intraday indicators such as VWAP. Those candles can also feed the backtest engine when you set a short interval in the config.
Technical content (original SKILL.md)
Original text by the author, straight from GitHub.
Minute-Level Data Analysis and Backtesting
Purpose
Retrieve minute-level candlestick data through data-source APIs and calculate intraday indicators (VWAP, TWAP, volume distribution, and more).
Supports minute-level backtesting: set "interval": "5m" in config.json and use the backtest tool to run intraday strategies.
Backtest Configuration
For minute-level backtests, simply add the interval field in config.json:
{
"source": "okx",
"codes": ["BTC-USDT"],
"start_date": "2026-03-01",
"end_date": "2026-03-15",
"interval": "5m",
"initial_cash": 1000000,
"commission": 0.0005
}
- The annualization factor is inferred automatically from
source + interval(OKX 5m = 365 x 288 = 105120) - Minute-level datasets are large. Recommended time limits: no more than 7 days for
1m, no more than 30 days for5m, and no more than 1 year for1H
Supported Data Sources and Intervals
| Data Source | Supported Intervals | Notes |
|---|---|---|
| OKX | 1m/5m/15m/30m/1H/4H | Cryptocurrency, trades 7x24 |
| Tushare | 1m/5m/15m/30m/1H | China A-shares, requires score >= 2000 |
| yfinance | 1m/5m/15m/30m/1H | Hong Kong / US equities (free, no key required) |
OKX Minute Candlestick API
import requests
import pandas as pd
resp = requests.get("https://www.okx.com/api/v5/market/candles", params={
"instId": "BTC-USDT",
"bar": "1m", # 1m/5m/15m/30m/1H/4H
"limit": "300", # At most 300 rows per request
})
data = resp.json()["data"]
columns = ["ts", "open", "high", "low", "close", "vol", "volCcy", "volCcyQuote", "confirm"]
df = pd.DataFrame(reversed(data), columns=columns)
df["ts"] = pd.to_datetime(df["ts"].astype("int64"), unit="ms")
for col in ["open", "high", "low", "close", "vol"]:
df[col] = df[col].astype(float)
Indicator Calculation Templates
VWAP (Volume-Weighted Average Price)
typical_price = (df["high"] + df["low"] + df["close"]) / 3
df["vwap"] = (typical_price * df["vol"]).cumsum() / df["vol"].cumsum()
TWAP (Time-Weighted Average Price)
df["twap"] = df["close"].expanding().mean()
Volume Distribution
df["vol_pct"] = df["vol"] / df["vol"].sum() * 100
hourly_vol = df.set_index("ts").resample("1h")["vol"].sum()
Parameters
| Parameter | Description |
|---|---|
| inst_id | Trading pair, such as "BTC-USDT" |
| bar / interval | Candlestick interval: 1m/5m/15m/30m/1H/4H |
| limit | Number of records to retrieve (OKX returns at most 300 per request) |
Common Pitfalls
- OKX returns at most 300 rows per request. The loader paginates automatically, but
1mdatasets are still very large - The time range for minute-level backtests should not be too long, otherwise both data retrieval and backtesting will become slow or time out
- Tushare minute endpoints require a score >= 2000. If the score is insufficient, the API returns empty data
- Timestamps are Unix timestamps in milliseconds and should be converted with
unit="ms" - Transaction costs for minute strategies should be set lower (for example 0.05% instead of 0.1%) because intraday trading is frequent
Dependencies
pip install pandas numpy requests
FAQ
Which data sources does it support?
It supports OKX for crypto, Tushare for China A-shares, and yfinance for Hong Kong and US stocks.
Are there limits on how much data I can request?
Yes. The skill suggests up to 7 days for 1-minute data and up to 30 days for 5-minute data.
Does it need an API key?
OKX and yfinance need no key. Tushare requires an account with a score of at least 2000.
Details
Original description by the author
Minute-level data analysis and backtesting. Retrieves minute candlesticks through OKX/Tushare/yfinance and can be used both for analysis and as input to the backtest engine.
repo: HKUDS/Vibe-Trading
Popularity
- GitHub stars
- 37k
- Ranking position
- #7532
- License
- MIT
- Updated
- 11/1/2026
Comments
- …
More skills from this repository
vibe-trading
37kGives your agent a full finance research toolkit, covering backtests, factor analysis, options pricing and market data across many markets.
adr-hshare
37kShows your agent how to compare the price of a Chinese company listed in several markets, such as a US ADR and a Hong Kong share.
akshare
37kLets your agent pull free market data for Chinese and global stocks, futures, forex and economic indicators, with no API key needed.
alpha-zoo
37kLets your agent browse a library of ready-made stock factors and test how well a whole set of them predicts returns on a chosen market.
Similar skills
gitcrawl
394kLets your agent search a saved archive of GitHub issues and pull requests, group duplicates, and check their current status on GitHub.
slacrawl
394kLets your agent search and count messages in a local Slack archive, check how fresh that archive is, and refresh it when needed.
goplaces
394kHelps your agent search for places, get their details and reviews, and resolve place names using Google Places, with JSON output for scripts.