Skip to main content
POST
/
markets
/
creditbook
/
collateral
/
raydium
/
update_liquidity
Update Raydium liquidity
curl --request POST \
  --url https://tars.loopscale.com/v1/markets/creditbook/collateral/raydium/update_liquidity \
  --header 'Content-Type: application/json' \
  --header 'user-wallet: <user-wallet>' \
  --data '
{
  "loan": "<string>",
  "positionMint": "<string>",
  "increase": true,
  "amount": 123,
  "slippageDecimals": 123,
  "manageParams": {
    "collateralIndex": 123,
    "liquidityAmount": 123,
    "manageParams": {
      "tokenAAmount": 123,
      "tokenBAmount": 123
    },
    "assetIndexGuidance": [
      123
    ]
  },
  "isTokenA": true
}
'
{
  "message": "<string>",
  "signatures": [
    {
      "publicKey": "<string>",
      "signature": "<string>"
    }
  ]
}

Headers

user-wallet
string
required

Wallet address of the requesting user

Body

application/json
loan
string
required

Loan address containing the Raydium position collateral

positionMint
string
required

Raydium position mint address

increase
boolean
required

Set true to add liquidity, false to remove liquidity

amount
number
required

Token amount used to derive liquidity for the update

slippageDecimals
number
required

Slippage tolerance as a decimal percentage value

manageParams
object
required
isTokenA
boolean

When set, amount is interpreted as token A; otherwise token B

Response

Serialized transaction message and signatures

message
string
required

Base64-encoded versioned transaction message

signatures
object[]
required