swap.quickswap.v1.QuickSwapBrokerService
GetFeeTotals
GetFeeTotals totals the broker and affiliate fees charged to the broker's QuickSwaps in a window, per asset, by vault, day or month. Errors: - NOT_FOUND: BROKER_NOT_FOUND.
Request
curl --request POST \ \
--url 'https://api.testnet.polyester.com/swap.quickswap.v1.QuickSwapBrokerService/GetFeeTotals' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{
"broker": "value",
"endTime": "2025-01-01T00:00:00Z",
"groupBy": "BY_VAULT",
"startTime": "2025-01-01T00:00:00Z",
"vaultAccountId": "7563897446546"
}'Responses
{
"totals": [
{
"amount": {
"baseUnits": "value",
"decimals": 36
},
"assetId": 100,
"periodStart": "2025-01-01T00:00:00Z",
"swapCount": "1",
"vaultAccountId": "7563897446546"
}
]
}swap.quickswap.v1.GetFeeTotalsRequestswap.quickswap.v1.GetFeeTotalsResponseBroker name. A broker API key may name only its own broker.
How to group the totals.
Start of the window, inclusive: fees charged at or after it.
End of the window, exclusive, at most 366 days after start_time.
Only fees credited to this vault; zero for every vault.
BY_VAULT: public sub-account ID of the credited vault; zero otherwise.
BY_DAY or BY_MONTH: start of the UTC day or month; unset for BY_VAULT.
Asset credited, as an AssetConfig.ledger_id from GET /v1/chain/deposit-withdraw/config.
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.
Token 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.
QuickSwaps that were charged a fee in this group and asset.
| 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. |