Session tokens are best for frontend applications where you need to authenticate users in the browser. Sessions are created by your backend using the project API key, then passed to the client. Sessions expire after a period of inactivity but can be refreshed.Documentation Index
Fetch the complete documentation index at: https://api.synthesis.trade/docs/llms.txt
Use this file to discover all available pages before exploring further.
Header
| Name | Type | Required | Description |
|---|---|---|---|
Authorization | string | Yes | Bearer token format: Bearer <session_token> |
Flow
Pass token to client
Return the session token to the frontend (e.g., via HTTP-only cookie or secure storage).
Step 1: Create a session
This is called from your backend using the project API key.Step 2: Use the session token
Pass the token from the response as a Bearer token in your client requests.Refresh a session
Expire the existing session and issue a new one. This extends the user’s authenticated session without requiring them to re-authenticate.Expire a session
Manually expire a specific session or all sessions for an account.Available routes
All routes under/api/v1/account/* and /api/v1/wallet/* accept session tokens.
| Route | Method | Description |
|---|---|---|
/api/v1/account/session | GET | Get current session info |
/api/v1/wallets | GET | List wallets |
/api/v1/wallet/pol/{id}/order | POST | Place an order |
/api/v1/wallet/pol/{id}/balance | GET | Get wallet balance |
/api/v1/wallet/pol/{id}/positions | GET | Get positions |
| … | All wallet and account endpoints |