API Reference
Integrate the Loopscale protocol
cURL
curl --request POST \ --url https://tars.loopscale.com/v1/markets/creditbook/close_loan \ --header 'Content-Type: application/json' \ --header 'user-wallet: <user-wallet>' \ --data ' { "loan": "<string>", "postIxs": [ { "programId": "<string>", "accounts": [ { "pubkey": "<string>", "isSigner": true, "isWritable": true } ], "data": "<string>" } ] } '
{ "message": "<string>", "signatures": [ { "publicKey": "<string>", "signature": "<string>" } ] }
In the event a loan is fully repaid and all collateral is withdrawn, but wasn’t closed, this directly closes the loan account and refunds the user.
Wallet address of the borrowing user
Loan address to close
Optional instructions to add to the transaction to atomically execute after the close instruction succeeds.
Show child attributes
Program ID to call
Base64 or hex-encoded instruction data
Serialized transaction
Base64-encoded versioned transaction message