Account Management
Private

Updates the scope (permissions) for an existing API key. The scope determines which operations the API key can perform (e.g., read-only, read-write, trading, etc.).

When the scope is changed, the API key immediately loses access to operations outside the new scope. Applications using this key may need to be updated to reflect the new permissions.

TFA required

📖 Related Articles:

Scope: account:read_write

Try in API console

get/private/change_scope_in_api_key

Request

  • Base URL
    https://test.deribit.com/api/v2
  • URL
    https://test.deribit.com/api/v2/private/change_scope_in_api_key
  • Auth
    none declared

Query parameters

max_scopestring[] required

Describes maximal access for tokens generated with given key. If scope is not provided, its value is set as none.

📖 Related Article: Access Scope

[
  "account:read",
  "trade:read",
  "block_trade:read_write",
  "wallet:none"
]
idinteger required
Example:1

API key ID

Response

Success response

jsonrpc'2.0' required

The JSON-RPC version (2.0)

idinteger

The id that was sent in the request

Example response

{
  "result": {
    "id": 1,
    "timestamp": 1536569522277,
    "client_id": "IY2D68DS",
    "client_secret": "P9Z_c73KaBPwpoTVfsXzehAhjhdJn5kM7Zlz_hhDhE8",
    "public_key": "-----BEGIN PUBLIC KEY----- MCowBQYDK2VwAyEApajFN0CSwIaaiIRPiFbiYYvpsLQLSccSLLsKPe984sc= -----END PUBLIC KEY-----",
    "max_scope": [
      "account:read",
      "trade:read",
      "block_trade:read_write",
      "wallet:none"
    ],
    "enabled": true,
    "name": "TestName"
  }
}

Changes

No recorded changes to this operation across all 11 revisions of this API.