QuickSwapBrokerService
Get broker
Get the broker, its limits and current usage, and the caller's role.
Request
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/quickswap/brokers/value' \ --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
{
"broker": {
"createRps": 1,
"defaultVaultAccountId": "7563897446546",
"displayName": "value",
"enabled": false,
"maxAffiliateVaults": 1,
"maxCreatesPerHour": 1,
"maxUnfundedAddresses": 1,
"name": "value",
"quoteRps": 1,
"readRps": 1,
"role": "OWNER",
"rootAccountId": "7563897446546"
},
"usage": {
"affiliateVaults": 1,
"createsLastHour": 1,
"unfundedAddresses": 1
}
}Broker name.
Create requests per second allowed for each API key of the broker, which is also the burst. Over the rate, CreateQuickSwap fails with RESOURCE_EXHAUSTED / BROKER_LIMIT and a Retry-After header.
1Public sub-account ID of the default vault, credited with broker fees that name no affiliate.
7563897446546Display name.
valueWhether the broker may quote and create QuickSwaps. A disabled broker keeps reads, vaults, keys and members.
falseAffiliate vaults the broker may create, active and disabled together. At the limit, CreateAffiliateVault fails with RESOURCE_EXHAUSTED / BROKER_LIMIT.
1Quick Swaps the broker may create in any rolling hour. At the limit, CreateQuickSwap fails with RESOURCE_EXHAUSTED / BROKER_LIMIT until the oldest create of the hour is more than an hour old.
1Unfunded Quick Swaps the broker may hold at once: Quick Swaps whose deposit address is being issued or is still awaiting a deposit within its funding window. At the limit, CreateQuickSwap fails with RESOURCE_EXHAUSTED / BROKER_LIMIT; a deposit or the end of a funding window frees a slot.
1Broker name: the immutable identifier used in every request.
valueQuote requests per second allowed for each API key of the broker, which is also the burst. Over the rate, QuoteQuickSwap fails with RESOURCE_EXHAUSTED / BROKER_LIMIT and a Retry-After header.
1Read requests per second allowed for each API key of the broker, which is also the burst. GetQuickSwap and every QuickSwapBrokerService call by an API key count as reads. Over the rate, the call fails with RESOURCE_EXHAUSTED / BROKER_LIMIT and a Retry-After header.
1The caller's role; BROKER_ROLE_UNSPECIFIED for a broker API key.
OWNERPublic account ID of the broker's root account.
7563897446546Affiliate vaults created, active and disabled together, counted against Broker.max_affiliate_vaults.
1Quick Swaps created in the last hour, counted against Broker.max_creates_per_hour.
1Unfunded Quick Swaps held now, counted against Broker.max_unfunded_addresses.
1| 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. |