Create Setting

POST

https://api.sfox.com/v1/enterprise/monetization/settings

Create a monetization setting.


The first step to monetizing your user's activity is to create monetization settings. Using this endpoint, Partners can specify the feature, method, currency, and user they would like the fee to be applied to.

Monetization Configuration Combinations

The following combinations of Feature and Method are supported

Monetization Feature
Monetization Method(s)

RFQ

FEE_RATE , SPREAD_ADJUSTMENT

SPOT_TRADE

FEE_RATE

Request

Body Parameters

Parameter
Type
Description

feature required

string

  • RFQ

  • SPOT_TRADE

  • WITHDRAW

method required

string

  • FEE_RATE

  • FEE_FLAT

  • SPREAD_ADJUSTMENT

user_id

string

The Connect user ID this fee is specified for. If no user_id is specified, the fee is applied to all users.

amount required

number

The monetization amount in decimal format i.e. 0.01 (1%)

security_pair

string

Used when applying a FEE_RATE or SPREAD_ADJUSTMENT to a specific instrument, such as btcusd

Example Requests

curl -X POST \
 -H 'Content-type: application/json' \
 -H "Authorization: Bearer ${ENTERPRISE_API_KEY}" \
 --data '{ "feature": "SPOT_TRADE",
          "method": "FEE_RATE",
          "amount": 0.01,
          "user_id": "client25" }'  \
 'https://api.sfox.com/v1/enterprise/monetization/settings'

Response

Response Body

Field
Description

monetization_id int

Unique ID for this monetization setting.

monetization_feature string

Feature this setting applies to.

monetization_feature_code string

API readable code for the feature.

monetization_method string

Monetization method of the setting.

monetization_method_code string

API readable code for the monetization method.

monetization_amount number

Monetization amount in decimal format.

user_id string

User ID of the end user that the setting is applied to, if applicable. null if the setting applies to all end users.

currency_code string

Currency that the setting is applied to, if applicable. null if the setting applies to all currencies or is not applicable to currencies.

currency_pair string

Currency pair that the setting is applied to, if applicable. null if the setting applies to all pairs or is not applicable to currency pairs.

date_updated datetime

Date and time the setting was most recently updated or created.

Responses

201 Created
{
    "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,
        "currency_pair": null,
        "date_updated": "2023-06-07T21:49:22.000Z"
    }
}
422 Unprocessable Content
Duplicate Setting
{
    "error": "Monetization setting already exists"
}
403 Forbidden
No Feature Permission
{
    "error": "You do not have RFQ monetization permission"
}
No Method Permission
{
    "error": "You do not have FEE_RATE monetization permission for RFQ"
}

Last updated