Skip to main content
POST
/
markets
/
lending_vaults
/
deposits
Get list of Vault depositors
curl --request POST \
  --url https://tars.loopscale.com/v1/markets/lending_vaults/deposits \
  --header 'Content-Type: application/json' \
  --data '
{
  "vaultAddresses": [
    "<string>"
  ],
  "principalMints": [
    "<string>"
  ]
}
'
import requests

url = "https://tars.loopscale.com/v1/markets/lending_vaults/deposits"

payload = {
"vaultAddresses": ["<string>"],
"principalMints": ["<string>"]
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({vaultAddresses: ['<string>'], principalMints: ['<string>']})
};

fetch('https://tars.loopscale.com/v1/markets/lending_vaults/deposits', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://tars.loopscale.com/v1/markets/lending_vaults/deposits",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'vaultAddresses' => [
'<string>'
],
'principalMints' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://tars.loopscale.com/v1/markets/lending_vaults/deposits"

payload := strings.NewReader("{\n \"vaultAddresses\": [\n \"<string>\"\n ],\n \"principalMints\": [\n \"<string>\"\n ]\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://tars.loopscale.com/v1/markets/lending_vaults/deposits")
.header("Content-Type", "application/json")
.body("{\n \"vaultAddresses\": [\n \"<string>\"\n ],\n \"principalMints\": [\n \"<string>\"\n ]\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://tars.loopscale.com/v1/markets/lending_vaults/deposits")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"vaultAddresses\": [\n \"<string>\"\n ],\n \"principalMints\": [\n \"<string>\"\n ]\n}"

response = http.request(request)
puts response.read_body
[
  {
    "vaultAddress": "AXanCP4dJHtWd7zY4X7nwxN5t5Gysfy2uG3XTxSmXdaB",
    "userDeposits": [
      {
        "userAddress": "2fyUG8mSGgCkh9jDaSHToN4dPrp5x3Bb7boETVMRHR6h",
        "amountSupplied": 41214262
      }
    ]
  }
]
"Something went wrong: You have an error in your SQL syntax."
"Failed to deserialize the JSON body into the target type: missing field `mints` at line 1 column 1."

Body

application/json
vaultAddresses
string[]

List of vaults to query by, must include this or principalMints.

principalMints
string[]

List of principal tokens to query by, must include this or vaultAddresses.

Response

A list of Vaults and an array of users and their balances in the Vault

vaultAddress
string

The Vault the deposits are mapped to

userDeposits
object[]

Deposits per user to corresponding Vault