Skip to main content

GetAccountCurrencyCount

Retrieves the number of currency holdings for a specific account, optionally filtered by currency and height.

Request

GET /nxt?requestType=get-accountCurrencyCount

Parameters

NameTypeDescriptionRequired
accountstringAccount ID or NXT addressYes
currencylongCurrency ID (optional - returns count for all currencies if omitted)Optional
heightintBlockchain height for historical queryOptional
includeCurrencyInfobooleanInclude currency metadataOptional

Response

{
"numberOfAccounts": 150
}

Response Fields Description

FieldTypeDescription
numberOfAccountsintNumber of currency accounts held

Example

# Get currency count for an account
curl "http://localhost:22024/nxt?requestType=get-accountCurrencyCount&account=1234567890"

# Get count with currency filter
curl "http://localhost:22024/nxt?requestType=get-accountCurrencyCount&account=1234567890&currency=987654321"