GET
https://api.sfox.com/v1/enterprise/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.
Body Parameters
A feature returns settings for that feature i.e. SPOT_TRADE
A method returns settings for that method i.e. FEE_RATE
A currency returns settings for that currency. i.e. btc
A Connect user ID returns settings relative to a user
Responses
200 OK
Copy {
"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"
}
]
}
Response Body
Unique ID for this monetization setting
Feature the fee will apply to
monetization_feature_code
API readable monetization feature
Monetization method of the setting
API readable monetization method
Monetization amount in decimal format
User Id of the user that the fee is specified for
Currency that the fee is specified for
Currency pair that the fee is specified for
Date and time the fee was created or updated
Example Requests
Shell NodeJS Python
Copy 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'
Copy 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);
});
Copy 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())
Last updated 11 months ago