Accounts

Retrieves 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.

get/accounts

Request

  • Base URL
    https://api.cert.zerohash.com
  • URL
    https://api.cert.zerohash.com/accounts
  • Auth
    API key in header X-SCX-API-KEY and API key in header X-SCX-PASSPHRASE

Query parameters

pagestring

Filters for a specific page (pagination)

account_groupstring

Filters for accounts with a specific account_group which will map to your zerohash platform_code

account_labelstring

Filters for accounts with a specific account_label

account_ownerstring

Filters for accounts with a specific account_owner (this field mirrors as a participant_code)

asset'AAVE.ETH' | 'ADA' | 'ALGO' | 'AVAX' | 'BAT.ETH' | 'BCH' | 'BTC' | 'BUSD.ETH' | 'COMP.ETH' | 'DAI.ETH' | 'DOGE' | 'DOT' | 'EGLD' | 'EOS' | 'ETC' | 'ETH' | 'ETH.ARBITRUM' | 'GRT.ETH' | 'GYEN.ETH' | 'HBAR' | 'LINK.ETH' | 'LTC' | 'LUNA' | 'MATIC.ETH' | 'MATIC.POLYGON' | 'MKR.ETH' | 'MOB' | 'SAND.ETH' | 'SOL' | 'UNI.ETH' | 'USDC.ETH' | 'USDC.ALGO' | 'USDC.POLYGON' | 'USDC.SOL' | 'USDC.HBAR' | 'USDC.XLM' | 'USDC.AVAX' | 'USDT.ETH' | 'UST' | 'WBTC.ETH' | 'XEM' | 'XLM' | 'XRP' | 'XTZ' | 'ZUSD.ETH'

The list of assets available in the certification environment

Example:USD

Filters for accounts with a specific asset. Rejected with 400 when it falls outside the asset pinned by a crypto-withdrawals JWT.

account_type'available' | 'collateral' | 'payable' | 'receivable' | 'collateral_deficiency' | 'staked'
Example:available

Filters for accounts with a specific account_type

Headers

X-SCX-SIGNEDstring required

HMAC-SHA256 signature of the request, base64-encoded. See the Authentication guide for the exact signing formula.

X-SCX-TIMESTAMPstring required
Example:1678901234

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.

pagenumber
total_pagesnumber

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 query request parameter account_type was restricted to a list of enum values

    • info

      added the new enum value available to the query request parameter account_type

    • info

      added the new enum value collateral to the query request parameter account_type

    • info

      added the new enum value collateral_deficiency to the query request parameter account_type

    • info

      added the new enum value payable to the query request parameter account_type

    • info

      added the new enum value receivable to the query request parameter account_type

    • info

      added the new enum value staked to the query request parameter account_type