Skip to main content

GetCurrencyAccounts

Retrieves all account-currency holding mappings for a specific currency, with pagination support.

Request

GET /nxt?requestType=get-currencyAccounts

Parameters

NameTypeDescriptionRequired
currencylongCurrency IDYes
heightintBlockchain height for historical queryOptional
firstIndexintPagination start index (default: 0)Optional
lastIndexintPagination end index (default: MAX)Optional
includeCurrencyInfobooleanInclude currency metadata in each resultOptional

Response

{
"accountCurrencies": [
{
"account": "1234567890",
"accountRS": "NXT-abcd-efgh-ijkl",
"currency": "987654321",
"unitsQNT": "5000000000",
"unconfirmedUnitsQNT": "1000000000"
}
]
}

Response Fields Description

FieldTypeDescription
accountstringAccount ID
accountRSstringAccount in NXT format
currencystringCurrency ID
unitsQNTstringConfirmed units held
unconfirmedUnitsQNTstringUnconfirmed units pending confirmation

Example

# Get all accounts holding a specific currency
curl "http://localhost:22024/nxt?requestType=get-currencyAccounts&currency=987654321&firstIndex=0&lastIndex=50"

# Get with currency info
curl "http://localhost:22024/nxt?requestType=get-currencyAccounts&currency=987654321&includeCurrencyInfo=true"