Create Setting

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

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

WITHDRAW

FEE_FLAT

Body Parameters

Name
Type
Description

feature required

string

  • RFQ

  • SPOT_TRADE

  • WITHDRAW

method required

string

  • FEE_RATE

  • FEE_FLAT

  • SPREAD_ADJUSTMENT

currency

string

The currency that this fee is specified for. If no currency is specified, the fee is applied to all currencies. i.e. btc

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%)

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"
}

Response Body

Key
Description

monetization_id

Unique ID for this monetization setting

monetization_feature

Feature the fee will apply to

monetization_feature_code

API readable monetization feature

monetization_method

Monetization method of the setting

monetization_method_code

API readable monetization method

monetization_amount

Monetization amount in decimal format

user_id

User Id of the user that the fee is specified for

currency_code

Currency that the fee is specified for

currency_pair

Currency pair that the fee is specified for

date_updated

Date and time the fee was created or updated

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'

Last updated