LoanApplication
Submits a loan application backed by totem collateral. The applicant pledges totems as security for the loan.
Request
POST /nxt?requestType=loanApplication
Parameters
| Name | Type | Description | Required |
|---|---|---|---|
secretPhrase | string | Applicant's secret passphrase | Yes |
currency | long | Currency ID for the loan | Yes |
totem | long | Totem ID used as collateral | Yes |
quantityQNT | long | Quantity of totem units pledged | Yes |
unitsQNT | long | Number of currency units requested | Yes |
issuanceHeight | int | Block height at which loan is issued | Yes |
repaymentHeight | int | Block height at which loan must be repaid | Yes |
interestRate | long | Interest rate percentage (0-100) | Yes |
feeRateQNTPerFXT | long | Transaction fee rate | Optional |
deadline | int | Transaction deadline in minutes | Optional |
Constraints
unitsQNTcannot exceed current currency supplyrepaymentHeightmust be >=issuanceHeight- Totem collateral is locked for the duration of the loan
Response
{
"transaction": "1234567890123456789",
"fullHash": "abc123...",
"errorCode": 0,
"errorDescription": ""
}
Error Handling
| Error | Condition |
|---|---|
NOT_ENOUGH_FUNDS | Insufficient balance for transaction fee |
Example
curl -X POST http://localhost:22024/nxt \
-d "requestType=loanApplication" \
-d "secretPhrase=your_phrase" \
-d "currency=987654321" \
-d "totem=11111" \
-d "quantityQNT=500000000" \
-d "unitsQNT=1000000000" \
-d "issuanceHeight=1000" \
-d "repaymentHeight=2000" \
-d "interestRate=5"