#!/bin/sh
# getTrades: Get a market's newest trades. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
curl -sS "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/markets/mk-btc-100k-2026/trades?venue=kalshi&limit=2" \
-H "Authorization: Bearer $TRENDLINE_API_KEY""""getTrades: Get a market's newest trades. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base."""
import os
import requests
BASE = os.environ.get("TRENDLINE_API_BASE", "https://systems.trendlinelabs.ai")
KEY = os.environ["TRENDLINE_API_KEY"]
r = requests.get(f"{BASE}/public/v1/markets/mk-btc-100k-2026/trades", params={"venue": "kalshi", "limit": "2"},
headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
r.raise_for_status()
print(r.json())
// getTrades: Get a market's newest trades. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
const BASE = process.env.TRENDLINE_API_BASE ?? "https://systems.trendlinelabs.ai";
const KEY = process.env.TRENDLINE_API_KEY;
const r = await fetch(`${BASE}/public/v1/markets/mk-btc-100k-2026/trades?venue=kalshi&limit=2`, { headers: { Authorization: `Bearer ${KEY}` } });
console.log(r.status, await r.json());
{
"as_of_ms": 1791266400000,
"newest_trade_ts_ms": 1791266398000,
"tape_ts_ms": 1791266398000,
"trades": [
{
"notional_usd": 41,
"outcome": "YES",
"ts_ms": 1791266398000
},
{
"notional_usd": 118,
"outcome": "NO",
"ts_ms": 1791266391000
}
],
"universal_id": "mk-btc-100k-2026",
"venue": "kalshi",
"venue_market_id": "KXBTC-26DEC31-B100000"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Get a market's newest trades
The newest trades on a market’s Kalshi, Polymarket or Limitless leg, newest first. Each trade is exactly ts_ms, outcome and notional_usd.
notional_usdis a finite USD amount >= 0 with no upper cap: a large trade is real.
Freshness
tape_ts_ms,newest_trade_ts_msandas_of_ms. The tape is written only on a trade, so a quiet live market’s tape can be days old.- A Limitless trade can reach us about a minute after it happened.
Errors
| Status | Code | When |
|---|---|---|
| 422 | venue_unsupported | predictfun. |
| 404 | not_found | Unknown market. |
| 404 | venue_not_listed | The market has no leg on that venue. |
| 503 | dependency_unavailable | Our store is unavailable. |
| 503 | upstream_unavailable | No live tape for this leg (some Limitless legs have none), a malformed tape, or market data unreadable. |
Any route can also answer 401, 403, 429, 500 or 503 dependency_unavailable, described on the Errors page.
#!/bin/sh
# getTrades: Get a market's newest trades. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
curl -sS "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/markets/mk-btc-100k-2026/trades?venue=kalshi&limit=2" \
-H "Authorization: Bearer $TRENDLINE_API_KEY""""getTrades: Get a market's newest trades. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base."""
import os
import requests
BASE = os.environ.get("TRENDLINE_API_BASE", "https://systems.trendlinelabs.ai")
KEY = os.environ["TRENDLINE_API_KEY"]
r = requests.get(f"{BASE}/public/v1/markets/mk-btc-100k-2026/trades", params={"venue": "kalshi", "limit": "2"},
headers={"Authorization": f"Bearer {KEY}"}, timeout=10)
r.raise_for_status()
print(r.json())
// getTrades: Get a market's newest trades. Needs TRENDLINE_API_KEY; TRENDLINE_API_BASE overrides the base.
const BASE = process.env.TRENDLINE_API_BASE ?? "https://systems.trendlinelabs.ai";
const KEY = process.env.TRENDLINE_API_KEY;
const r = await fetch(`${BASE}/public/v1/markets/mk-btc-100k-2026/trades?venue=kalshi&limit=2`, { headers: { Authorization: `Bearer ${KEY}` } });
console.log(r.status, await r.json());
{
"as_of_ms": 1791266400000,
"newest_trade_ts_ms": 1791266398000,
"tape_ts_ms": 1791266398000,
"trades": [
{
"notional_usd": 41,
"outcome": "YES",
"ts_ms": 1791266398000
},
{
"notional_usd": 118,
"outcome": "NO",
"ts_ms": 1791266391000
}
],
"universal_id": "mk-btc-100k-2026",
"venue": "kalshi",
"venue_market_id": "KXBTC-26DEC31-B100000"
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"request_id": "<string>"
}
}Authorizations
Authorization: Bearer tl_live_…
Path Parameters
no control, format, private-use, unassigned, line or paragraph separator character
1 - 256Query Parameters
the venue whose trades to read (kalshi, polymarket or limitless)
kalshi, polymarket, limitless, predictfun how many trades to return, newest first
1 <= x <= 200Response
Successful Response
when the tape was read, unix milliseconds
the market universal id
the venue this tape is from
kalshi, polymarket, limitless, predictfun the market's id on this venue
the newest trade's time, unix milliseconds
when the tape was last written, unix milliseconds; written only on a trade, so a quiet market's tape can be old
trades, newest first
Show child attributes
Show child attributes