1. Get a key
API access is free, and our team approves each account.- Sign in at trendlinelabs.ai and open API keys from your account menu (trendlinelabs.ai/developer).
- Choose Request API access. You can add a short note about what you are building.
- Once we approve it, the same page shows the key manager. Choose Create key, pick its scopes and copy the key.
tl_live_ plus a secret. The secret is shown once, at creation, so store it somewhere safe.
You can list and revoke your keys on the same page.
Until access is granted, creating a key answers 403 access_not_granted.
2. Make your first request
Every request sends the key as a bearer token. Set it once:- curl:
examples/getKey.sh - Python:
examples/getKey.py - JavaScript (Node 18+, an ES module):
examples/getKey.mjs
examples/getKey.response.json: the key’s id, scopes, tier, and its limit per
window_s seconds.
3. Walk from an event to a book
- List events:
examples/listEvents.sh(.py,.mjs). Each event carries itsuniversal_id. - Read one event:
examples/getEvent.sh. Itsmarketslist carries each market’suniversal_id. - Read a market’s order book on one venue:
examples/getOrderbook.sh.
TRENDLINE_API_BASE and TRENDLINE_API_KEY from the environment, so the same file
runs against any base you point it at.
4. What every answer carries
X-Request-Id: this request’s id. Send your ownX-Request-Idand it is echoed; the error envelope’srequest_idis the same value. Quote it when you ask for help.Cache-Control: no-storeon every operation’s answer (not on the reference document itself).X-RateLimit-Limit,X-RateLimit-RemainingandX-RateLimit-Resetonce your key has passed the rate limiter (see Rate limits).
Examples on this page
getKey
Response
listEvents
Response
getEvent
Response
getOrderbook
Response