Skip to main content

GetAccountCurrencyLoans

Retrieves currency loan information for a specific account, filterable by currency, height, and loan inclusion.

Request

GET /nxt?requestType=get-accountCurrencyLoans

Parameters

NameTypeDescriptionRequired
accountstringAccount ID or NXT addressYes
currencylongCurrency ID (optional - returns all currency loans if omitted)Optional
heightintBlockchain height for historical queryOptional
includeCurrencyInfobooleanInclude currency metadataOptional
includeLoansbooleanInclude detailed loan informationOptional

Response

{
"accountCurrencyLoans": [
{
"account": "1234567890",
"currency": "987654321",
"unitsQNT": "5000000000",
"due": 1000000,
"loans": [123456, 789012, 345678]
}
]
}

Response Fields Description

FieldTypeDescription
accountstringAccount ID
currencystringCurrency ID
unitsQNTstringCurrency units in the loan
dueintRepayment block height
loansint[]Array of loan IDs

Example

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

# Get with currency filter and loan details
curl "http://localhost:22024/nxt?requestType=get-accountCurrencyLoans&account=1234567890&currency=987654321&includeCurrencyInfo=true&includeLoans=true"