QuickSwapBrokerService
List QuickSwaps
List the broker's QuickSwaps, newest first, by vault, status and creation time.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/quickswap/brokers/value/quickswaps?endTime=2025-01-01T00%3A00%3A00Z&limit=100&startTime=2025-01-01T00%3A00%3A00Z&status=ALLOCATING&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
{
"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"
}
]
}Broker name.
Only QuickSwaps created before this RFC 3339 time (exclusive).
Maximum number of QuickSwaps to return; 0 means 100, at most 200.
Opaque keyset cursor from a previous nextPageToken, exclusive, bound to the broker, the filters and the newest-first order. Omit for the first page.
Only QuickSwaps created at or after this RFC 3339 time.
Only these QuickSwapStatus names, at most 16: repeat the parameter (?status=HELD&status=COMPLETED).
Only QuickSwaps whose fees credit this vault (an affiliate vault they name, or the default vault when they set a broker fee), as a decimal public account ID.
Cursor of the next page. Empty when no more results exist.
eyJvZmZzZXQiOjIwMH0Public sub-account ID of the credited vault: the default vault for BROKER, the affiliate vault for AFFILIATE.
7563897446546Unsigned 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.
100BROKER or AFFILIATE.
SERVICEWhen the QuickSwap was created.
2025-01-01T00:00:00ZPublic 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.
7563897446546Fee in basis points of what each leg receives, from 1 to 300.
1Broker fee in basis points of what each leg receives, credited to the broker's default vault.
1The broker's idempotency key that created it.
idem_01J5EXAMPLE0000000000000True when status is terminal.
falseWhy the status is notable; REASON_UNSPECIFIED otherwise.
SOURCE_SCREENING_FAILEDCurrent status.
ALLOCATINGPublic QuickSwap identifier.
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.
36Side of the swap that amount denominates.
SOURCE_AMOUNTDestination asset and network: an AssetChainVariant.zipped_asset_id from GET /v1/chain/deposit-withdraw/config. The end user receives this asset on this network.
100Execute 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.
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.
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.
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.
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.
100When the QuickSwap last changed.
2025-01-01T00:00:00Z| 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. |