QuickSwapBrokerService
Create affiliate vault
Create or return the broker's affiliate vault for a label.
Method
POST
Path
/v1/quickswap/brokers/{broker}/vaults
Visibility
Authentication
Session token
MFA Requirement
Not required
POST
/v1/quickswap/brokers/{broker}/vaults Request
Testnet
curl --request POST \ \
--url 'https://api.testnet.polyester.com/v1/quickswap/brokers/value/vaults' \
--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' \
--header 'Content-Type: application/json' \
--data '{
"label": "Name Of My Subaccount"
}'Responses
{
"created": false,
"vault": {
"accountId": "7563897446546",
"createdAt": "2025-01-01T00:00:00Z",
"label": "Name Of My Subaccount",
"status": "VAULT_ACTIVE",
"updatedAt": "2025-01-01T00:00:00Z"
}
} broker string
Broker name.
label string
Label, 1 to 64 characters without leading or trailing whitespace, unique per broker. The same label always returns the same vault.
created boolean
Whether this request created it.
Example
false 5 fields
accountId string
Public sub-account ID of the vault; name it in AffiliateShare.account_id.
Example
7563897446546 createdAt string (date-time)
When the vault was created.
Example
2025-01-01T00:00:00Z label string
Broker-chosen label, unique per broker.
Example
Name Of My Subaccount status enum
Whether new QuickSwaps can name the vault.
VAULT_ACTIVE VAULT_DISABLED
Example
VAULT_ACTIVE updatedAt string (date-time)
When the vault was last changed.
Example
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. |