Skip to content

← market-intelligence

GET/api/v1/market-intelligence/deltas

Get Deltas

Incremental delta endpoint - frontend polling 15-30s pattern. SCAFFOLD : returns empty delta list. Real implementation will query `screener_asset_latest WHERE updated_at > :since LIMIT 200` and emit only changed fields (compact payload ~160 bytes/asset). Anti-pattern interdit (brainstorm §5.6) : PAS de SSE Top 200 global push 5s pour 1K users (fragile FastAPI sans Redis). Polling 15-30s suffit au MVP.

Authentication

This endpoint requires the X-API-Key header or a valid Clerk JWT. Accepted schemes: APIKeyHeader, HTTPBearer.

See Authentication for details.

Query parameters

NameTypeRequiredDescription
sincestringISO 8601 timestamp (e.g. '2026-05-18T10:30:00Z'). Returns rows changed after this.

Responses

StatusDescriptionSchema
200Successful ResponseDeltasResponse
422Validation ErrorHTTPValidationError

See the standard error codes documented in the Error codes.

Code samples

Three ready-to-paste implementations. Replace $TRINITY_API_KEY with your API key (generated from the dashboard under Profile → API keys).

cURL

curl -X GET \
  'https://api.trinityinsights.io/api/v1/market-intelligence/deltas?since=value' \
  -H 'X-API-Key: $TRINITY_API_KEY'

Python

import os
import requests

BASE = "https://api.trinityinsights.io"
headers = {
    "X-API-Key": os.environ["TRINITY_API_KEY"],
}
params = {
    "since": "value",  # required
}

response = requests.get(f"{BASE}/api/v1/market-intelligence/deltas", headers=headers, params=params, timeout=10)
response.raise_for_status()
data = response.json()

JavaScript

const apiKey = process.env.TRINITY_API_KEY;

const response = await fetch(
  "https://api.trinityinsights.io/api/v1/market-intelligence/deltas?since=value",
  {
    method: "GET",
    headers: {
      "X-API-Key": apiKey,
    },
  },
);

if (!response.ok) {
  throw new Error(`HTTP ${response.status}`);
}
const data = await response.json();

Institutional disclaimer

Trinity Insights is an educational and analytical tool. Values returned by this endpoint do not constitute investment advice. Trinity Insights is not a Crypto-Asset Service Provider (CASP) registered under MiCA Regulation (EU) 2023/1114. See the full disclaimer.