> ## Documentation Index
> Fetch the complete documentation index at: https://finance.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Settings & Clients

> Manage settings and OAuth2 clients with the JavaScript SDK

## Overview

Manage user settings, global configuration, and OAuth2 client applications.

## Settings API

### getUserSettings(category)

```javascript theme={null}
const settings = await client.settings.getUserSettings('trading');
```

### updateUserSetting(category, key, value)

```javascript theme={null}
await client.settings.updateUserSetting('trading', 'default_quantity', 100);
```

### resetUserSettings(category)

```javascript theme={null}
await client.settings.resetUserSettings('trading');
```

## Clients API (OAuth2)

### getClients()

```javascript theme={null}
const clients = await client.oauthClients.getClients();
clients.forEach(c => {
  console.log(`${c.name}: ${c.clientId}`);
});
```

### createClient(params)

```javascript theme={null}
const oauthClient = await client.oauthClients.createClient({
  name: 'My Trading App',
  redirectUris: ['https://myapp.com/callback']
});

console.log(`Client ID: ${oauthClient.clientId}`);
console.log(`Client Secret: ${oauthClient.clientSecret}`);
```

### updateClient(clientId, updates)

```javascript theme={null}
await client.oauthClients.updateClient(clientId, {
  name: 'Updated App Name'
});
```

### deleteClient(clientId)

```javascript theme={null}
await client.oauthClients.deleteClient(clientId);
```
