Setting up your AI agent
Quant Data is built to be used through an AI agent. You ask a question in English; the agent makes the HTTP call, reads the JSON, and reports it back with the caveats attached. This page is the practical walkthrough, whatever agent you use.
The whole integration is one HTTP header. No SDK, no OAuth, no callback
URL, no webhook. If your tool can send X-API-Key with a GET request, it is
supported.
Step 1 — Get a key
Email quantdata@agentmail.to with one sentence about what you are building or studying. You get a payment link back and a key issued by hand, usually within a day. There is no signup form and no checkout page — that is deliberate while the product is small.
Brooks Daily Bias is $30/month, Weis Wave is $30/month, both together are $50/month. Keys
start with qd_.
Want to try the plumbing before paying for anything? The
max-pain pages are free, need no key and no account, and the
quantdata-max-pain Skill works against them immediately. It is a fine way to
confirm your agent setup works before there is money involved.
Step 2 — Put the key where the agent can find it
For anything with a shell, an environment variable. Never paste a key into a
SKILL.md, a prompt file, or anything you might commit.
# ~/.zshrc on macOS, ~/.bashrc on most Linux
export QUANTDATA_API_KEY="qd_your_key_here" Open a new terminal (or source the file), then confirm it works:
curl -s -H "X-API-Key: $QUANTDATA_API_KEY" \
https://api.quantdata.uk/v1/read/SPY
You should get JSON back with a probs object. If you get a 401, the key is not
reaching the request — see troubleshooting below.
For an agent with no shell — Claude Desktop, a Custom GPT, an n8n node — use that platform's own secret store instead. The rule is the same: keys belong in a secret store, never in a file you might share.
Step 3 — Install a Skill, or paste the prompt
Two paths. They do the same thing; pick whichever your tool supports.
Claude Code
Copy the skill folders into your skills directory and start a new session.
mkdir -p ~/.claude/skills
cp -R quantdata-daily-bias ~/.claude/skills/
cp -R quantdata-weis-wave ~/.claude/skills/
cp -R quantdata-max-pain ~/.claude/skills/
Personal skills at ~/.claude/skills/ are available in every project. Put them in
.claude/skills/ inside a repository instead if you want them shared with
everyone working on it. The key comes from the environment automatically. Verify with:
"which Quant Data skills do you have?"
Claude Desktop and the Claude apps
Same SKILL.md files, installed through the app's own skills interface. Because
there is no shell, put your key wherever the app keeps connector or integration secrets. If
you would rather not manage a Skill at all, paste
the system prompt into a Project's custom instructions — it works
identically and it is scoped to that Project.
Cursor, Windsurf, Cline, GitHub Copilot
All of these read a rules or instructions file from your repository — the exact filename
differs by tool and by version, so check the current docs for yours. Paste
the prompt block into it. Keep the key in your shell environment and
have the agent read $QUANTDATA_API_KEY rather than writing it into the rules
file, which will end up in version control.
ChatGPT and Custom GPTs
Two pieces, and people usually forget the second one.
- Paste the prompt block into Instructions. That teaches the model what the endpoints mean and how to report them.
-
Add an Action pointing at
https://api.quantdata.uk, with authentication type API Key, custom header nameX-API-Key. Without this the GPT knows about the API but cannot reach it — and a model that cannot reach an API will sometimes produce plausible-looking numbers anyway. That is the failure mode to watch for.
The free max-pain pages need no Action at all if your GPT has browsing enabled — it can read
quantdata.uk/max-pain/spy directly (the ticker is lowercase in the path).
Gemini CLI and other terminal agents
Put the prompt block in whatever context or system-instruction file the tool loads at
startup. The key is already in your environment from step 2, and terminal agents can
generally shell out to curl, so no further wiring is needed.
n8n, Dify, Coze, CrewAI, AutoGen, LangChain
Two nodes. An HTTP Request node calling
https://api.quantdata.uk/v1/read/SPY with a header credential named
X-API-Key, feeding into an Agent or LLM node
whose system message is the prompt block. For framework code — CrewAI
backstory, AutoGen system message, LangChain SystemMessage — the prompt block
is the string, and the request is an ordinary HTTP call with one header.
Anything else that can send a header
That is the entire requirement. Two dozen lines of Python with no dependencies beyond the standard library will do it. If your platform is not named above, it is almost certainly supported — the API has no client library because it does not need one.
The prompt block
This is the paste-ready version: the same instruction set the SKILL.md files
carry, condensed into one system prompt. Replace the key placeholder with wherever your
platform keeps secrets.
You have access to the Quant Data APIs.
Base URL: https://api.quantdata.uk
Header on every request: X-API-Key: <your qd_ key>
ENDPOINTS
GET /v1/read/{symbol} Day-type probabilities for the current session
(TrendUp / TrendDown / Range / TrendingRange / Reversal).
Optional ?session=asia — 24h futures only, unvalidated.
GET /v1/match/{symbol}?k=3 Most similar historical sessions (date, similarity, day_type)
from a 2010-2026 S&P 500 E-mini intraday library.
GET /v1/claims Fact-checked price-action probability claims, measured against
3,946 real trading days.
GET /v1/weis/{symbol} Weis Wave volume structure: the wave in progress, the last
8 completed waves, and detected events with measured win rates.
Free, no key, ordinary GET on the public site:
https://quantdata.uk/max-pain/{ticker} Max pain, OI walls, put/call ratio, gamma exposure.
Lowercase the ticker in this URL: NVDA -> /max-pain/nvda.
SYMBOLS
US tickers as-is (NVDA) for the API; lowercase them in max-pain page URLs.
Hong Kong = digits.HK (Meituan = 3690.HK). China A-shares =
the 6-digit code (Kweichow Moutai = 600519). Futures = Yahoo suffix (ES=F, NQ=F, GC=F,
CL=F). Crypto = BTC-USD, ETH-USD.
Resolve an instrument NAME to a ticker before calling: S&P 500 -> SPY or ES=F,
Nasdaq -> QQQ or NQ=F, gold -> GLD or GC=F, crude -> CL=F.
"GOLD" is Barrick Gold, the mining company — not the metal.
HOW TO ANSWER
- Report the whole probability distribution, not just the top class, and state the top-2
coverage (the two highest probabilities added together).
- Give the baseline whenever you quote accuracy: 66% top-1 and 80% top-2 against a 37%
majority-class baseline, on held-out years. At 90 minutes in: 53.5% and 68.6%.
- The day-type model is trained on S&P 500 E-mini futures. Reads on single stocks, gold and
crypto are descriptive, not validated. Say so in the same sentence as the number.
- For Weis events, quote the measured win rate and sample size from the reference block,
next to the 49.3% baseline. no_demand_short (45.6%) and sot_short (47.6%) measured
REVERSED versus what the tradition teaches — never report them as bearish.
- 24h futures default to the US day session. If a response carries "session_hint", ask once
whether the user wants the US day session or the Asian session, recommend US, remember it.
RULES
- Never present any of this as a buy or sell recommendation, and never give personalized
investment advice. It is descriptive analytics about chart shape and volume.
- Always carry the disclaimer field through to the user.
- Never claim precision the numbers do not have. Real surviving edge here is 52-56%.
- 401 = check the key. 402 = subscription lapsed or capped. 403 = valid key, not subscribed
to that product. 404 = symbol did not resolve; the message names a better ticker.
Do not retry 401, 402 or 403. Trim it if you only bought one product. The parts that must not be trimmed are the last two sections — how to answer and rules. Those are what stop the agent from turning a 34% probability into a recommendation, and they are the entire reason this block is longer than an endpoint list.
Step 4 — Ask a question
You never invoke a Skill by name. Ask normally, and the agent matches your question against what it has installed.
Step 5 — Read the answer critically
This is the step nobody writes down, and it is the one that decides whether any of this is worth having. An AI agent will happily produce a confident, fluent, completely fabricated market reading. Here is how to tell the difference.
A good answer contains
- The whole distribution, not one label. Five numbers summing to 100, not "it's a trend day".
- The top-2 coverage. The two highest probabilities added together, stated as such.
- The baseline next to any accuracy figure. 66% is meaningless without the 37%.
- A session date and a bar count. These come from the response. An answer with neither probably never made a request.
- An out-of-distribution flag when you asked about a single stock, gold or crypto — the model was trained on index futures.
- The disclaimer. It is a field in every response and it should reach you.
Red flags
- Any buy or sell framing. "This suggests going long", an entry, a stop, a target. The API returns none of those things, so the agent invented them. Stop and check your prompt is intact.
- Suspiciously round numbers with no session date. The classic signature of a model answering from memory rather than calling anything.
- A confident number on BTC, ETH or gold. The measured edge is absent or reversed on those assets, and a correct answer says so in the same breath.
- Calling a
no_demand_shortevent bearish. Every textbook says bearish; the measurement says it resolved bullishly 54.4% of the time across 22,262 instances. An agent that says "bearish" is reciting its training data, not reading the response.
When in doubt, ask it to show you the raw JSON, or run the curl from step 2 and
compare. Verifying twice in your first week is worth more than any amount of prompt tuning.
The full version of this critical-reading skill is its own page. If you only skim one thing there, make it the checklist at the end.
Troubleshooting
| Status | What it means | Fix |
|---|---|---|
400 | session=asia sent for something that is not a 24-hour futures contract |
Drop the parameter, or use a =F symbol. Stocks and ETFs have no Asian
session. Note the Asian-session gate is unvalidated — a pre-registered NO_GO — so the
US day session is the right default anyway.
|
401 | Missing or unrecognised X-API-Key |
Is the variable visible to the agent's process? Exporting in a shell profile does not
affect an app that was already running — restart it. Does the key start with
qd_, with no stray quotes or trailing newline? Is the header name exactly
X-API-Key, not Authorization or a Bearer token? Do not retry
in a loop.
|
402 | Subscription expired, or the anti-abuse usage cap was reached | Billing is manual — email quantdata@agentmail.to to renew. Your agent should stop calling, not retry. If you hit the cap unexpectedly, something in your setup is probably looping. |
403 | Key is valid but not subscribed to that product |
Daily Bias and Weis Wave are sold separately. A Daily Bias key calling
/v1/weis gets this. Both together are $50/month.
|
404 | The symbol did not resolve |
Read the message — it names a likely correct ticker. Indices and commodities need an
ETF or futures symbol, never a name: S&P 500 is SPY or
ES=F, gold is GLD or GC=F. Failed lookups are
not billed.
|
404 | insufficient sessions | Not enough recent history — usually a very thin instrument, or a long market holiday. Try a more liquid symbol. |
200 | Weis response with an error field | insufficient bars means fewer than 120 bars of history; no volume data means the source returned prices without volume, and wave analysis is impossible without volume. Neither is fixable by retrying. |
5xx | An upstream market-data source failed | Retry once after a pause, then report it. Never let an agent fabricate a reading. |
Two problems that are not error codes
- You asked about gold and got a mining company.
GOLDis a real ticker — Barrick Gold. The API returns asymbol_notewarning about exactly this; make sure your agent is relaying it. For the metal, useGLDorGC=F. - Your agent answers without calling anything. Fluent, plausible, entirely invented. Check the response mentions a session date and a bar count. If your agent has an Action or tool that is misconfigured, it may silently fall back to answering from memory rather than reporting the failure.
Next
Email for a key Or try the free pages first
Educational analytics and developer tooling. Nothing here is investment advice or a recommendation to buy or sell anything.