Authentication
How to authenticate with the Titan API.
The Titan API uses JSON Web Tokens (JWTs) for authentication. Every connection requires a valid token issued by Titan or a Titan distributor.
Submitting your token
You can submit your JWT in two ways:
As a Bearer token in the Authorization header — the recommended approach for server-side integrations:
Authorization: Bearer <your-jwt>As a query parameter — for browser clients or environments where setting custom headers isn't possible (e.g. WebSocket clients that only support Sec-WebSocket-Protocol):
wss://YOUR_ENDPOINT/api/v1/ws?auth=<your-jwt>
https://YOUR_ENDPOINT/api/v1/quote/swap?auth=<your-jwt>Do not expose your JWT in client-side code. Set up a middleware proxy that injects the token server-side. See the middleware example for a basic reference — you can build your own middleware to fit your stack and authentication flow.
Getting a token
See Get API Access.
Last updated

