Kronos: BTC/USDT Price Forecast API
This Space provides an API for probabilistic BTC/USDT price forecasting using the Kronos foundation model.
Quick Start (Python)
from gradio_client import Client
client = Client("xianqiu/tslm")
# Fast API call (no plot, recommended)
result = client.predict(align_to_hour=True, api_name="/predict_api")
print(result)
# With plot (slower)
plot, result = client.predict(align_to_hour=True, api_name="/predict")
API Endpoints
/predict_api- Recommended: JSON-only response (faster, no plot)/predict- With plot (for visualization)/predict_custom- Custom OHLCV data prediction
Data Mode
- Hourly Aligned (default): Uses data up to the last completed hour, matching the official Kronos demo
- Realtime: Uses all available data including the current incomplete hour
Generate 24-hour BTC/USDT price forecast.
Data Mode:
- Hourly Aligned: Use data up to last completed hour (matches official demo for comparison)
- Realtime: Use all available data including current incomplete hour
If checked, excludes current incomplete hour for consistency with official demo
Fast API endpoint - Returns JSON only, no plot generation.
Use this for programmatic access when you don't need the chart.
Provide your own OHLCV data for prediction.
Input Format:
{
"timestamps": ["2024-01-01T00:00:00", "2024-01-01T01:00:00", ...],
"open": [100.0, 101.0, ...],
"high": [101.0, 102.0, ...],
"low": [99.0, 100.0, ...],
"close": [100.5, 101.5, ...],
"volume": [1000.0, 1100.0, ...],
"amount": [100000.0, 110000.0, ...]
}
1 48
1 100
0.1 2
0.1 1
Model: Kronos-mini (4.1M params) | Paper: arXiv:2508.02739