Terms of Use
Get Terms Version
Read one saved version of a market terms of use in full
GET
/
lending-external-securities-v2
/
api
/
markets
/
{marketId}
/
terms
/
versions
/
{version}
curl "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/terms/versions/2" \
-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/${version}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { success, data, error } = await res.json();
if (!success) throw new Error(`${error.code}: ${error.message}`);
console.log(data.terms.contentHash, data.terms.published);
{
"success": true,
"data": {
"terms": {
"id": "sectermsv_002",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"title": "ACME Secured Lending Facility: Terms of Use",
"version": 2,
"contentHash": "0x5d4b74a6814f6236b5572f4165ae340dfd276faf02d78da3f5672a452ee9f289",
"curatorAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"published": false,
"createdAt": "2026-09-02T16:41:09.000Z",
"updatedAt": "2026-09-02T16:41:09.000Z",
"templateId": null,
"templateVersion": null,
"customised": false,
"contentBytes": 86,
"format": "markdown",
"content": "# Terms of Use\n\n## 1. Parties\n\nACME Bank AG acts as lender of record for this market.\n",
"plainText": "ACME SECURED LENDING FACILITY: TERMS OF USE\n===========================================\n\nTERMS OF USE\n------------\n\n1. Parties\n\nACME Bank AG acts as lender of record for this market.\n"
}
}
}
{
"success": false,
"error": {
"code": "TERMS_VERSION_NOT_FOUND",
"message": "No such terms version"
}
}
Returns the full text of one saved version of the market’s terms of use. Use it to show exactly what a market presented at a given point, or to compare two versions listed by List Terms Versions.
The version is returned whether or not that save was published, and whether or not the terms are live today. Drafts are readable here by every instance that holds the market, because terms are stored against the market’s address rather than against the instance that wrote them.
A version carries no
Path Parameters
string
required
Market ID.
string
required
Version number, as one to six digits. Anything else is refused with
VALIDATION_ERROR.Query Parameters
string
default:"markdown"
markdown or html. Any other value is refused with VALIDATION_ERROR.Response Fields
object
Show child attributes
Show child attributes
object
Show child attributes
Show child attributes
string
Version record ID.
string
Market the terms belong to, lowercased.
string
Document title at that version.
null when none was set.integer
Version number.
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.
string
ISO 8601 time of the save.
string
Equal to
createdAt. A version is never edited.string
Always
null here. The template binding is not recorded per version.integer
Always
null here.boolean
Always
false here.integer
Size of the markdown in bytes.
string
Echoes the requested format.
string
Raw markdown. Present when
format is markdown.string
Plain-text rendering. Present when
format is markdown.string
Sanitized HTML rendering. Present when
format is html.publishedAt, and no binding block travels with it. Read the binding of the live document on Get Terms.
curl "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/terms/versions/2" \
-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/${version}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { success, data, error } = await res.json();
if (!success) throw new Error(`${error.code}: ${error.message}`);
console.log(data.terms.contentHash, data.terms.published);
{
"success": true,
"data": {
"terms": {
"id": "sectermsv_002",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"title": "ACME Secured Lending Facility: Terms of Use",
"version": 2,
"contentHash": "0x5d4b74a6814f6236b5572f4165ae340dfd276faf02d78da3f5672a452ee9f289",
"curatorAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"published": false,
"createdAt": "2026-09-02T16:41:09.000Z",
"updatedAt": "2026-09-02T16:41:09.000Z",
"templateId": null,
"templateVersion": null,
"customised": false,
"contentBytes": 86,
"format": "markdown",
"content": "# Terms of Use\n\n## 1. Parties\n\nACME Bank AG acts as lender of record for this market.\n",
"plainText": "ACME SECURED LENDING FACILITY: TERMS OF USE\n===========================================\n\nTERMS OF USE\n------------\n\n1. Parties\n\nACME Bank AG acts as lender of record for this market.\n"
}
}
}
{
"success": false,
"error": {
"code": "TERMS_VERSION_NOT_FOUND",
"message": "No such terms version"
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
MISSING_MARKET_ID | 400 | The market ID is longer than 100 characters |
VALIDATION_ERROR | 400 | version is not one to six digits, or format is not markdown or html |
MARKET_NOT_FOUND | 404 | No market with this ID on your instance |
TERMS_VERSION_NOT_FOUND | 404 | The market has no terms, or no version with this number |
⌘I
curl "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/terms/versions/2" \
-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/${version}`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { success, data, error } = await res.json();
if (!success) throw new Error(`${error.code}: ${error.message}`);
console.log(data.terms.contentHash, data.terms.published);
{
"success": true,
"data": {
"terms": {
"id": "sectermsv_002",
"marketAddress": "0x70a0e25c7b768b87e658348b3b577678a173e038",
"title": "ACME Secured Lending Facility: Terms of Use",
"version": 2,
"contentHash": "0x5d4b74a6814f6236b5572f4165ae340dfd276faf02d78da3f5672a452ee9f289",
"curatorAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"published": false,
"createdAt": "2026-09-02T16:41:09.000Z",
"updatedAt": "2026-09-02T16:41:09.000Z",
"templateId": null,
"templateVersion": null,
"customised": false,
"contentBytes": 86,
"format": "markdown",
"content": "# Terms of Use\n\n## 1. Parties\n\nACME Bank AG acts as lender of record for this market.\n",
"plainText": "ACME SECURED LENDING FACILITY: TERMS OF USE\n===========================================\n\nTERMS OF USE\n------------\n\n1. Parties\n\nACME Bank AG acts as lender of record for this market.\n"
}
}
}
{
"success": false,
"error": {
"code": "TERMS_VERSION_NOT_FOUND",
"message": "No such terms version"
}
}
