QuickSwapBrokerService
Get fee totals
Total the broker and affiliate fees charged in a window, per asset, by vault, day or month.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/quickswap/brokers/value/fee-totals?groupBy=BY_VAULT&vaultAccountId=7563897446546' \ --header 'Accept: */*' \ --header 'X-API-KEY-ID: YOUR_API_KEY_ID' \ --header 'X-API-TIMESTAMP: YOUR_API_TIMESTAMP' \ --header 'X-API-SIGNATURE: YOUR_API_SIGNATURE'
Responses
{
"totals": [
{
"amount": {
"baseUnits": "value",
"decimals": 36
},
"assetId": 100,
"periodStart": "2025-01-01T00:00:00Z",
"swapCount": "1",
"vaultAccountId": "7563897446546"
}
]
}Broker name.
End of the window, an RFC 3339 time, exclusive, at most 366 days after startTime.
How to group the totals.
Start of the window, an RFC 3339 time, inclusive.
Only fees credited to this vault, as a decimal public account ID.
Unsigned integer amount in the token's smallest unit (for example satoshis or wei), as a decimal string without sign, exponent, separators or leading zeros; at most 78 digits.
valueToken decimals: the display amount is base_units / 10^decimals. Required in requests, where it must equal AssetChainVariant.source_decimals (the token's on-chain decimals) in GET /v1/chain/deposit-withdraw/config of the asset the amount is in: the source asset for a SOURCE_AMOUNT amount; the destination asset for a DESTINATION_AMOUNT amount and for Protection.min_amount_out.
36Asset credited, as an AssetConfig.ledger_id from GET /v1/chain/deposit-withdraw/config.
100BY_DAY or BY_MONTH: start of the UTC day or month; unset for BY_VAULT.
2025-01-01T00:00:00ZQuickSwaps that were charged a fee in this group and asset.
1BY_VAULT: public sub-account ID of the credited vault; zero otherwise.
7563897446546| Key | HTTP status | Connect code | Error | When |
|---|---|---|---|---|
| unauthenticated | 401 | unauthenticated | Unauthenticated | Authentication required. |
| permission-denied | 403 | permission_denied | Permission Denied | Permission denied. |
| invalid-argument | 400 | invalid_argument | Invalid Argument | Invalid argument. |
| not-found | 404 | not_found | Not Found | Not found. |
| unavailable | 503 | unavailable | Unavailable | Service unavailable. |