sFOX API
Sign InOpen Account
Connect API
Connect API
  • Introduction
    • Welcome
    • Getting Started
    • Resources
      • Terminology
      • Systems & Operations
      • Integration Options
    • Guides
      • End User Onboarding & KYC
        • Individuals
        • Businesses
        • Enhanced Due Diligence
  • REST API
    • REST Endpoints
    • Authentication
    • End Users
      • Create End User Account
      • Request Verification Code
      • Confirm Verification Code
      • Create User Auth Token(s)
      • Get End User(s)
      • Get EDD Requests
      • Get EDD Prompts
      • Create EDD Responses
        • Uploading Files as Responses
      • Submit Documents
      • Deactivate User
    • Payments
      • Create Bank Account (Plaid)
      • Create Bank Account
      • Get Bank Account
      • Get Plaid Processors
      • Amend Plaid Processors
      • Verify Bank Account
      • Delete Bank Account
      • Get Wire Instructions
      • Get ACH Agreement Status
      • Request ACH Onboarding
      • Get ACH Deposit Limit
    • Withdrawals
      • Confirm Withdrawal
      • Resend Confirmation Code
      • Cancel Withdrawal
    • Transfers
      • Create Transfer
      • Confirm Transfer
      • Resend Confirmation Code
      • Cancel Transfer
      • Get Transfer Permissions
      • Get Transfer History
    • Monetization
      • Create Setting
      • Update Setting
      • Delete Setting
      • Get Settings
      • Get Permissions
      • Get Monetization History
  • WebSocket API
    • Connecting
    • Authentication
    • Subscribing & Unsubscribing
    • Message Format
    • End Users
      • Onboarding
      • Balances
      • Orders
      • Trades
    • Market Data
      • Order Book
      • Trades
      • Ticker
  • Single Sign-On
    • Overview
      • IdP Initiated SSO
    • IdP Data
    • SAML Response Data
  • Errors
    • Error Codes
Powered by GitBook
  1. REST API
  2. Monetization

Get Monetization History

GET https://api.sfox.com/v1/enterprise/monetization/history

This endpoint returns all records of processed fee entries from a Partner. Partners have the ability to filter by user_id, currency, feature, method, and time period. Unprocessed fees will not be included in the response.

Query Parameters

Name
Type
Description

from_date

int

Start date of the query in UNIX timestamp to milliseconds

to_date

int

End date of the query in UNIX timestamp to milliseconds

feature

string

Filters the response by that feature i.e. RFQ

method

string

Filters the response by that method i.e. FEE_RATE

user_id

string

Filters the response by that user i.e. ClientAccount1

currency

string

Filters the response by that currency i.e. ETH

Responses

Responses are limited to 50,000 entries per request.

200 OK
{
    "data": [
        {
            "monetization_ledger_id": 1,
            "date_added": "2023-06-23T17:11:46.000Z",
            "date_processed": "2023-06-26T21:33:04.000Z",
            "user_id": null,
            "currency_code": "usd",
            "instrument": null,
            "order_id": 123456,
            "trade_id": 987654,
            "staking_info_id": null,
            "atx_id": null,
            "monetized_feature_code": "SPOT_TRADE",
            "monetization_method_code": "FEE_RATE",
            "monetization_amount": 0.002,
            "fee_amount": 2.869906
        },
        {
            "monetization_ledger_id": 2,
            "date_added": "2023-06-23T17:11:46.000Z",
            "date_processed": "2023-06-26T21:33:04.000Z",
            "user_id": null,
            "currency_code": "usd",
            "instrument": null,
            "order_id": 637257,
            "trade_id": 938276,
            "staking_info_id": null,
            "atx_id": null,
            "monetized_feature_code": "RFQ",
            "monetization_method_code": "FEE_RATE",
            "monetization_amount": 0.0004,
            "fee_amount": 0.1026374
        },
        {
            "monetization_ledger_id": 3,
            "date_added": "2023-06-23T17:11:46.000Z",
            "date_processed": "2023-06-26T21:33:04.000Z",
            "user_id": "ClientAccount1",
            "currency_code": "btc",
            "instrument": null,
            "order_id": null,
            "trade_id": null,
            "staking_info_id": null,
            "atx_id": 827357,
            "monetized_feature_code": "WITHDRAW",
            "monetization_method_code": "FLAT_FEE",
            "monetization_amount": 0.0001,
            "fee_amount": 0.0001
        }
}

Response Body

Key
Description

monetization_ledger_id

Unique ID for this monetization ledger entry

date_added

Date the fee was charged

date_processed

Date the fee was processed/paid

user_id

User Id of the user that the fee was debited

currency_code

Currency of the fee

instrument

Instrument of the trade the fee applied to

order_id

Order ID of the order the fee is charged to

trade_id

Trade ID of the trade the fee is charged to

staking_info_id

Stake ID of the stake the fee is charged to

atx_id

Transaction ID the fee is charged to

monetized_feature_code

Feature the fee came from

monetization_amount

Fee Rate

fee_amount

Fee Amount

curl -X GET \
-H "Authorization: Bearer ${ENTERPRISE_API_KEY}" \
'https://api.sfox.com/v1/enterprise/monetization/history?feature=SPOT_TRADE'
const axios = require('axios');

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

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.get(
  "https://api.sfox.com/v1/enterprise/monetization/history",
  params={
    "feature": "SPOT_TRADE"
  }
  headers={
    "Authorization": f"Bearer {os.environ['ENTERPRISE_API_KEY']}"
  }
)
print(data)
PreviousGet PermissionsNextConnecting

Last updated 11 months ago