E-Signatures
List Loan Agreements
List the loan agreements of a market
GET
/
lending-external-securities-v2
/
api
/
markets
/
{marketId}
/
loan-agreements
List Loan Agreements
curl --request GET \
--url https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/loan-agreements \
--header 'x-api-key: <api-key>'import requests
url = "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/loan-agreements"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/loan-agreements', 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://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/loan-agreements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/loan-agreements"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/loan-agreements")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/loan-agreements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"agreements": [
{
"ref": "agr_k3vx7q2mwd4h5pn6tr8a",
"kind": "LOAN",
"status": "SIGNED",
"marketAddress": "0x41b9c4d5dee70a5e3682094462e5065275e728a9",
"chainRef": {
"network": "ETHEREUM",
"instanceType": "DEVELOPMENT"
},
"borrowerWallet": "0x7c1e3a5f2b9d4e6a8c0f1b3d5e7a9c2b4d6f8e1a",
"externalReference": "CASE-2026.11_042",
"scheduleHash": "0x8e2c4a6f1b3d5e7a9c0f2b4d6e8a1c3f5b7d9e0a2c4f6b8d1e3a5c7f9b0d2e4a",
"scheduleVersion": "1.0.0",
"scheduleFrozen": true,
"hashScheme": "SALTED_V1",
"documentCommitment": "0x3a7f9c2e5b1d8a4f6c0e2b9d7a3f1c5e8b4d2a6f0c9e7b3d1a5f8c2e6b4d0a9f",
"certificateCommitment": null,
"copyVerified": null,
"nextStep": "VERIFY_AND_ACCEPT",
"expiresAt": "2026-12-21T16:02:11.000Z",
"viewerRole": {
"bank": true,
"borrower": false
}
}
],
"total": 1,
"truncated": false,
"viewer": {
"isBank": true
},
"marketId": "cmwfk2h7x0003jw9w4q8b2n1c"
},
"error": null
}
Lists the market’s loan agreements, newest change first, at most 200. The bank sees every agreement of the market. Any other instance sees the agreements it requested and those naming one of its verified wallets. The list leaves out the salt; read one agreement for it. A
FRAMEWORK agreement in force carries its remaining limit.
Path Parameters
Query Parameters
One status, for example
SIGNED. EXPIRED includes agreements whose offer ran out but are not marked yet.Response Fields
Show child attributes
Show child attributes
{
"success": true,
"data": {
"agreements": [
{
"ref": "agr_k3vx7q2mwd4h5pn6tr8a",
"kind": "LOAN",
"status": "SIGNED",
"marketAddress": "0x41b9c4d5dee70a5e3682094462e5065275e728a9",
"chainRef": {
"network": "ETHEREUM",
"instanceType": "DEVELOPMENT"
},
"borrowerWallet": "0x7c1e3a5f2b9d4e6a8c0f1b3d5e7a9c2b4d6f8e1a",
"externalReference": "CASE-2026.11_042",
"scheduleHash": "0x8e2c4a6f1b3d5e7a9c0f2b4d6e8a1c3f5b7d9e0a2c4f6b8d1e3a5c7f9b0d2e4a",
"scheduleVersion": "1.0.0",
"scheduleFrozen": true,
"hashScheme": "SALTED_V1",
"documentCommitment": "0x3a7f9c2e5b1d8a4f6c0e2b9d7a3f1c5e8b4d2a6f0c9e7b3d1a5f8c2e6b4d0a9f",
"certificateCommitment": null,
"copyVerified": null,
"nextStep": "VERIFY_AND_ACCEPT",
"expiresAt": "2026-12-21T16:02:11.000Z",
"viewerRole": {
"bank": true,
"borrower": false
}
}
],
"total": 1,
"truncated": false,
"viewer": {
"isBank": true
},
"marketId": "cmwfk2h7x0003jw9w4q8b2n1c"
},
"error": null
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
INVALID_AGREEMENT_FILTER | 400 | status or loanId is not valid |
INVALID_WALLET | 400 | borrower is not an address |
MARKET_NOT_FOUND | 404 | No market with this ID on your instance |
CHAIN_UNAVAILABLE, SERVICE_UNAVAILABLE | 503 | The market or your instance’s wallets could not be read just now. Nothing was decided. Retry shortly |
⌘I
List Loan Agreements
curl --request GET \
--url https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/loan-agreements \
--header 'x-api-key: <api-key>'import requests
url = "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/loan-agreements"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/loan-agreements', 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://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/loan-agreements",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/loan-agreements"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/loan-agreements")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/loan-agreements")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"agreements": [
{
"ref": "agr_k3vx7q2mwd4h5pn6tr8a",
"kind": "LOAN",
"status": "SIGNED",
"marketAddress": "0x41b9c4d5dee70a5e3682094462e5065275e728a9",
"chainRef": {
"network": "ETHEREUM",
"instanceType": "DEVELOPMENT"
},
"borrowerWallet": "0x7c1e3a5f2b9d4e6a8c0f1b3d5e7a9c2b4d6f8e1a",
"externalReference": "CASE-2026.11_042",
"scheduleHash": "0x8e2c4a6f1b3d5e7a9c0f2b4d6e8a1c3f5b7d9e0a2c4f6b8d1e3a5c7f9b0d2e4a",
"scheduleVersion": "1.0.0",
"scheduleFrozen": true,
"hashScheme": "SALTED_V1",
"documentCommitment": "0x3a7f9c2e5b1d8a4f6c0e2b9d7a3f1c5e8b4d2a6f0c9e7b3d1a5f8c2e6b4d0a9f",
"certificateCommitment": null,
"copyVerified": null,
"nextStep": "VERIFY_AND_ACCEPT",
"expiresAt": "2026-12-21T16:02:11.000Z",
"viewerRole": {
"bank": true,
"borrower": false
}
}
],
"total": 1,
"truncated": false,
"viewer": {
"isBank": true
},
"marketId": "cmwfk2h7x0003jw9w4q8b2n1c"
},
"error": null
}
