GetAccountCurrencyLoans
Retrieves currency loan information for a specific account, filterable by currency, height, and loan inclusion.
Request
GET /nxt?requestType=get-accountCurrencyLoans
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
account | string | Account ID or NXT address | Yes |
currency | long | Currency ID (optional - returns all currency loans if omitted) | Optional |
height | int | Blockchain height for historical query | Optional |
includeCurrencyInfo | boolean | Include currency metadata | Optional |
includeLoans | boolean | Include detailed loan information | Optional |
Response
{
"accountCurrencyLoans": [
{
"account": "1234567890",
"currency": "987654321",
"unitsQNT": "5000000000",
"due": 1000000,
"loans": [123456, 789012, 345678]
}
]
}
Response Fields Description
| Field | Type | Description |
|---|---|---|
account | string | Account ID |
currency | string | Currency ID |
unitsQNT | string | Currency units in the loan |
due | int | Repayment block height |
loans | int[] | 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¤cy=987654321&includeCurrencyInfo=true&includeLoans=true"