swap.quickswap.v1.QuickSwapBrokerService
ListQuickSwaps
ListQuickSwaps lists the broker's QuickSwaps, newest first, filtered by vault, status and creation time. Errors: - NOT_FOUND: BROKER_NOT_FOUND. - INVALID_ARGUMENT: a page_token from another broker, other filters or malformed.
Request
curl --request POST \ \
--url 'https://api.testnet.polyester.com/swap.quickswap.v1.QuickSwapBrokerService/ListQuickSwaps' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{
"broker": "value",
"endTime": "2025-01-01T00:00:00Z",
"limit": 100,
"pageToken": "eyJvZmZzZXQiOjEwMH0",
"startTime": "2025-01-01T00:00:00Z",
"statuses": [
"ALLOCATING"
],
"vaultAccountId": "7563897446546"
}'Responses
{
"nextPageToken": "eyJvZmZzZXQiOjIwMH0",
"quickSwaps": [
{
"chargedFees": [
{
"accountId": "7563897446546",
"amount": {
"baseUnits": "value",
"decimals": 36
},
"assetId": 100,
"kind": "SERVICE"
}
],
"createdAt": "2025-01-01T00:00:00Z",
"fees": {
"affiliates": [
{
"accountId": "7563897446546",
"bps": 1
}
],
"brokerBps": 1
},
"idempotencyKey": "idem_01J5EXAMPLE0000000000000",
"isTerminal": false,
"reason": "SOURCE_SCREENING_FAILED",
"status": "ALLOCATING",
"swapId": "1",
"terms": {
"amount": {
"baseUnits": "value",
"decimals": 36
},
"basis": "SOURCE_AMOUNT",
"destinationZippedAssetId": 100,
"execution": {
"market": {}
},
"protection": {
"maxSlippageBps": 1
},
"sourceZippedAssetId": 100
},
"updatedAt": "2025-01-01T00:00:00Z"
}
]
}swap.quickswap.v1.ListQuickSwapsRequestswap.quickswap.v1.ListQuickSwapsResponseBroker name. A broker API key may name only its own broker.
Only QuickSwaps whose fees credit this vault: an affiliate vault they name, or the default vault when they set a broker fee. Zero for every QuickSwap.
Only QuickSwaps in one of these statuses, at most 16; empty for every status.
Only QuickSwaps created at or after start_time; unset for no lower bound.
Only QuickSwaps created before end_time (exclusive); unset for no upper bound.
Maximum number of QuickSwaps to return; 0 means 100, at most 200.
Opaque keyset cursor from a previous next_page_token, exclusive, bound to the broker, the filters and the newest-first order by creation time, then swap_id. Reuse it with the same filters. Empty for the first page.
Public QuickSwap identifier.
The broker's idempotency key that created it.
Current status.
Why the status is notable; REASON_UNSPECIFIED otherwise.
True when status is terminal.
Source asset and network: an AssetChainVariant.zipped_asset_id from GET /v1/chain/deposit-withdraw/config. The end user deposits this asset on this network.
Destination asset and network: an AssetChainVariant.zipped_asset_id from GET /v1/chain/deposit-withdraw/config. The end user receives this asset on this network.
Side of the swap that amount denominates.
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.
Maximum shortfall from the quoted expected output in basis points (1 bp = 0.01%), from 1 to 1000. Converted at creation into the quote's min_amount_out and min_rate.
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.
Execute immediately.
Total execution duration in milliseconds, from 60000 (1 minute) to 86400000 (24 hours). The duration starts when execution starts, not when the QuickSwap is created.
Interval between slices in milliseconds, from 10000 (10 seconds) up to duration_ms. The slice count is duration_ms / slice_interval_ms, rounded up.
Broker fee in basis points of what each leg receives, credited to the broker's default vault.
Public sub-account ID of an active affiliate vault of the broker (QuickSwapBrokerService.CreateAffiliateVault). Create the vault first: an unknown, disabled or other broker's vault, or the default vault, fails with AFFILIATE_VAULT_UNKNOWN.
Fee in basis points of what each leg receives, from 1 to 300.
BROKER or AFFILIATE.
Public sub-account ID of the credited vault: the default vault for BROKER, the affiliate vault for AFFILIATE.
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.
When the QuickSwap was created.
When the QuickSwap last changed.
Cursor of the next page. Empty when no more results exist.
| 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. |