# Get Settings

<table data-header-hidden><thead><tr><th width="82.40625">HTTP Method</th><th>URL</th></tr></thead><tbody><tr><td><mark style="color:green;">GET</mark></td><td>https://api.sfox.com/v1/enterprise/monetization/settings</td></tr></tbody></table>

Retrieve a list of your monetization settings

***

This endpoint returns active monetization settings created by the Partner. Partners can filter by `feature`, `method`, `user_id`, or `currency`. An empty request body will return all active monetization settings for the Partner.

## Request

### Body Parameters

<table><thead><tr><th width="174">Parameter</th><th valign="top">Description</th></tr></thead><tbody><tr><td><code>feature</code><br>string</td><td valign="top">Filter the response by this feature (e.g. <code>SPOT_TRADE</code>)</td></tr><tr><td><code>method</code> <br>string</td><td valign="top">Filter the response by this method. </td></tr><tr><td><code>currency</code> <br>string</td><td valign="top">Filter the response by this currency. </td></tr><tr><td><code>user_id</code> <br>string</td><td valign="top">Filter the response by this <code>user_id</code>.</td></tr></tbody></table>

### Example Requests

{% tabs %}
{% tab title="Shell" %}

```sh
curl -X GET \
 -H 'Content-type: application/json' \
 -H "Authorization: Bearer ${ENTERPRISE_API_KEY}" \
 --data '{ "feature": "SPOT_TRADE" }'  \
 'https://api.sfox.com/v1/enterprise/monetization/settings'
```

{% endtab %}

{% tab title="NodeJS" %}

```javascript
const axios = require('axios');

const config = {
  method: 'post',
  url: 'https://api.sfox.com/v1/enterprise/monetization/settings',
  headers: {
    'Authorization': `Bearer ${process.env.ENTERPRISE_API_KEY}`
  },
  data: {
    feature: 'SPOT_TRADE'
  }
}

axios(config)
  .then((response) => {
    console.log(response.status);
    console.log(response.data);
  })
  .catch((error) => {
    console.error(error.response.status);
    console.error(error.response.data);
  });
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import os

data = requests.get(
  "https://api.sfox.com/v1/enterprise/monetization/settings",
  headers={
    "Authorization": f"Bearer {os.environ['ENTERPRISE_API_KEY']}"
  },
  json={
    "feature": "SPOT_TRADE"
  }
)
print(data.status_code)
print(data.json())
```

{% endtab %}
{% endtabs %}

## Response

Returns a `data` object list. Each object contains the following response fields.

### Response Fields

<table><thead><tr><th width="262.71875">Field</th><th valign="top">Description</th></tr></thead><tbody><tr><td><code>monetization_id</code> <br>int</td><td valign="top">Unique ID for this monetization setting.</td></tr><tr><td><code>monetization_feature</code> <br>string</td><td valign="top">Feature this setting applies to.</td></tr><tr><td><code>monetization_feature_code</code> <br>string</td><td valign="top">API readable code for the feature.</td></tr><tr><td><code>monetization_method</code> <br>string</td><td valign="top">Monetization method of the setting.</td></tr><tr><td><code>monetization_method_code</code> <br>string</td><td valign="top">API readable code for the monetization method.</td></tr><tr><td><code>monetization_amount</code> <br>number</td><td valign="top">Monetization amount in decimal format.</td></tr><tr><td><code>user_id</code> <br>string</td><td valign="top">User ID of the end user that the setting is applied to, if applicable. <code>null</code> if the setting applies to all end users.</td></tr><tr><td><code>currency_code</code> <br>string</td><td valign="top">Currency that the setting is applied to, if applicable. <code>null</code> if the setting applies to all currencies or is not applicable to currencies.</td></tr><tr><td><code>currency_pair</code> <br>string</td><td valign="top">Currency pair that the setting is applied to, if applicable. <code>null</code> if the setting applies to all pairs or is not applicable to currency pairs.</td></tr><tr><td><code>date_updated</code> <br>datetime</td><td valign="top">Date and time the setting was most recently updated or created.</td></tr></tbody></table>

### Responses

<details>

<summary><mark style="color:green;"><strong>200 OK</strong></mark></summary>

{% code overflow="wrap" lineNumbers="true" expandable="true" %}

```json
{
  "data": [
    {
        "monetization_id": 1310717,
        "monetization_feature": "Spot Trading",
        "monetization_feature_code": "SPOT_TRADE",
        "monetization_method": "Fee Rate",
        "monetization_method_code": "FEE_RATE",
        "monetization_amount": 0.01,
        "user_id": "client25",
        "currency_code": null,
        "security_pair_raw": null,
        "date_updated": "2023-06-07T21:49:22.000Z"
    },
    {
        "monetization_id": 1310720,
        "monetization_feature": "Request for Quote",
        "monetization_feature_code": "RFQ",
        "monetization_method": "Spread Adjustment",
        "monetization_method_code": "SPREAD_ADJUSTMENT",
        "monetization_amount": 0.01,
        "user_id": null,
        "currency_code": null,
        "security_pair_raw": null,
        "date_updated": "2023-06-07T22:49:22.000Z"
    }
  ]
}
```

{% endcode %}

</details>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sfox.com/connect/rest-api/monetization/get-settings.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
