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
RFQ
FEE_RATE , SPREAD_ADJUSTMENT
SPOT_TRADE
FEE_RATE
Body Parameters
feature required
string
RFQSPOT_TRADEWITHDRAW
method required
string
FEE_RATEFEE_FLATSPREAD_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
Responses
Response Body
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'const axios = require('axios');
const config = {
method: 'post',
url: 'https://api.sfox.com/v1/enterprise/monetization/settings',
headers: {
"Content-Type": "application/json",
'Authorization': `Bearer ${process.env.ENTERPRISE_API_KEY}`
},
data: {
feature: 'SPOT_TRADE',
method: 'FEE_RATE',
amount: 0.01,
user_id: 'client25'
}
}
axios(config)
.then((response) => {
console.log(response.status);
console.log(response.data);
})
.catch((error) => {
console.error(error.response.status);
console.error(error.response.data);
});import requests
import os
data = requests.post(
"https://api.sfox.com/v1/enterprise/monetization/settings",
headers={
"Authorization": f"Bearer {os.environ['ENTERPRISE_API_KEY']}"
},
json={
"feature": "SPOT_TRADE",
"method": "FEE_RATE",
"amount": 0.01,
"user_id": "client25"
}
)
print(data.status_code)
print(data.json())Last updated