POST
/
markets
/
creditbook
/
flash_borrow
Flash borrow
curl --request POST \
  --url https://tars.loopscale.com/v1/markets/creditbook/flash_borrow \
  --header 'Content-Type: application/json' \
  --header 'user-wallet: <user-wallet>' \
  --data '{
  "principalRequested": [],
  "depositCollateral": [],
  "cpiIxs": [
    {
      "programId": "<string>",
      "accounts": [
        {
          "pubkey": "<string>",
          "isSigner": true,
          "isWritable": true
        }
      ],
      "data": "<string>"
    }
  ],
  "cpiLuts": [
    "<string>"
  ],
  "cpiSigners": [
    "<string>"
  ],
  "loanAddress": "<string>",
  "setupIxs": [
    {
      "programId": "<string>",
      "accounts": [
        {
          "pubkey": "<string>",
          "isSigner": true,
          "isWritable": true
        }
      ],
      "data": "<string>"
    }
  ],
  "setupLuts": [
    "<string>"
  ],
  "setupSigners": [
    "<string>"
  ]
}'
{
  "transactions": [
    {
      "message": "<string>",
      "signatures": [
        {
          "publicKey": "<string>",
          "signature": "<string>"
        }
      ]
    }
  ],
  "loanAddress": "<string>"
}

Headers

user-wallet
string
required

Wallet address of the borrowing user

Body

application/json

Response

200
application/json

Serialized transaction and resulting loan address

The response is of type object.