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. A free key gives both endpoints 10 successful calls per UTC
day. No paid plan is offered on the site.
On this page:
- Step 0 — read the free pages first
- Step 1 — get a key
- Step 2 — put the key where the agent can find it
- Step 3 — install a Skill, or paste the prompt (per agent)
- The prompt block
- Step 4 — ask a question
- Step 5 — read the answer critically
- Troubleshooting
Step 0 — Read the free pages first
A good part of this site needs no key, no account and no card, so you can look before deciding whether any of it is worth paying for:
- The methodology page — how every number was measured, where the models fail, and the seven fact-check verdicts as a plain table. Famous price-action claims from the trading literature, each next to the rate we measured over 3,946 trading days. This is the honest place to start, because it is where our numbers disagree with the books. It is a web page for you to read, not an endpoint for your agent to call.
- The guides and the lessons — plain-English explanations of max pain, GEX, day types and volume-price analysis, written for beginners.
One anonymous first look is available per source per UTC day, followed by a free key delivered by email for 10 successful calls per UTC day across both endpoints. No paid plan is offered on the site.
Step 1 — Get a key
Start free. Submit an email address through the homepage or the API below. There is no login,
password or card. A successful 202 response confirms delivery started, but never
contains the raw qd_ key; check that inbox for it. Product updates are a separate
choice and marketing_opt_in stays false unless the email owner explicitly asks
for them. A true value only records a pending request; the recipient must reply
SUBSCRIBE to the delivery email before any marketing updates begin.
curl -s -X POST https://api.quantdata.uk/v1/access/free-key \
-H "Content-Type: application/json" \
-d '{"email":"you@example.com","marketing_opt_in":false,"source":"agent-setup"}' The free key gives 10 successful calls per UTC day, shared across Brooks, Weis, Max Pain and Gamma. Keys bought earlier keep working under the terms shown at purchase.
Your agent can request the free key itself. It can POST an email address you provide and tell you to check that inbox. When the daily free allowance is used up, the API returns the reset time and a sentence for the agent to relay to you.
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/brooks/SPY
You should get JSON back with an events array — an empty array is a valid read;
it means no event has fired in the window yet. If you get a 401, the key is not
reaching the request — see troubleshooting below.
Not sure whether the problem is the key or the network? Call the API with no header at all
and print only the status code. A 200 consumes the source's
1 anonymous first-look response for the UTC day; 429
means it has already been used. The response action then points to the free-key request.
curl -s -o /dev/null -w "%{http_code}\n" \
https://api.quantdata.uk/v1/brooks/SPY 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/
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 by importing
https://api.quantdata.uk/openapi.json, then set authentication type to API Key with custom header nameX-API-Key. Without the Action 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.
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/brooks/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 canonical version — the same block printed on the Skills page and the API reference, covering both endpoints, the symbol rules and the reporting rules. The homepage carries shorter prompts for specific workflows instead. Replace the key placeholder with wherever your platform keeps secrets.
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
- Events with their measured rates, stated as history. "Historically 62.6% of such breakouts failed within 10 bars", never "this breakout will fail".
- The reference rate and the per-event estimate kept apart. The reference is a pre-registered measurement for the whole window; the per-breakout failure estimate is a calibrated model output. A good answer does not blur the two.
- The horizon and window next to any rate. 52.1% within 5 bars and 70.6% within 20 bars describe the same US-session breakouts; a rate quoted without either is not information.
- A session date and a bar count. These come from the response. An answer with neither probably never made a request.
- The coverage note when you asked about anything other than ES, NQ or QQQ — the reference rates were measured on ES, and the conditional model was validated on ES, NQ and QQQ. Elsewhere both are context, not validated claims.
- 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; measured across 22,262 instances the short side won 45.6%, and going long after the same event won 54.4%. 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 | window=gap or window=asia (Brooks), or
session=asia (Weis), sent for something that is not a 24-hour instrument
|
Drop the parameter, or use a futures (=F) or spot-FX
(=X) symbol. Stocks and ETFs trade the US day session only. Weis still
needs exchange volume, so use CME currency futures rather than spot FX there.
|
401 | Unrecognised X-API-Key, or an anonymous request that cannot be counted |
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? The body
carries retryable: false; do not retry in a loop.
|
429 | FREE_QUOTA_EXHAUSTED for anonymous or free-key access |
Read access_kind. For anonymous, relay the
request_free_api_key action. For evaluation_key, report
quota_resets_at and relay message_for_your_human to the
person. Do not keep retrying.
|
402 | Subscription lapsed, or the anti-abuse usage cap was reached |
A billing state, not a transient error — retryable: false, so your agent
should stop calling. The response body carries the free pages and a sentence written
for your agent to relay to you. It applies only to keys bought earlier; if you hit the
anti-abuse cap unexpectedly, something in your setup is probably looping.
|
403 | Key is valid but does not cover that endpoint |
Only legacy keys see this. The current plan is one tier covering everything; keys
bought under the old per-product pricing keep their original price and their original
scope. Also retryable: false. Email
quantdata@quantdata.uk — existing subscribers are
moved across by hand rather than paying twice.
|
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 company.
GOLDis a real ticker — a US-listed equity, Gold.com, Inc. The API returns asymbol_notewarning about exactly this; make sure your agent is relaying it. For the metal, useGC=Ffor futures orGLDfor futures. - 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
Get free API key Browse the free pages
Free daily notes by email
One email per publishing day: what the paid research publishers said, ticker by ticker. Free; unsubscribing deletes the address.
Educational analytics and developer tooling. Nothing here is investment advice or a recommendation to buy or sell anything.