Get collateral holders
curl --request POST \
--url https://tars.loopscale.com/v1/markets/collateral/holders \
--header 'Content-Type: application/json' \
--data '
{
"mints": [
"<string>"
],
"pdas": true
}
'import requests
url = "https://tars.loopscale.com/v1/markets/collateral/holders"
payload = {
"mints": ["<string>"],
"pdas": True
}
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({mints: ['<string>'], pdas: true})
};
fetch('https://tars.loopscale.com/v1/markets/collateral/holders', 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/collateral/holders",
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([
'mints' => [
'<string>'
],
'pdas' => true
]),
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/collateral/holders"
payload := strings.NewReader("{\n \"mints\": [\n \"<string>\"\n ],\n \"pdas\": true\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/collateral/holders")
.header("Content-Type", "application/json")
.body("{\n \"mints\": [\n \"<string>\"\n ],\n \"pdas\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tars.loopscale.com/v1/markets/collateral/holders")
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 \"mints\": [\n \"<string>\"\n ],\n \"pdas\": true\n}"
response = http.request(request)
puts response.read_body[
{
"collateralMint": "6TiBRYFLs9H4wnwEVyqZfPs6bshAM9ZcaS976tDDGuD",
"totalDeposits": 389168.10806099995,
"userDeposits": {
"G7mjP2Hpj3A5d6f1LTjXUAy8MR8FDTvZcPY79RDhQv": 278911.414198,
"6Fjoe4udyj6r1ZLk3MDPcFzeDYNWvekSkjNwyEAsWTmTw": 137741.601249
}
}
]"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."Users
Get collateral holders
Fetches a list of users and total balances for one or more specified collateral mints.
POST
/
markets
/
collateral
/
holders
Get collateral holders
curl --request POST \
--url https://tars.loopscale.com/v1/markets/collateral/holders \
--header 'Content-Type: application/json' \
--data '
{
"mints": [
"<string>"
],
"pdas": true
}
'import requests
url = "https://tars.loopscale.com/v1/markets/collateral/holders"
payload = {
"mints": ["<string>"],
"pdas": True
}
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({mints: ['<string>'], pdas: true})
};
fetch('https://tars.loopscale.com/v1/markets/collateral/holders', 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/collateral/holders",
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([
'mints' => [
'<string>'
],
'pdas' => true
]),
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/collateral/holders"
payload := strings.NewReader("{\n \"mints\": [\n \"<string>\"\n ],\n \"pdas\": true\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/collateral/holders")
.header("Content-Type", "application/json")
.body("{\n \"mints\": [\n \"<string>\"\n ],\n \"pdas\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://tars.loopscale.com/v1/markets/collateral/holders")
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 \"mints\": [\n \"<string>\"\n ],\n \"pdas\": true\n}"
response = http.request(request)
puts response.read_body[
{
"collateralMint": "6TiBRYFLs9H4wnwEVyqZfPs6bshAM9ZcaS976tDDGuD",
"totalDeposits": 389168.10806099995,
"userDeposits": {
"G7mjP2Hpj3A5d6f1LTjXUAy8MR8FDTvZcPY79RDhQv": 278911.414198,
"6Fjoe4udyj6r1ZLk3MDPcFzeDYNWvekSkjNwyEAsWTmTw": 137741.601249
}
}
]"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
⌘I