AddressBookService
List Address Books
List the root and subaccount address books visible to the caller.
Method
GET
Path
/v1/auth/address-books
Visibility
Authentication
Session token or API key
MFA Requirement
Not required
GET
/v1/auth/address-books Request
Testnet
curl --request GET \ \ --url 'https://api.testnet.polyester.com/v1/auth/address-books' \ --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
{
"books": [
{
"callerRole": "VIEWER",
"label": "Main Account",
"ownerUsername": "trader_alpha",
"scope": {
"rootAccountId": "7563897446546",
"scopeType": "ROOT",
"subaccountId": "341ihSXYWzi"
},
"smartAccountAddress": "0x2222222222222222222222222222222222222222"
}
]
} 5 fields
3 fields
scopeType enum
Address-book scope type.
SCOPE_ROOT SCOPE_SUBACCOUNT
Example
ROOT rootAccountId string (fixed64)
Root account that owns this address book.
Example
7563897446546 subaccountId string (fixed64)
Subaccount for subaccount-scoped books. Empty for root account books.
Example
341ihSXYWzi callerRole enum
Caller role for this address book.
VIEWER TRADER LEVERAGED_TRADER TREASURY ADMIN OWNER
Example
VIEWER label string
Display label for the address book. Usually present for subaccounts.
Example
Main Account ownerUsername string
Username of the root owner when available.
Example
trader_alpha smartAccountAddress string
Smart account address associated with this account or subaccount.
Example
0x2222222222222222222222222222222222222222| Key | Status | Error | When |
|---|---|---|---|
| unauthenticated | 401 | Unauthenticated | Authentication required. |
| permission-denied | 403 | Permission Denied | Permission denied. |
| invalid-argument | 400 | Invalid Argument | Invalid argument. |
| not-found | 404 | Not Found | Not found. |
| unavailable | 503 | Unavailable | Service unavailable. |