Skip to main content
POST
/
markets
/
quote
Get quotes
curl --request POST \
  --url https://tars.loopscale.com/v1/markets/quote \
  --header 'Content-Type: application/json' \
  --header 'user-wallet: <user-wallet>' \
  --data '{
  "durationType": 123,
  "duration": 123,
  "principal": "<string>",
  "limit": 123,
  "offset": 123,
  "collateral": [
    "<string>"
  ],
  "minPrincipalAmount": 123
}'
[
  {
    "apy": 123,
    "ltv": 123,
    "liquidationThreshold": 123,
    "maxPrincipalAvailable": 123,
    "sumPrincipalAvailable": 123
  }
]

Headers

user-wallet
string
required

Wallet address of the requesting user

Body

application/json
durationType
number
required

Duration type enum (0 = days, 1 = weeks, 2 = months, 3 = minutes, 4 = years)

duration
number
required

Number of units of the specified durationType

principal
string
required

Token mint address of the principal

limit
integer
required

Pagination limit (max 1000)

offset
integer
required

Pagination offset, sorted by APY

collateral
string[]
required

List of collateral asset identifiers

minPrincipalAmount
integer

Optional minimum principal amount in lamports to filter offers

Response

List of available quotes

apy
number

APY in cBPS (e.g., 10% = 100000)

ltv
number

Loan-to-value ratio in cBPS

liquidationThreshold
number

Liquidation threshold in cBPS

maxPrincipalAvailable
number

Maximum principal available in lamports

sumPrincipalAvailable
number

Total principal available in lamports for the given quote parameters

I