The Problem: LLMs Cannot Compute RSI
Large language models are not calculators. If you feed an LLM 100 OHLC candles and ask it to calculate the 14-period RSI, it will either hallucinate a number, get the math wrong, or refuse the task entirely. LLMs predict text tokens — they do not perform reliable multi-step arithmetic on arrays of floating-point numbers.
This is not a flaw in the LLM. It is a fundamental property of how transformer models work. The solution is simple: give the LLM pre-calculated values it can reason about, not raw data it needs to process.
Raw Data vs Pre-Processed: A Comparison
Raw OHLC (Bad for LLMs)
[
{"t":"10:00","o":1.0845,"h":1.0862,"l":1.0838,"c":1.0855},
{"t":"11:00","o":1.0855,"h":1.0871,"l":1.0849,"c":1.0867},
{"t":"12:00","o":1.0867,"h":1.0873,"l":1.0841,"c":1.0848},
... (97 more rows)
] The LLM sees 100 rows of numbers it cannot meaningfully process. It will guess at trends.
Pre-Processed (Good for LLMs)
// The payload you assemble from the API numbers before prompting.
// The interpretations are yours — the API returns the numbers only.
{
"RSI_14": {"value": 34.7, "zone": "approaching oversold"},
"MACD_hist": {"value": 0.00013, "reading": "bullish"},
"ADX": {"value": 28.4, "reading": "trending"},
"BB_lower": {"value": 1.0820, "position": "price near lower band"}
} The LLM can immediately reason: "RSI is neutral, MACD is bullish, strong trend, price near support."
Why This Matters for Token Costs
100 OHLC candles encoded as JSON consume approximately 3,000-5,000 tokens. The equivalent pre-calculated indicator summary uses 200-400 tokens. That is a 10x reduction in token usage, which translates directly to 10x lower LLM API costs.
~4,000
Tokens for 100 raw candles
~300
Tokens for indicator summary
13x
Cost reduction
The TickAtlas Approach
The TickAtlas API is designed with LLM consumption in mind. Every indicator endpoint returns pre-calculated values as plain numbers, so the model never has to crunch raw bars:
// GET /v1/indicators?symbol=EURUSD&timeframe=H1
{
"success": true,
"data": {
"symbol": "EURUSD",
"timeframe": "H1",
"indicators": {
"RSI_14": 34.7,
"MACD_main": -0.00023,
"MACD_signal": -0.00031,
"MACD_hist": 0.00008,
"ADX": 28.4,
"ADX_plusDI": 22.1,
"ADX_minusDI": 18.3
},
"updated_at": 1787229614
}
}
Every indicator comes back as a plain number under its real key (for example RSI_14), so the model applies its own thresholds — a relative-strength reading below thirty is oversold.
Best Practices for LLM + Financial API
1. Fetch Indicators, Not Candles
Use the /v1/indicators endpoint instead of /v1/ohlc when the data is for LLM consumption. You save tokens and get better analysis.
2. Request Only What You Need
Do not fetch all 42 indicators when you only need RSI and MACD. Each unnecessary indicator wastes tokens and dilutes the LLM's focus.
3. Include Interpretive Context in the System Prompt
Tell the LLM what RSI values mean, what MACD histogram crossing zero implies, etc. This one-time system prompt cost amortizes across the entire session.
4. Cache Between Turns
If the user asks follow-up questions about the same symbol, reuse the previous API response instead of fetching again. Both APIs and LLMs benefit from caching.
Structuring Data for Tool Use
When defining tools for ChatGPT or Claude, describe what the API returns in the tool description. This helps the LLM understand the response format before it even calls the tool:
{
"name": "get_indicators",
"description": "Fetch technical indicators for a trading pair. Returns JSON with a flat map of indicator name to number (RSI_14 on a 0-100 scale, MACD_hist positive=bullish, ADX above 25=trending). Apply the oversold/overbought thresholds yourself.",
"input_schema": {
"type": "object",
"properties": {
"symbol": {"type": "string"},
"timeframe": {"type": "string", "enum": ["H1", "H4", "D1"]},
"indicators": {"type": "string"}
},
"required": ["symbol", "timeframe", "indicators"]
}
} Real-World Impact
Teams building LLM-powered trading tools report that switching from raw OHLC data to pre-calculated indicators improves analysis quality by 40-60% while reducing LLM API costs by 10x. The LLM spends its tokens on reasoning and explanation rather than on attempting unreliable arithmetic.
Further Reading
Run this against live data.
Every account starts pay-as-you-go with $2.50 of credit and no card. Paste the key into the samples above and the requests work unchanged.