New · November 2026
API v2 and Terry in Claude & ChatGPT
Faster answers, many more stats, and the same free key
Terry calls Bitcoin Up/Down markets on Polymarket US (5 minutes, 15 minutes and 1 hour): which side, how sure he is, and the price then. Version 2 of the API and the MCP server answer far more than “what is he calling?”: how accurate he is against the market’s own price, how he does with and against the favourite, whether he is getting better or worse, what following him would have made, and more. Every answer is for one rule at a time, the way the site keeps its record: different rules are never added together.
What’s new
- Backtest.
/api/v2/backtest: what a fixed stake on any rule’s calls (or locks) would have made, with the fee you really pay (the API rate with its 70% rebate, the standard rate, or a maker order), filtered by price, chance, hours, side and time into the window. Free plan: the last 7 days; Unlimited: the full history and a CSV of every trade. How it works. - Live status. /developers/status and
/api/v2/status(no key): every part of the API checked each minute, uptime over 24 hours, 7, 30 and 90 days, incidents, and how fast new calls reach you. - Free “nothing changed”. A
304 Not Modifiedno longer counts against the daily limit, and ETags now ignore clock-only fields, so an unchanged answer really comes back as a 304. Near the end of a free key’s day,X-Plan-Hintsays so. - Faster call alerts. New calls and locks reach the stream,
/eventsand webhooks about twice as fast; each call and lock event sayssent_after_s. - Libraries 0.4.0:
backtest()andstatus()in Python and JavaScript. - Kalshi gap.
/api/v2/kalshi: Kalshi’s price for the same 15m and 1h windows beside Polymarket’s, and the gap in cents; on the live stream withtypes=kalshi, in MCP asget_kalshi_gapand in the libraries (0.3.0) askalshi(). How it works. - Overview in one call.
/api/v2/overview: for each market length, the rules in use now, how many windows got a call, the record, today, the current streak, the last 10, the lock record and accuracy against the market. - Calibration.
/api/v2/calibration: is Terry’s chance more accurate than the price? Brier score and log loss for both, and, per chance band, what Terry said, what the market said and how often it happened. - With or against the market.
/api/v2/stats?by=favourite: how Terry does when he calls the favourite against when he calls the cheaper side. Stats now cut nine ways: chance, price, hour, weekday, day/night, side, time in the window, day and favourite. - Trend.
/api/v2/trend: the record in blocks of calls (you pick the size), oldest to newest, so good and bad runs show. - Flips.
/api/v2/flips: how often Terry’s view changes by the end of a window, and when the late lock disagrees with the call, which one was right. - Follow value, streaks, day by day, locks, rules and the best-times study, each as a plain
GET. - Control. History with filters (side, chance, hours, rule, right or wrong), a cursor for paging (
before=) andformat=csvfor spreadsheets. - Faster. ETags with
304 Not Modified,fields=andcompact=1to trim answers, and answers shared for a moment so popular questions come back at once. - Wait for the next call, on any plan.
/api/v2/events?since=<seq>&wait=30answers the moment a new window, call, lock or result happens, as one request however long it waits: no more polling/calls, and a free key stays far inside its daily limit. The libraries (0.2.0 and later) do it for you withwatch()(or one request at a time withevents()). - Live stream and webhooks (Unlimited plan):
/api/v2/streampushes each new window, call, lock and result the moment it happens, and a webhook POSTs them to your server, signed. - The MCP server (1.4) gets the same: ask Claude or ChatGPT “Is Terry more accurate than the market on the 5-minute?”, “How has Terry done this week, in blocks of 25?” or “Give me Terry’s overview.”
What it does
For each Bitcoin Up/Down window Terry makes at most one call: a side, his chance for it and its price at that moment. Late in a window he may add a lock, a separate call made when the market is nearly sure. When the window settles, both are marked right or wrong from the official result. The API and the MCP read that record and the live markets; they answer in JSON for programs and in plain answers for assistants. Nothing here places a trade.
v2 endpoints
Base address https://terrycalls.com/api/v2. Send your key in the X-API-Key header. Most take horizon=5m|15m|1h
(leave it out for all three) and days=1-30.
| Endpoint | What it answers | Extra options |
|---|---|---|
/calls | The live markets: Terry’s call, lock, chance, prices, price to beat, the index’s distance from it, the seconds left | |
/overview | Each market at a glance (new) | |
/windows | Past windows with filters | only, side, min_chance, max_chance, hours, rule, before, limit, format=csv |
/window | One window | market=, or at= + horizon= |
/stats | The record cut one way | by=chance|price|hour|weekday|day_night|side|time_in_window|day|favourite, kind=call|lock, rule= |
/calibration | Terry’s chance against the market’s price (new) | kind, rule |
/trend | The record in blocks of calls (new) | block=5-500, kind, rule |
/flips | Changes of view, and the lock against the call (new) | |
/follow | What a fixed stake on every call would have made, after the fee | stake=, kind |
/streaks | Current and longest runs, the last 10 | |
/daily | Day by day (Central days) | |
/locks | The lock record | |
/rules | How Terry decides, in words and numbers | |
/record | Right / called for each rule | |
/best-times | When Terry’s current rules have been worth following | |
/backtest | A fixed stake on one rule’s calls, with your fee (new; see below) | stake, fee=api|standard|maker, kind, rule, min_price, max_price, min_chance, max_chance, hours, side, min_seconds_in, max_seconds_in, format=csv |
/status | Live checks, uptime and incidents (new; no key needed) | |
/usage | Your key’s plan and use today | |
/events | The next window, call, lock or result, waiting for it (any plan; see below) | since, wait, types, horizon |
/kalshi | Kalshi’s price for the same 15m/1h windows, and the gap (see below) | horizon, history |
/stream | Events as they happen (Unlimited plan; see below) | types, horizon |
/changelog | Every API and MCP change (no key needed) | limit |
Backtest
GET /api/v2/backtest answers “what would $10 on every one of this rule’s calls have made?” on the calls your filters keep,
each held to the official result. One rule at a time (rules are never pooled); rule defaults to the one in use now.
fee:api(default: Polymarket US’s API taker fee, 0.0695 × p × (1 − p), with its 70% rebate, Nov 21 – Dec 31 2026),standard(the full fee) ormaker(no fee, for a resting order).- Filters:
min_price/max_priceandmin_chance/max_chance(0–1),hours(Central time:8-20,22-6or9,10,14),side=up|down,min_seconds_in/max_seconds_in. - The answer: trades, right, win rate, average price, staked, profit, profit per trade, return on stake, the deepest dip, best and
worst day,
by_dayandby_hour_ct. - Free plan: the last 7 days (
402beyond, with the upgrade link). Unlimited: up to 30 days andformat=csv, one row a trade.
curl -H "X-API-Key: $KEY" "https://terrycalls.com/api/v2/backtest?horizon=15m&stake=10&fee=api&min_price=0.70&hours=8-20"
# Python (library 0.4.0)
bt = terry.backtest(horizon="15m", stake=10, fee="api", min_price=0.70, hours="8-20")
print(bt["trades"], bt["win_rate"], bt["profit"], bt["deepest_dip"])
Past results, not a promise; not financial advice.
Wait for the next call (any plan)
Bots that follow Terry don’t need to ask /calls every few seconds. Ask https://terrycalls.com/api/v2/events?since=<seq>&wait=30
instead: it answers at once with anything that happened after event seq, or holds on for up to 30 seconds and answers the moment
something does. It counts as one request however long it waits, so following every call costs about two requests a minute, on any plan.
The answer is {"seq", "events", "missed", "next"}. Send seq as since next time (or just call
next). The events are the same as the live stream’s below: window, call, lock and
settled, each {"seq", "type", "at", "horizon", "market", "data"}. Leave since out on the first call to
start from now. missed: true means you were away longer than the events kept (about a day): fill in from
/api/v2/windows. types=call,lock and horizon=5m narrow it. A key can have 3 waiting requests at once.
# Python: pip install https://terrycalls.com/developers/sdk/terrycalls-0.4.0-py3-none-any.whl
from terrycalls import Client
terry = Client() # reads TERRY_API_KEY
for ev in terry.watch(types=["call", "lock", "settled"]):
print(ev["horizon"], ev["type"], ev["data"].get("side") or ev["data"].get("result"))
// JavaScript: npm install https://terrycalls.com/developers/sdk/terrycalls-0.4.0.tgz
import { TerryCalls } from "terrycalls";
const terry = new TerryCalls({ key: process.env.TERRY_API_KEY });
for await (const ev of terry.watch({ types: ["call", "lock"] })) console.log(ev.horizon, ev.type, ev.data.side, ev.data.chance);
# Any language: loop on the answer's seq
seq = None
while True:
url = "https://terrycalls.com/api/v2/events?wait=30" + (f"&since={seq}" if seq is not None else "")
got = requests.get(url, headers={"X-API-Key": KEY}, timeout=45).json()
for ev in got["events"]: handle(ev)
seq = got["seq"]
Each call also says seconds_left_at_call, and /api/v2/calls gives each market its last_result
(the window that settled last: result, the call and lock sides, and whether each was right). Every answer on a plan with a daily
cap sends X-RateLimit-Remaining-Day and X-RateLimit-Reset-Day (seconds until the count starts again).
Live stream
On the Unlimited plan, hold https://terrycalls.com/api/v2/stream open and Terry’s calls arrive the moment
they happen, as Server-Sent Events. It opens with a snapshot
(the live calls, as /api/v2/calls), then sends:
| Event | When | Its data |
|---|---|---|
window | A new window opens | window_end, price_to_beat, prices, rules |
call | Terry calls the window (once) | side, chance, price, at, rule, prices |
lock | A late lock | side, chance, at, rule |
settled | The official result is in | As a /api/v2/windows row: result, call_right, lock_right |
Each event is {"seq", "type", "at", "horizon", "market", "data"}, and seq is its SSE id: reconnect with
Last-Event-ID and you get what you missed (from about the last day), without a new snapshot. types=call,lock and
horizon=5m narrow it. A comment line every 10 seconds keeps it open; a stream lasts up to 6 hours, then reconnect. A key holds up to
3 streams. Opening one counts as one request. Events are best effort: after a gap, fill in from /api/v2/windows.
Bitcoin price, every second
Add price to types and the stream also sends a price message every second: for each market,
btc_index_60s (the 60-second BRTI average the market settles on), price_to_beat, the gap between
them, seconds_left, window_end and the Up/Down prices. It is only sent when you ask for it, and has
no id (a reconnect still picks up the calls and locks you missed).
// JavaScript (our library): npm install https://terrycalls.com/developers/sdk/terrycalls-0.4.0.tgz
import { TerryCalls } from "terrycalls";
const terry = new TerryCalls({ key: process.env.TERRY_API_KEY });
for await (const ev of terry.stream({ types: ["price"], horizon: "5m" })) {
if (ev.type !== "price") continue; // the first message is the snapshot
for (const m of ev.markets) console.log(m.horizon, m.btc_index_60s, "beat", m.price_to_beat, "gap", m.gap, m.seconds_left + "s left");
}
// Node.js 18+: npm install eventsource
import { EventSource } from "eventsource";
const es = new EventSource("https://terrycalls.com/api/v2/stream?types=call,lock,settled", {
fetch: (url, init) => fetch(url, { ...init, headers: { ...init.headers, "X-API-Key": process.env.TERRY_API_KEY } }),
});
es.addEventListener("call", (e) => { const ev = JSON.parse(e.data); console.log(ev.horizon, ev.data.side, ev.data.chance); });
es.addEventListener("settled", (e) => console.log("result", JSON.parse(e.data).data.result));
# Python: pip install requests
import json, requests
with requests.get("https://terrycalls.com/api/v2/stream", headers={"X-API-Key": KEY}, stream=True, timeout=(5, 60)) as r:
event = None
for line in r.iter_lines(decode_unicode=True):
if line.startswith("event: "):
event = line[7:]
elif line.startswith("data: ") and event != "snapshot":
ev = json.loads(line[6:])
print(ev["type"], ev["horizon"], ev["data"])
Kalshi gap (any plan)
Kalshi lists the same Bitcoin windows, settled on the same 60-second index average, so the two prices should match. GET
/api/v2/kalshi answers, for each 15m and 1h window open now: Kalshi’s yes_bid, yes_ask and
yes_mid (and the No side), Polymarket’s Up and Down prices, gap_cents (Kalshi’s Yes mid minus Polymarket’s Up
mid: + means Kalshi prices Up higher) and box: what Polymarket Up + Kalshi No, and Polymarket Down + Kalshi Yes, cost
together at the asks before fees, on 15m only (under $1 is a pair that pays $1 whichever way the window goes). On 1h Kalshi has no
Up/Down market: its “above K at the hour” strikes are $100 apart, so the price is read at the price to beat from the two nearest
strikes (strikes): a guide to where Kalshi stands, not a contract you can buy, so 1h has no box. Kalshi has no 5-minute market. history=1 adds the window’s Kalshi Yes mid, one point a second.
On the live stream, types=kalshi sends the same answer every second (Unlimited plan).
# Python (library 0.4.0): pip install https://terrycalls.com/developers/sdk/terrycalls-0.4.0-py3-none-any.whl
from terrycalls import Client
for m in Client().kalshi()["markets"]:
print(m["horizon"], "gap", m["gap_cents"], "c · Up+No", (m["box"] or {}).get("polymarket_up_plus_kalshi_no"))
curl -H "X-API-Key: $TERRY_API_KEY" "https://terrycalls.com/api/v2/kalshi?horizon=15m"
Webhooks
Rather not hold a connection? On your keys page, give an Unlimited key an https address and pick the events and
market lengths. Each event is POSTed there as JSON (the same shape as above), with: Each call and lock event carries sent_after_s: how many seconds after Terry posted it the event went out.
Terry-Event: the event type,Terry-Delivery: an id for this try, andTerry-Signature:t=<unix seconds>,v1=<hex>, where the hex is HMAC-SHA256 of<t>.<the raw body>with your webhook’s secret (shown once, when you make it or ask for a new one).- Answer with any
2xxwithin 5 seconds. Otherwise it is tried again after 10 seconds, a minute and 5 minutes; after 50 failures in a row the webhook switches itself off until you save it again. The keys page shows the last 20 deliveries and has a Send a test button. - The address must be https (port 443 or 8443) on a public host name. Redirects are not followed.
# Python (Flask): check the signature before trusting the body
import hashlib, hmac, time
from flask import Flask, request, abort
app, SECRET = Flask(__name__), "whsec_..."
@app.post("/terry")
def terry():
sig = dict(p.split("=", 1) for p in request.headers.get("Terry-Signature", "").split(","))
raw = request.get_data()
good = hmac.new(SECRET.encode(), sig.get("t", "").encode() + b"." + raw, hashlib.sha256).hexdigest()
if not hmac.compare_digest(good, sig.get("v1", "")) or abs(time.time() - int(sig.get("t", 0))) > 300:
abort(401)
event = request.get_json()
print(event["type"], event["horizon"], event["data"])
return "", 204
// Node.js (Express): use the raw body for the signature
import crypto from "node:crypto";
import express from "express";
const app = express(), SECRET = process.env.TERRY_WEBHOOK_SECRET;
app.post("/terry", express.raw({ type: "application/json" }), (req, res) => {
const sig = Object.fromEntries((req.get("Terry-Signature") || "").split(",").map((p) => p.split("=")));
const good = crypto.createHmac("sha256", SECRET).update(sig.t + "." + req.body).digest("hex");
if (!sig.v1 || sig.v1.length !== good.length || !crypto.timingSafeEqual(Buffer.from(good), Buffer.from(sig.v1))) return res.sendStatus(401);
const event = JSON.parse(req.body);
console.log(event.type, event.horizon, event.data);
res.sendStatus(204);
});
app.listen(3000);
Libraries and OpenAPI
Two small libraries, one file each with no dependencies, do the plumbing for you: ETags (an unchanged answer comes back as a quick
304 and you get the copy you already have), paging, CSV, errors with what to do, the live stream with automatic resume, and the
webhook signature check.
| Install | Or copy the file | |
|---|---|---|
| Python 3.8+ | pip install https://terrycalls.com/developers/sdk/terrycalls-0.4.0-py3-none-any.whl |
terrycalls.py |
| JavaScript (Node 18+, Deno, Bun, Workers) | npm install https://terrycalls.com/developers/sdk/terrycalls-0.4.0.tgz |
terrycalls.mjs |
from terrycalls import Client, verify_webhook
terry = Client() # reads TERRY_API_KEY
print(terry.overview(days=7)["horizons"]["5m"]["calls"])
for w in terry.iter_windows(horizon="15m", days=30, only="wrong"):
print(w["market"], w["call"]["chance"])
for ev in terry.stream(types=["call", "lock"]): # Unlimited plan
print(ev["type"], ev.get("horizon"), ev["data"])
event = verify_webhook(SECRET, request_body_bytes, headers["Terry-Signature"])
import { TerryCalls, verifyWebhook } from "terrycalls";
const terry = new TerryCalls(); // reads TERRY_API_KEY
const cal = await terry.calibration({ horizon: "5m", days: 14 });
for await (const ev of terry.stream({ types: ["call", "lock"] })) console.log(ev.type, ev.horizon, ev.data);
const event = await verifyWebhook(SECRET, rawBody, req.headers["terry-signature"]);
OpenAPI. https://terrycalls.com/api/v2/openapi.json (no key needed) describes every endpoint, parameter and error. Import it into
Postman or Insomnia, generate a client in any language, or add it to a custom GPT as an action with your key as an API-key header
named X-API-Key.
MCP tools
Add https://terrycalls.com/api/mcp to Claude, ChatGPT, Claude Code or any MCP app (how) and ask in your own
words. Each answer uses one MCP credit; everyone gets 300 free a month, and $5 buys 2,500 more that never
expire (or $9 a month for 10,000).
| Ask something like | Tool |
|---|---|
| “What is Terry calling right now?” | get_live_calls |
| “How far apart are Kalshi and Polymarket on the 15-minute?” | get_kalshi_gap (new) |
| “Give me Terry’s overview for this week.” | get_overview (new) |
| “Is Terry more accurate than the market on the 15-minute?” | get_calibration (new) |
| “Is Terry getting better or worse? Blocks of 25.” | get_trend (new) |
| “When Terry’s lock disagreed with his call, who was right?” | get_flips (new) |
| “How does Terry do against the favourite?” | get_stats with by = favourite |
| “What would $100 on every call have made this week?” | get_follow_value |
| “Show me his misses over 80% yesterday.” | get_call_history |
| “What’s his streak?” · “Day by day?” · “How do his locks do?” · “What are his rules?” | get_streaks · get_daily · get_locks · get_rules |
Speed
- Every answer carries an
ETag(v1/calls,/calls/historyand/recordtoo). Send it back inIf-None-Match: when nothing changed you get304and no body, and it does not count against your daily limit. The tag ignores clock-only fields (generated_at,updated_at,seconds_left), so work out time left fromwindow_end. Live prices move every second, so/callsrarely stays unchanged: for calls, wait with/eventsinstead. - Near the end of a free key’s day (the last 10%), answers carry
X-Plan-Hint. - New calls and locks reach
/stream,/eventsand webhooks within about a second; each call and lock event carriessent_after_s. The typical delay is on the status page. - The same question asked in the same moment is built once and shared: live calls for a second, everything else for up to 30 seconds (the record changes at most once a minute).
fields=calls,marketskeeps only those top-level keys;compact=1drops empty values.- Same limits as v1: Free 60 a minute and 20,000 a day, Unlimited $10 a month with no daily cap.
Examples
curl -H "X-API-Key: tc_live_YOUR_KEY" "https://terrycalls.com/api/v2/overview"
curl -H "X-API-Key: tc_live_YOUR_KEY" "https://terrycalls.com/api/v2/calibration?horizon=5m&days=14"
curl -H "X-API-Key: tc_live_YOUR_KEY" "https://terrycalls.com/api/v2/stats?horizon=15m&by=favourite"
curl -H "X-API-Key: tc_live_YOUR_KEY" "https://terrycalls.com/api/v2/trend?horizon=1h&block=20&days=30"
// JavaScript: poll the live calls, cheaply
let tag = "";
async function poll() {
const r = await fetch("https://terrycalls.com/api/v2/calls?compact=1", { headers: { "X-API-Key": KEY, ...(tag && { "If-None-Match": tag }) } });
if (r.status === 304) return; // nothing changed
tag = r.headers.get("ETag");
show(await r.json());
}
# Python: is Terry more accurate than the market?
import requests
r = requests.get("https://terrycalls.com/api/v2/calibration", headers={"X-API-Key": KEY}, params={"days": 14}).json()
for h, v in r["horizons"].items():
c = v["calibration"]
print(h, "Terry", c["brier_terry"], "market", c["brier_market"], "Terry closer:", c["terry_more_accurate"])
Coming from v1
Nothing breaks: /api/v1 keeps working with the same key. v2 is a superset; move when you like. The full reference, errors and
the rules of use are on the developer page.
Terry’s calls are information, not financial advice. Not every call wins; every call and its result is on the record.
