swap.quickswap.v1.QuickSwapBrokerService
GetBroker
GetBroker returns the broker, its limits and current usage of them, and the caller's role. Errors: - NOT_FOUND: BROKER_NOT_FOUND.
Request
curl --request POST \ \
--url 'https://api.testnet.polyester.com/swap.quickswap.v1.QuickSwapBrokerService/GetBroker' \
--header 'Content-Type: application/json' \
--header 'Connect-Protocol-Version: 1' \
--data '{
"broker": "value"
}'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
}
}swap.quickswap.v1.GetBrokerRequestswap.quickswap.v1.GetBrokerResponseBroker name. A broker API key may name only its own broker.
Broker name: the immutable identifier used in every request.
Display name.
Whether the broker may quote and create QuickSwaps. A disabled broker keeps reads, vaults, keys and members.
Public account ID of the broker's root account.
Public sub-account ID of the default vault, credited with broker fees that name no affiliate.
Affiliate vaults the broker may create, active and disabled together. At the limit, CreateAffiliateVault fails with RESOURCE_EXHAUSTED / BROKER_LIMIT.
The caller's role; BROKER_ROLE_UNSPECIFIED for a broker API key.
Quote 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.
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.
Read 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.
Unfunded 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.
Quick 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.
Unfunded Quick Swaps held now, counted against Broker.max_unfunded_addresses.
Quick Swaps created in the last hour, counted against Broker.max_creates_per_hour.
Affiliate vaults created, active and disabled together, counted against Broker.max_affiliate_vaults.
| 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. |