Utility

Calculate max loan amount

post
/api/v1/calculate-max-loan-amount
  • Calculate max loan amount of a pool, based on collateral amount and health factor

Body
loanTokenstring · {policyId}.{assetName}Required

Token id of loan token

Example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
healthFactornumber · doubleRequired

Health factor of this loan

Example: 1.23
borrowRateinteger · nullableOptional

Borrow rate of this Pool in bais point, used for calculating max loan amount of Fixed Pool

Example: 500
loanDurationinteger · nullableOptional

Loan duration in days, used for calculating max loan amount of Fixed Pool

Example: 7
Responses
chevron-right
200

Success

application/json
codeintegerOptional

response code, 200 is success, other code is not success

traceIdstringOptional

Trace ID of the request (required when request is error). Trace ID is used to trace the root cause of the error quickly.

messagestringOptional

response message

post
/api/v1/calculate-max-loan-amount

Calculate health factor

post
/api/v1/calculate-health-factor
  • Calculate health factor of a loan, based on loan amount and collateral amount

Body
loanTokenstring · {policyId}.{assetName}Required

Token id of loan token

Example: 29d222ce763455e3d7a09a665ce554f00ac89d2e99a1a83d267170c6.4d494e
loanAmountstring · bigintRequired

Loan amount

Example: 1231354
Responses
chevron-right
200

Success

application/json
codeintegerOptional

response code, 200 is success, other code is not success

traceIdstringOptional

Trace ID of the request (required when request is error). Trace ID is used to trace the root cause of the error quickly.

messagestringOptional

response message

post
/api/v1/calculate-health-factor

Last updated