Market Summary Response
The /v1/summary endpoint returns a pre-computed, rule-based bias score and a plain-English summary — ready to pass directly into your LLM's system context.
{
"success": true,
"data": {
"symbol": "EURUSD",
"timeframe": "H1",
"bias": "bullish",
"bias_strength": "strong",
"confidence": 0.82,
"trend_score": 2.4,
"momentum_score": 1.8,
"volatility_score": 3.1,
"signals": { "trend": "bullish", "momentum": "bullish",
"volatility": "neutral", "volume": "neutral" },
"key_levels": { "resistance": [1.0860], "support": [1.0820] },
"bullish_signals": ["Price above SMA_50", "MACD histogram positive"],
"bearish_signals": [],
"neutral_signals": ["RSI_14 in mid-range"],
"summary": "EURUSD is above its 20-period average with MACD histogram expanding.",
"recommendations": ["Trend-following entries favoured while price holds above support"],
"updated_at": 1711548000
}
}
Full Agent Pattern
Tool-use loop: the LLM decides which TickAtlas endpoint to call, you execute the HTTP request, feed the JSON back as a tool_result, repeat until the agent has enough context to answer.
import anthropic, requests
client = anthropic.Anthropic()
KEY = "YOUR_API_KEY"
TOOLS = [{
"name": "get_summary",
"description": "Live rule-based market bias + summary text for a symbol/timeframe.",
"input_schema": {
"type": "object",
"properties": {
"symbol": {"type": "string"},
"timeframe": {"type": "string"},
},
"required": ["symbol", "timeframe"],
},
}]
def run_tool(name, args):
if name == "get_summary":
return requests.get(
"https://tickatlas.com/v1/summary",
headers={"X-API-Key": KEY},
params=args,
).json()
return {"error": "unknown tool"}
msgs = [{"role": "user", "content": "Analyze XAUUSD on H4."}]
while True:
r = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
tools=TOOLS,
messages=msgs,
)
if r.stop_reason != "tool_use":
print(r.content[0].text)
break
block = next(b for b in r.content if b.type == "tool_use")
result = run_tool(block.name, block.input)
msgs += [
{"role": "assistant", "content": r.content},
{"role": "user", "content": [{
"type": "tool_result",
"tool_use_id": block.id,
"content": str(result),
}]},
]