---
title: "GET /public/exchange_token"
method: GET
path: "/public/exchange_token"
tags: ["Authentication", "Public"]
---

# GET /public/exchange_token

`GET /public/exchange_token`

Generates a token for a new subject id. This method can be used to switch between subaccounts.

**📖 Related Articles:** 
- [Fork and Exchange Tokens](https://docs.deribit.com/articles/authentication#fork-and-exchange-tokens)
- [Managing Subaccounts](https://docs.deribit.com/articles/managing-subaccounts-api)

[Try in API console](https://test.deribit.com/api_console?method=%2Fpublic%2Fexchange_token)

## Query parameters

- `refresh_token` string, required
- `subject_id` integer, required
- `scope` string

## Response `200`

Success response

- PublicTokenResponse
  - `jsonrpc` '2.0', required — The JSON-RPC version (2.0)
  - `id` integer — The id that was sent in the request
  - `result` object, required
    - `access_token` string, required
    - `token_type` 'bearer', required — Authorization type, allowed value - `bearer`
    - `expires_in` integer, required — Token lifetime in seconds
    - `refresh_token` string, required — Can be used to request a new token (with a new lifetime)
    - `scope` string, required — Type of the access for assigned token
    - `sid` string — Optional Session id

---

[API](https://skmtc.net/deribit/apis/deribit-api.md) · [All operations](https://skmtc.net/deribit/apis/deribit-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/deribit/deribit-api/versions/78a0783dbfcc/schema)
