Manage Sessions
A main key session is a JWT the account obtained with its own key. JWTs from subkeys, readonly tokens and other sessions are refused on routes reserved for the owner.
The session object
List sessions
Returns the owner’s sessions in every state, newest first, with cursor pagination.
Response 200: { "results": [ <session>, ... ], "next": "...", "prev": "..." }
Returns 403 when the caller is not the owner’s main key session.
Get a session
Returns one session object. The owner’s main key session can read any of its sessions, and a session can read itself. Any other caller gets 404, whether or not the grant exists.
Revoke a session
Revokes the session on every account it covers, and its JWTs stop working. The owner’s main key session can revoke any of its sessions; a session can revoke itself, which is how an app signs out. Revoking a session that is already revoked succeeds.
What happens to the session’s orders:
Revoking a session does not revoke the builder approval its grant carried.
Without cancel_orders, the RFQs the session created stay open. The revoked session can no longer execute them, but the owner can, and can cancel them with DELETE /v1/rfqs/{rfq_id}.
The Paradex app’s own sign out sends no cancel_orders, so orders placed from the app keep working after you sign out. Both SDKs send cancel_orders=true by default, since a revoked session key can no longer cancel its own orders.
Response 204 with no body.
A 5xx can come after the grant is already revoked, before the server cancels its orders. The session key can no longer retry, so the owner retries with cancel_orders=true, which cancels the orders even though the grant is already revoked.
Revoke all sessions
Revokes every session the owner has opened, on every account each one covers. Each session’s WebSocket connections are closed, and its TWAPs and untriggered stops are canceled. Pass cancel_orders=true to also cancel their resting orders.
Response 204 with no body. Returns 403 when the caller is not the owner’s main key session.
Set a session’s IP allowlist
Replaces the session’s IP allowlist on every account it covers. Once the list has any entries, sign in and every request made with the session must come from an IP inside it:
- REST requests and
POST /v1/auth/{public_key}from any other IP return403 IP_NOT_ALLOWED; - over WebSocket, sign in and order requests from any other IP are refused, and open connections from outside the new list are closed with code
4035, which triggers cancel on disconnect for those connections.
The change takes effect within seconds. Only the owner’s main key session can set the list, so a session can never widen its own.
Response 200: the updated session object.
A 5xx response means the list may have been stored without taking effect everywhere. Send the same request again.
Check a session’s status
Takes no JWT and returns only the session’s state, nothing about the owner, the accounts or the grant’s terms.
Response 200
state is active, revoked or expired. An unknown or malformed grant id returns 404, which a client should treat the same as revoked.
Use it when a session JWT or /auth call is refused: if the state is revoked or expired, drop the session key and its JWTs for every account and stop reconnecting. Any other answer means the refusal was not caused by the session ending, so retry with a short backoff. A 403 on an ordinary call is a refused action, usually a missing scope, and never means the session has ended. Both SDKs follow this rule.
The route is rate limited per IP like other public endpoints, so call it on a refusal rather than polling it.