Skip to main content
POST
/
markets
/
creditbook
/
refinance
Refinance loan
curl --request POST \
  --url https://tars.loopscale.com/v1/markets/creditbook/refinance \
  --header 'Content-Type: application/json' \
  --header 'user-wallet: <user-wallet>' \
  --data '{
  "loan": "<string>",
  "oldStrategy": "<string>",
  "newStrategy": "<string>",
  "refinanceParams": {
    "ledgerIndex": 123,
    "durationIndex": 123
  }
}'
{
  "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 refinance

oldStrategy
string
required

Strategy address to refinance from.

newStrategy
string
required

Strategy address to refinance to, can be the same as old if just updating duration or start time.

refinanceParams
object
required

Response

Serialized transaction

message
string
required

Base64-encoded versioned transaction message

signatures
object[]
required