List accounts
Changed onRetrieves a list of all accounts and their current balances. When the request is authenticated with a crypto-withdrawals JWT that pins the withdrawal to an asset and a network, the listing is narrowed to the account for that asset.
Request
- Base URLhttps://api.cert.zerohash.com
- URLhttps://api.cert.zerohash.com/accounts
- AuthAPI key in header X-SCX-API-KEY and API key in header X-SCX-PASSPHRASE
Query parameters
Filters for a specific page (pagination)
Filters for accounts with a specific account_group which will map to your zerohash platform_code
Filters for accounts with a specific account_label
Filters for accounts with a specific account_owner (this field mirrors as a participant_code)
The list of assets available in the certification environment
Filters for accounts with a specific asset. Rejected with 400 when it falls outside the asset pinned by a crypto-withdrawals JWT.
Filters for accounts with a specific account_type
Headers
HMAC-SHA256 signature of the request, base64-encoded. See the Authentication guide for the exact signing formula.
Current Unix timestamp in seconds. Must be within 60 seconds of server time or the request is rejected.
Response
Successfully retrieved paginated list of accounts with current balances with optional filters: page, account_group, account_label, account_owner, asset, account_type.
Example response
{
"message": [
{
"asset": "USD",
"account_owner": "ABCDEF",
"account_type": "available",
"account_group": "XYZ456",
"account_label": "general",
"balance": "0.00",
"account_id": "ce819fe8-b1d7-43bb-961c-e09ede0988d3",
"last_update": 1554395972174
}
],
"page": 1,
"total_pages": 1
}Changes
- breaking
the
queryrequest parameteraccount_typewas restricted to a list of enum values - info
added the new enum value
availableto thequeryrequest parameteraccount_type - info
added the new enum value
collateralto thequeryrequest parameteraccount_type - info
added the new enum value
collateral_deficiencyto thequeryrequest parameteraccount_type - info
added the new enum value
payableto thequeryrequest parameteraccount_type - info
added the new enum value
receivableto thequeryrequest parameteraccount_type - info
added the new enum value
stakedto thequeryrequest parameteraccount_type
- breaking