Usage Disclaimer & Risk Disclosure

Please read the following carefully before proceeding

Technical Principles

This project uses AI deep learning models to predict K-line (candlestick) price trends. The core pipeline includes:

① GAF (Gramian Angular Field) Transform — Converts time-series OHLC data into polar angular fields, generating 12-channel multi-timeframe GASF feature tensors;

② Transformer Inference — A Kline-detector Transformer model encodes GAF features, outputting DCT frequency coefficients and a 128-dim feature vector to capture the trend skeleton;

③ DDPM Diffusion Model — A conditional UNet performs 1000-step reverse diffusion sampling, synthesizing complete OHLC prediction residuals on top of the Transformer trend skeleton.

All model inference runs locally in the browser or Node.js environment — no remote server data transmission is involved. Predictions are generated entirely by AI models based on historical data patterns and do not represent any real market signals.

Risk Warnings

⚠ AI Hallucination Risk: Deep learning models may produce "hallucinated" predictions that deviate entirely from actual market trends, especially when data distribution shifts from the training set;

⚠ Market Unpredictability: Financial markets are influenced by macroeconomics, policy changes, and black-swan events — no AI model can guarantee prediction accuracy;

⚠ Data Quality Dependency: Predictions are highly dependent on input data quality. Screenshot recognition may introduce errors; real-time data may have latency or gaps;

⚠ Overfitting Risk: Strong performance on training data does not imply predictive capability for future trends. Historical backtest results do not guarantee future returns;

⚠ Technical Limitations: Kline-detector models use fixed parameters for inference and cannot adapt to structural market changes in real time. They lack self-learning and online update capabilities.

Disclaimer of Liability

This project is a technical research and learning tool only. All predictions provided are for reference and technical demonstration purposes.

This project does not constitute investment advice, financial guidance, or trading recommendations of any kind. The authors and contributors bear no responsibility for any investment decisions made based on the outputs of this project.

Users assume all risks and consequences of their trading decisions. The authors and contributors shall not be liable for any direct or indirect losses arising from the use of this project, including but not limited to financial losses, opportunity costs, or data loss.

Please consult a licensed professional financial advisor before making any investment decisions, and rely on analysis and advice from legitimate financial institutions.

Open Source

This project is open-source software hosted on GitHub:

https://github.com/lin7c/kline-de-pre

You are welcome to review the source code, submit issues, or contribute. This project is released under an open-source license — users may freely use, modify, and distribute the code while retaining original copyright notices and license terms.

Scroll to read full content
MCP · Model Context Protocol

Use in Claude Code
K-line AI Prediction

MCP (Model Context Protocol) lets AI assistants call external tools directly. Our K-line MCP Server enables Claude Code to fetch OHLC data from 40+ global exchanges and run Lainteches AI volatility & scenario forecasts (future volatility range + sampled candle scenarios, not up/down direction). Works with Claude Code, Cursor, Claude Desktop, Continue, Zed, Codex, and all MCP-compatible clients.

1. Sign Up on Laintas

Go to laintas.com, register and log in. Inference costs $1/use. Recharge in Settings page first.

2. Get Session Token

Sign in to Kline and use the command below; the page generates MCP configuration from the current product session.

3. Download MCP Server

Copy the mcp-server/ folder anywhere, or git clone it. Zero dependencies, Node.js ≥18 required.

4. Configure Claude Code

Add the config below to your project's .mcp.json (or ~/.claude/.mcp.json). Replace your_token_here with your session token.

5. Start Using

Restart Claude Code, then try: get BTC/USDT 1m klines from okx → infer this OHLC data for BTC/USDT.

One-Click Install · Copy & run in terminal

Logged in as undefined — token auto-injected. Just copy & run.

mkdir -p ~/.claude/mcp-servers && \
git clone --depth 1 https://github.com/lin7c/Kline_de_pre_MCP.git \
  ~/.claude/mcp-servers/kline-fetcher && \
claude mcp add kline-fetcher \
  --env LAINTECHES_SESSION="laintas-v2.session_token=YOUR_TOKEN" \
  -- node ~/.claude/mcp-servers/kline-fetcher/index.js

Code installed to ~/.claude/mcp-servers/kline-fetcher. To uninstall: claude mcp remove kline-fetcher && rm -rf ~/.claude/mcp-servers/kline-fetcher

Manual Config (Optional)

If you prefer not to use claude mcp add, manually add the config below to .mcp.json (project) or ~/.claude/.mcp.json (global).

{
  "mcpServers": {
    "kline-fetcher": {
      "command": "node",
      "args": ["path/to/mcp-server/index.js"],
      "env": {
        "LAINTECHES_SESSION": "laintas-v2.session_token=your_token_here"
      }
    }
  }
}

Pricing

ToolPriceNote
get_klinesFreeFetch global market OHLC data
infer_ohlc$1HAR volatility + generator scenario forecast

$10 gives you 10 AI predictions. No subscription, pay per use.

Recharge now

FAQ

What is MCP?

MCP (Model Context Protocol) is an open protocol by Anthropic that lets AI assistants like Claude Code securely call external tools and services via JSON-RPC over stdio — no network ports needed.

Which AI tools?

Any MCP-compatible client: Claude Code, Cursor, Claude Desktop, Continue.dev, Zed, Codex (OpenAI). Identical config format across all.

Where does the data come from?

Crypto: OKX / Kraken / KuCoin / Coinbase public APIs. Stocks/ETFs/indices: Yahoo Finance, East Money (A-shares). All free, no API key required.

Which markets?

40+ exchanges: US, HK, China A, Japan, Korea, UK, Germany, France, India, Taiwan, Australia stocks, plus major crypto and global indices.

GitHub Repo & Source