QuickSwapBrokerService
Get broker stats
Read the broker's QuickSwaps by status, deposits, payouts and fees in a window, per day or month.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/quickswap/brokers/value/stats?groupBy=DAY' \ --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
{
"periods": [
{
"createdCount": "1",
"delivered": [
{
"amount": {
"baseUnits": "value",
"decimals": 36
},
"assetId": 100
}
],
"deposited": [
{
"amount": {
"baseUnits": "value",
"decimals": 36
},
"assetId": 100
}
],
"fees": [
{
"affiliateFee": {
"baseUnits": "value",
"decimals": 36
},
"assetId": 100,
"brokerFee": {
"baseUnits": "value",
"decimals": 36
},
"serviceFee": {
"baseUnits": "value",
"decimals": 36
}
}
],
"periodStart": "2025-01-01T00:00:00Z",
"statuses": [
{
"count": "1",
"status": "ALLOCATING"
}
]
}
]
}Broker name.
End of the window, an RFC 3339 time, exclusive, at most 366 days after startTime.
The UTC period to group by.
Start of the window, an RFC 3339 time, inclusive.
QuickSwaps created in the period, inside the window.
1Unsigned 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, as an AssetConfig.ledger_id from GET /v1/chain/deposit-withdraw/config.
100Unsigned 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, as an AssetConfig.ledger_id from GET /v1/chain/deposit-withdraw/config.
100Unsigned 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 charged, as an AssetConfig.ledger_id from GET /v1/chain/deposit-withdraw/config.
100Unsigned 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.
36Unsigned 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.
36Start of the UTC day or month.
2025-01-01T00:00:00ZQuickSwaps in it.
1The status.
ALLOCATING| 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. |