DefiTheOdds
Start Free Today
Agent-Ready Market Data

Teach Your Agent to Read the Market

A single documented JSON payload - OHLCV, 20+ indicators, and the Four Horsemen risk & volatility suite - is all an LLM agent needs to reason about an asset and generate a structured trade signal. No scraping, no proprietary black box, every field and its published accuracy on the record.

4
Independent Risk Signals
1
Read-Only API Call
< 200ms
Avg Latency
0
Wallet / Signing Access

How It Works

The same five-step loop whether your agent runs on OpenClaw, LangChain, a custom Claude or GPT tool-use setup, or a cron job with a system prompt.

01

Fetch

Agent calls /v1/hourly/{ticker}/{candles} with its X-API-KEY for the requested asset.

02

Extract

Pull the Four Horsemen fields, future_vol, expansion_probability, and standard TA from the latest candle.

03

Classify

Compare each value against published thresholds to classify risk, regime, and volatility - deterministically, not by vibes.

04

Contextualize

Pull recent high/low range from the last N candles so the move is sized against real recent price action.

05

Report

Agent returns a structured risk read: headline, reasoning citing exact field values, expected move range, disclaimer.

Give Your Agent These Instructions

Paste this into a system prompt, a custom GPT, a Claude Project, or a skill/tool definition. It is framework-agnostic - it just describes the API and the decision logic.

You have access to the DefiTheOdds API for enriched crypto market data - OHLCV candles plus independently-measured risk and volatility signals. Use it whenever asked for a market read, trade signal, or risk assessment on a crypto asset.

BASE URL: https://api.defitheodds.xyz/v1
AUTH HEADER: X-API-KEY: <the user's key>
ENDPOINTS:
  GET /hourly/{ticker}/{candles}   e.g. /hourly/BTC-USD/240
  GET /daily/{ticker}/{candles}    e.g. /daily/BTC-USD/30

WORKFLOW - when asked for a prediction or trade signal:
1. Fetch recent candles (240 hourly is about 10 days, 30 daily is about 1 month) for the requested ticker. Always use live data, never fabricate values.
2. From the most recent candle, read these fields:
   - tail_risk_conf, high_vol_conf, regime_change_conf, regime_emergence_conf (each 0.0-1.0: near 1.0 = high-confidence "yes" for that risk condition, near 0.5 = no edge, near 0.0 = high-confidence "no")
   - future_vol (expected forward daily volatility, decimal, e.g. 0.032 is about 3.2%)
   - expansion_probability (0.0-1.0 probability of an imminent volatility expansion)
   - market_regime_score (0-100 composite regime read, if present)
   - rsi_14, macd_hist, candle (standard TA context)
3. Classify each signal using these thresholds:
   - tail_risk_conf / high_vol_conf / regime_change_conf / regime_emergence_conf: above 0.80 is high confidence, 0.40-0.60 is weak or no edge, below 0.20 is high confidence "no"
   - future_vol: below 2% is low, 2-4% is moderate, above 4% is high
   - expansion_probability: below 0.40 is low (range-bound likely), 0.40-0.60 moderate, 0.60-0.80 elevated, above 0.80 imminent
4. Pull recent price range context (e.g. the last 48 candles' high/low) so the expected move is framed against real recent action.
5. Produce a structured report: a one-line headline, the single most important signal called out explicitly, a risk read (NOT a guaranteed price-direction call), reasoning that cites the exact field values, and an expected-move range.
6. ALWAYS end with: "This analysis is based on ML-derived signals from DefiTheOdds and does not constitute financial advice. Always manage risk and do your own research."

Never describe these fields as a guarantee of price direction - they measure risk and volatility, not which way price goes. If an API call fails, say so and show the error. Do not invent numbers.

Prompts That Trigger It

Once an agent has the instructions above, these are the kinds of things a user can just say to it.

"Give me a BTC market prediction"

Fetches BTC-USD, runs the full workflow, returns the structured report.

"What's the current market regime for ETH?"

Reports market_regime_score plus the Four Horsemen read, interpreted.

"Is a breakout likely this week?"

Checks expansion_probability and regime_change_conf, reports the expansion read.

"Should I widen my stop on SOL?"

Checks future_vol and tail_risk_conf to suggest risk sizing - not a trade call.

"Pull the last 24h of BTC hourly candles"

A raw data fetch with no analysis - the agent knows when to just return the numbers.

Signal Thresholds at a Glance

The exact rules agents use to classify each field. Full definitions and per-asset accuracy live on the docs page.

Four Horsemen confidences

tail_risk_conf, high_vol_conf, regime_change_conf, regime_emergence_conf

  • > 0.80 High confidence "yes"
  • 0.40-0.60 Weak / no edge
  • < 0.20 High confidence "no"

Expansion probability

expansion_probability

  • > 0.80 Imminent move likely
  • 0.60-0.80 Elevated
  • 0.40-0.60 Moderate
  • < 0.40 Range-bound likely

Forward volatility

future_vol

  • > 4% High volatility expected
  • 2-4% Moderate volatility
  • < 2% Low / compressed volatility
Community-Built, Not Ours

A Working Example: The OpenClaw Skill

A community member built and open-sourced a full agent "skill" for OpenClaw that implements exactly this workflow. It's a real, running reference implementation, not a product we maintain.

# Real sample output from the skill's prediction report

Medium-term (Next 5-10 days): High-Volatility Breakout Imminent

Critical Signal: Expansion Probability at 82% - a significant move is primed.

Directional Bias: Bullish Breakout Likely

Reasoning:

1. Regime Score (79): Bullish regime, momentum building

2. Expansion Probability (82%): Market primed for an imminent move

3. Technical Setup: RSI 61, MACD histogram positive

Install into OpenClaw by pasting the repo URL in chat, cloning into ~/.openclaw/workspace/skills/defi-the-odds, or running clawhub install defi-the-odds.

More Building Blocks

Other open-source repos your agent (or you) can use to go from signal to validated strategy.

Safe by Design for Autonomous Use

The API is strictly read-only GET requests - there is no write, wallet, or signing surface for an agent to misuse. Scope the API key to the agent's run, keep it out of prompts and logs, and rotate it from your dashboard at any time.

Ready to Plug In Your Agent?

Get an API key, paste the instructions above into your agent, and start generating risk reads grounded in published accuracy - not hallucinated numbers.