Przejdź do głównej zawartości

Platform Fees

GET
/user/fees/

Get fee balances collected by the platform, recent fee collection events, and total fee estimates. This is an admin-level endpoint for monitoring fee revenue.

Authentication

Requires OAuth 2.0 authentication with admin scope.

Example Request

curl -X GET {{BASE_URL}}/user/fees/ \
-H "Authorization: Bearer your_access_token"

Response

Success Response (200 OK)

{
"fee_balances": {
"USDTERC20": "150.50",
"USDCERC20": "75.25",
"ETH": "0.023456"
},
"recent_collections": [
{
"currency": "USDTERC20",
"amount": "1.50",
"collected_at": "2025-01-15T09:30:00Z"
},
{
"currency": "ETH",
"amount": "0.001200",
"collected_at": "2025-01-15T08:15:00Z"
}
],
"total_fees_usd_estimate": "425.75"
}

Response Fields

FieldTypeDescription
fee_balancesobjectAccumulated fee balances per currency
recent_collectionsarrayList of recent fee collection events
total_fees_usd_estimatestringEstimated total fees across all currencies in USD

Error Responses

401 Unauthorized

{
"error": {
"code": "authentication_failed",
"message": "Invalid or missing authentication token",
"details": {}
}
}

403 Forbidden

{
"error": {
"code": "permission_denied",
"message": "Token does not have required scope",
"details": {
"required_scopes": ["admin"],
"token_scopes": ["read", "write"]
}
}
}

Important Notes

  • This endpoint requires admin scope, which must be explicitly requested when obtaining the OAuth token
  • Fee balances represent collected platform fees, not network fees
  • The USD estimate uses current exchange rates and may fluctuate

Next Steps