Skip to main content
POST
/
markets
/
creditbook
/
close_loan
Close loan
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>"
    }
  ]
}

Headers

user-wallet
string
required

Wallet address of the borrowing user

Body

application/json
loan
string
required

Loan address to close

postIxs
object[]

Optional instructions to add to the transaction to atomically execute after the close instruction succeeds.

Response

Serialized transaction

message
string
required

Base64-encoded versioned transaction message

signatures
object[]
required