cURL
#!/bin/sh
# getMarketByVenueId: Find a market by a venue's own market id. Needs TRENDLINE_CLIENT_ID, TRENDLINE_API_KEY and TRENDLINE_API_SECRET; TRENDLINE_API_BASE overrides the base.
curl -sS "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/markets?venue=polymarket&venue_market_id=bitcoin-above-100k-on-december-31" \
-H "X-Client-Id: $TRENDLINE_CLIENT_ID" \
-H "X-Api-Key: $TRENDLINE_API_KEY" \
-H "X-Api-Secret: $TRENDLINE_API_SECRET""""getMarketByVenueId: Find a market by a venue's own market id. Needs TRENDLINE_CLIENT_ID, TRENDLINE_API_KEY and TRENDLINE_API_SECRET; TRENDLINE_API_BASE overrides the base."""
import os
import requests
BASE = os.environ.get("TRENDLINE_API_BASE", "https://systems.trendlinelabs.ai")
HEADERS = {"X-Client-Id": os.environ["TRENDLINE_CLIENT_ID"], "X-Api-Key": os.environ["TRENDLINE_API_KEY"],
"X-Api-Secret": os.environ["TRENDLINE_API_SECRET"]}
r = requests.get(f"{BASE}/public/v1/markets", params={"venue": "polymarket", "venue_market_id": "bitcoin-above-100k-on-december-31"}, headers=HEADERS, timeout=10)
r.raise_for_status()
print(r.json())
// getMarketByVenueId: Find a market by a venue's own market id. Needs TRENDLINE_CLIENT_ID, TRENDLINE_API_KEY and TRENDLINE_API_SECRET; TRENDLINE_API_BASE overrides the base.
const BASE = process.env.TRENDLINE_API_BASE ?? "https://systems.trendlinelabs.ai";
const HEADERS = { "X-Client-Id": process.env.TRENDLINE_CLIENT_ID, "X-Api-Key": process.env.TRENDLINE_API_KEY,
"X-Api-Secret": process.env.TRENDLINE_API_SECRET };
const r = await fetch(`${BASE}/public/v1/markets?venue=polymarket&venue_market_id=bitcoin-above-100k-on-december-31`, { headers: HEADERS });
console.log(r.status, await r.json());
{
"markets": [
{
"event_universal_id": "ev-btc-100k-2026",
"legs": {
"kalshi": {
"state": "live",
"venue_market_id": "KXBTC-26DEC31-B100000"
},
"polymarket": {
"state": "live",
"venue_market_id": "bitcoin-above-100k-on-december-31"
}
},
"title": "Bitcoin above $100,000 on December 31?",
"universal_id": "mk-btc-100k-2026"
}
],
"venue": "polymarket",
"venue_market_id": "bitcoin-above-100k-on-december-31"
}{
"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>"
}
}Markets
Find a market by a venue's own market id
The market universal id and every venue leg of the market a venue’s own id names, read as orders read it; 404 when none lists it.
GET
/
public
/
v1
/
markets
cURL
#!/bin/sh
# getMarketByVenueId: Find a market by a venue's own market id. Needs TRENDLINE_CLIENT_ID, TRENDLINE_API_KEY and TRENDLINE_API_SECRET; TRENDLINE_API_BASE overrides the base.
curl -sS "${TRENDLINE_API_BASE:-https://systems.trendlinelabs.ai}/public/v1/markets?venue=polymarket&venue_market_id=bitcoin-above-100k-on-december-31" \
-H "X-Client-Id: $TRENDLINE_CLIENT_ID" \
-H "X-Api-Key: $TRENDLINE_API_KEY" \
-H "X-Api-Secret: $TRENDLINE_API_SECRET""""getMarketByVenueId: Find a market by a venue's own market id. Needs TRENDLINE_CLIENT_ID, TRENDLINE_API_KEY and TRENDLINE_API_SECRET; TRENDLINE_API_BASE overrides the base."""
import os
import requests
BASE = os.environ.get("TRENDLINE_API_BASE", "https://systems.trendlinelabs.ai")
HEADERS = {"X-Client-Id": os.environ["TRENDLINE_CLIENT_ID"], "X-Api-Key": os.environ["TRENDLINE_API_KEY"],
"X-Api-Secret": os.environ["TRENDLINE_API_SECRET"]}
r = requests.get(f"{BASE}/public/v1/markets", params={"venue": "polymarket", "venue_market_id": "bitcoin-above-100k-on-december-31"}, headers=HEADERS, timeout=10)
r.raise_for_status()
print(r.json())
// getMarketByVenueId: Find a market by a venue's own market id. Needs TRENDLINE_CLIENT_ID, TRENDLINE_API_KEY and TRENDLINE_API_SECRET; TRENDLINE_API_BASE overrides the base.
const BASE = process.env.TRENDLINE_API_BASE ?? "https://systems.trendlinelabs.ai";
const HEADERS = { "X-Client-Id": process.env.TRENDLINE_CLIENT_ID, "X-Api-Key": process.env.TRENDLINE_API_KEY,
"X-Api-Secret": process.env.TRENDLINE_API_SECRET };
const r = await fetch(`${BASE}/public/v1/markets?venue=polymarket&venue_market_id=bitcoin-above-100k-on-december-31`, { headers: HEADERS });
console.log(r.status, await r.json());
{
"markets": [
{
"event_universal_id": "ev-btc-100k-2026",
"legs": {
"kalshi": {
"state": "live",
"venue_market_id": "KXBTC-26DEC31-B100000"
},
"polymarket": {
"state": "live",
"venue_market_id": "bitcoin-above-100k-on-december-31"
}
},
"title": "Bitcoin above $100,000 on December 31?",
"universal_id": "mk-btc-100k-2026"
}
],
"venue": "polymarket",
"venue_market_id": "bitcoin-above-100k-on-december-31"
}{
"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
the key's id; public
the key's secret (tl_live_…), shown once at creation; never log or share it
the key's own client id (cli_…), different for every key; public
Query Parameters
the venue whose market id this is
Available options:
kalshi, polymarket, limitless, predictfun the venue's own market id, as orders take it: Polymarket's and Limitless's slug, predict.fun's id, Kalshi's ticker
Required string length:
1 - 256