Skip to main content
POST
/
markets
/
creditbook
/
repay
Repay loan
curl --request POST \
  --url https://tars.loopscale.com/v1/markets/creditbook/repay \
  --header 'Content-Type: application/json' \
  --data '{
  "loan": "<string>",
  "collateralWithdrawalParams": [
    {
      "amount": 123,
      "collateralMint": "<string>"
    }
  ],
  "repayParams": [
    {
      "amount": 123,
      "ledgerIndex": 123,
      "repayAll": true
    }
  ],
  "cpiIxs": [
    {
      "programId": "<string>",
      "accounts": [
        {
          "pubkey": "<string>",
          "isSigner": true,
          "isWritable": true
        }
      ],
      "data": "<string>"
    }
  ],
  "cpiLuts": [
    "<string>"
  ],
  "cpiSigners": [
    "<string>"
  ]
}'
{
  "message": "<string>",
  "signatures": [
    {
      "publicKey": "<string>",
      "signature": "<string>"
    }
  ]
}

Body

application/json
loan
string
required

Loan address to repay

collateralWithdrawalParams
object[]
required

List of collateral assets to withdraw before repayment

repayParams
object[]
required

List of principal repayment instructions

cpiIxs
object[]

Optional CPI instructions to run between withdrawal and repayment

cpiLuts
string[]

Optional list of address lookup tables

cpiSigners
string[]

Optional list of signer keypairs

Response

Serialized transaction message and signatures

message
string
required

Base64-encoded versioned transaction message

signatures
object[]
required
I