Terms of Use
List Terms Versions
List every saved version of the terms of use for a market
GET
/
lending-external-securities-v2
/
api
/
markets
/
{marketId}
/
terms
/
versions
curl "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/terms/versions?limit=10" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/markets/${marketId}/terms/versions?limit=10`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const drafts = data.versions.filter((v: { published: boolean }) => !v.published);
{
"success": true,
"data": {
"versions": [
{
"id": "sectermsv_003",
"version": 3,
"title": "ACME Secured Lending Facility: Terms of Use",
"contentHash": "0xf0b3379e4102181f66822fd86cd5c1f93e448e5bdfd3f8961151b05c5feacc5a",
"curatorAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"published": true,
"live": true,
"createdAt": "2026-09-10T09:12:44.000Z"
},
{
"id": "sectermsv_002",
"version": 2,
"title": "ACME Secured Lending Facility: Terms of Use",
"contentHash": "0x5d4b74a6814f6236b5572f4165ae340dfd276faf02d78da3f5672a452ee9f289",
"curatorAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"published": false,
"live": false,
"createdAt": "2026-09-02T16:41:09.000Z"
},
{
"id": "sectermsv_001",
"version": 1,
"title": "ACME Secured Lending Facility: Terms of Use",
"contentHash": "0xc06e3f9145b8a27d0e5347fb1c9820a6d4738e5107ba2c9df6410a83e27b5cd4",
"curatorAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"published": true,
"live": false,
"createdAt": "2026-08-28T14:03:07.000Z"
}
],
"current": 3
}
}
{
"success": true,
"data": {
"versions": [],
"current": null
}
}
Returns the version history of the market’s terms of use, newest first. Every save that changes the document writes a version, and the current one is listed with the rest. The terms a market presented at any point stay recoverable and auditable.
Version bodies are not included here. This endpoint answers what changed and when. Read one version in full with Get Terms Version.
Drafts are listed too, whatever their publication state. Unpublishing writes no version. After Unpublish Terms,
current is null and no entry is live, matching the TERMS_NOT_PUBLISHED that Get Terms answers. Each entry keeps published as the record of how it was saved.
Path Parameters
string
required
Query Parameters
integer
default:"25"
Versions to return. Clamped to between 1 and 100 rather than refused.
0 or a value that is not a number falls back to 25.Response Fields
object
Show child attributes
Show child attributes
array
Versions ordered by
version descending, newest first. A draft staged beside published terms comes before the current version. Empty when the market has no terms.Show child attributes
Show child attributes
string
Version record ID.
integer
Version number.
string
Document title at that version.
null when none was set.string
keccak256 over the UTF-8 bytes of the markdown at that version.
string
The wallet that saved it: the lender of record, or a wallet holding the market’s admin or issuer role.
boolean
Whether that save published the document or kept it as a draft.
boolean
Whether this version is the one served now. Only the current version of published terms is.
string
ISO 8601 time of the save.
integer
The version served now, or
null when no terms exist or they are unpublished.curl "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/terms/versions?limit=10" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/markets/${marketId}/terms/versions?limit=10`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const drafts = data.versions.filter((v: { published: boolean }) => !v.published);
{
"success": true,
"data": {
"versions": [
{
"id": "sectermsv_003",
"version": 3,
"title": "ACME Secured Lending Facility: Terms of Use",
"contentHash": "0xf0b3379e4102181f66822fd86cd5c1f93e448e5bdfd3f8961151b05c5feacc5a",
"curatorAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"published": true,
"live": true,
"createdAt": "2026-09-10T09:12:44.000Z"
},
{
"id": "sectermsv_002",
"version": 2,
"title": "ACME Secured Lending Facility: Terms of Use",
"contentHash": "0x5d4b74a6814f6236b5572f4165ae340dfd276faf02d78da3f5672a452ee9f289",
"curatorAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"published": false,
"live": false,
"createdAt": "2026-09-02T16:41:09.000Z"
},
{
"id": "sectermsv_001",
"version": 1,
"title": "ACME Secured Lending Facility: Terms of Use",
"contentHash": "0xc06e3f9145b8a27d0e5347fb1c9820a6d4738e5107ba2c9df6410a83e27b5cd4",
"curatorAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"published": true,
"live": false,
"createdAt": "2026-08-28T14:03:07.000Z"
}
],
"current": 3
}
}
{
"success": true,
"data": {
"versions": [],
"current": null
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
MISSING_MARKET_ID | 400 | The market ID is longer than 100 characters |
NO_MARKET_ADDRESS | 400 | The market has no on-chain address |
MARKET_NOT_FOUND | 404 | No market with this ID on your instance |
⌘I
curl "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/terms/versions?limit=10" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/markets/${marketId}/terms/versions?limit=10`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const drafts = data.versions.filter((v: { published: boolean }) => !v.published);
{
"success": true,
"data": {
"versions": [
{
"id": "sectermsv_003",
"version": 3,
"title": "ACME Secured Lending Facility: Terms of Use",
"contentHash": "0xf0b3379e4102181f66822fd86cd5c1f93e448e5bdfd3f8961151b05c5feacc5a",
"curatorAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"published": true,
"live": true,
"createdAt": "2026-09-10T09:12:44.000Z"
},
{
"id": "sectermsv_002",
"version": 2,
"title": "ACME Secured Lending Facility: Terms of Use",
"contentHash": "0x5d4b74a6814f6236b5572f4165ae340dfd276faf02d78da3f5672a452ee9f289",
"curatorAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"published": false,
"live": false,
"createdAt": "2026-09-02T16:41:09.000Z"
},
{
"id": "sectermsv_001",
"version": 1,
"title": "ACME Secured Lending Facility: Terms of Use",
"contentHash": "0xc06e3f9145b8a27d0e5347fb1c9820a6d4738e5107ba2c9df6410a83e27b5cd4",
"curatorAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"published": true,
"live": false,
"createdAt": "2026-08-28T14:03:07.000Z"
}
],
"current": 3
}
}
{
"success": true,
"data": {
"versions": [],
"current": null
}
}
