Markets
List Transactions
List the recorded transactions of a market, newest first
GET
/
lending-external-securities-v2
/
api
/
markets
/
{marketId}
/
transactions
curl "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/transactions?limit=20" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/markets/${marketId}/transactions?limit=20&offset=0`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const loanRows = data.transactions.filter((t) => t.positionId !== null);
{
"success": true,
"data": {
"transactions": [
{
"id": "cmt0b3k8q0004cghx6r2d9w1e",
"marketId": "cmssh7p1k0001cghxq2m4v8rz",
"positionId": null,
"onChainLoanId": null,
"txType": "ORACLE_SYNC",
"userAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"amount": "104.82",
"txHash": "0x3d1f7a9c2e5b80146fd2a3c9e7b5d1f08a6c4e2b9d7f1a3c5e8b0d2f4a6c8e1b",
"details": null,
"timestamp": "2026-09-25T11:30:00.000Z",
"recordedByThisInstance": true
},
{
"id": "cmt09x2f10002cghx8k4n6p3q",
"marketId": "cmssh7p1k0001cghxq2m4v8rz",
"positionId": "cmt09x2e70001cghx1a5c7e9g",
"onChainLoanId": "7",
"txType": "BORROW",
"userAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3",
"amount": "50000.0",
"txHash": "0x9f2c41d8b7e05a3164c2870fbd935e1a4c7802db6135ea9048f7c21b5d3ea41b",
"details": null,
"timestamp": "2026-09-25T10:05:00.000Z",
"recordedByThisInstance": true
}
],
"total": 214,
"totalExact": true,
"truncated": false,
"hasMore": true,
"limit": 20,
"offset": 0
}
}
Returns the market’s recorded ledger with pagination counters. Records are written when a transaction is confirmed through this API or observed during a chain sync. A transaction that is broadcast but never confirmed with
Liquidations
Pool, fees and administration
txHash is not recorded here until the next reconciliation pass.
One on-chain market can be recorded by several instances: the one that deployed it and the one that took the lender-of-record role, for example. The ledger is one record of the market. Rows written by every instance that holds the same market on the same network and environment are merged, and a transaction recorded twice is listed once. recordedByThisInstance says which rows your instance wrote.
Path Parameters
string
required
Query Parameters
integer
default:"50"
Records to return, from 1 to 200. A value outside that range is clamped, and one that does not parse falls back to 50.
integer
default:"0"
Records to skip. Minimum 0.
Pages are cut from the most recent 10,000 records at most. A page that reaches past them comes back short or empty with
truncated: true, even when total is larger.Response Fields
object
Show child attributes
Show child attributes
array
Transaction records ordered by
timestamp descending.Show child attributes
Show child attributes
string
Record ID.
string
The market record the row was written against. On a row another instance recorded, that is the other instance’s market ID.
string
Linked position, when the action belonged to a loan. Null otherwise.
string
The on-chain loan ID of the linked position, or null.
string
Action type. See the tables below.
string
Usually the address that sent the transaction, lowercased. Vault rows record the vault, and a placeholder such as
system stands in where no address was known.string
Amount as a decimal string, in the unit the tables below give for its type.
string
Transaction hash.
object
Extra facts about the row, or null. An
IDENTITY_GATES_SET row carries the registers it set as borrowerRegistry and providerRegistry, the registers it replaced as previousBorrowerRegistry and previousProviderRegistry when they could be read, and blockNumber. Addresses are lowercased, and a side without a register is null. An ESCROW_CLAIMED row carries the whole claim as escrowClaimedTotal and its blockNumber.string
ISO 8601 timestamp. Rows first stamped with the server clock are moved to the block time when the page is read.
boolean
Whether your instance wrote this row.
integer
Total records for this market, less the duplicates found in the scanned window.
boolean
true when every record was scanned, so total is the exact count after duplicates. false when only the most recent records were scanned, and duplicates among the older ones are still counted.boolean
true when this page reaches past the records that were scanned, so it holds fewer than limit records although total is larger.boolean
Whether more records exist beyond this page. Always
false when truncated is true.integer
Applied limit.
integer
Applied offset.
Transaction Types
Amounts are in the borrow asset unless the table says otherwise. LoanstxType | Written when | amount |
|---|---|---|
DEPOSIT | Collateral is pledged as a loan opens | Collateral units |
BORROW | A loan is opened, or borrowed further | The debt taken on |
OPEN_FEE | The market charged an open fee on that borrow | The fee |
REPAY | Debt is repaid | The amount repaid |
REPAY_FEE | The market charged a repay fee | The fee |
COLLATERAL_ADDED | Collateral is posted to an existing loan | Collateral units |
COLLATERAL_WITHDRAWN | Collateral is released to the borrower | Collateral units |
COLLATERAL_ESCROWED | A release was refused by the collateral token and held by the custody adapter | Collateral units |
ESCROW_CLAIMED | The borrower claims collateral the custody adapter held in escrow | Collateral units, the part of the claim booked on that loan |
CLOSE | A fully repaid loan is closed | 0 |
txType | Written when | amount |
|---|---|---|
LIQUIDATION | Collateral is seized | Collateral units |
AUCTION_BID | A bid buys auctioned collateral | The amount paid |
COLLATERAL_ROUTED | Collateral unsold at auction expiry moves to the liquidation router | Collateral units |
COLLATERAL_WITHDRAWN_FOR_SALE | Seized collateral leaves the router for sale | Collateral units |
PARTIAL_SALE | Interim sale proceeds are reported | The proceeds |
LIQUIDATION_SETTLED | A liquidation is settled | The final proceeds |
RESERVE_DRAWN | The insurance fund covered a shortfall | The amount covered |
COLLATERAL_RETURNED | The router returns collateral to the borrower | Collateral units |
LIQUIDATION_REOPENED | A liquidation is reopened | 0 |
LIQUIDATION_WRITTEN_OFF | A liquidation is written off | 0 |
SURPLUS_RETURNED | Proceeds above the debt are paid to the borrower | The surplus |
SURPLUS_ESCROWED | That payment was blocked and the surplus held for the borrower | The surplus |
SURPLUS_CLAIMED | The borrower claims an escrowed surplus | The surplus |
txType | Written when | amount |
|---|---|---|
SUPPLY | Liquidity is added, directly or by a vault | The amount supplied |
WITHDRAW | Liquidity is withdrawn, directly or by a vault | The amount withdrawn |
OPERATOR_FEES_SWEPT | Operator fees are swept | The amount swept |
DISTRIBUTOR_FEES_SWEPT | Distributor fees are swept | The amount swept |
PROTOCOL_FEES_SWEPT | The insurance-fund share is swept into the fund | The amount swept |
INFRASTRUCTURE_FEES_SWEPT | Infrastructure fees are swept to Trusset | The amount swept |
INSURANCE_TOPUP | A transfer to the insurance fund is recorded | The amount |
INSURANCE_TOPUP_BOOKED | A top-up the insurance fund booked as a deposit is recorded | The amount |
ORACLE_SYNC | A price is pushed on-chain | The new price |
CURATOR_ACCEPTED | A lender of record takes the market | 0 |
CONFIGURATION | A configuration transaction is confirmed | 0 |
IDENTITY_GATES_SET | The identity registers are changed | 0 |
VAULT_LIQUIDITY_SET | Vault liquidity is switched on or off | 0 |
VAULT_REGISTERED | A vault is registered on the market | 0 |
VAULT_DEREGISTERED | A vault is deregistered | 0 |
MARKET_PAUSE_STATE | The market is paused or unpaused | 1 paused, 0 unpaused |
CONTROLLER_TRANSFER_COMPLETE | A controller transfer completes | 0 |
curl "https://api.trusset.org/lending-external-securities-v2/api/markets/{marketId}/transactions?limit=20" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/markets/${marketId}/transactions?limit=20&offset=0`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const loanRows = data.transactions.filter((t) => t.positionId !== null);
{
"success": true,
"data": {
"transactions": [
{
"id": "cmt0b3k8q0004cghx6r2d9w1e",
"marketId": "cmssh7p1k0001cghxq2m4v8rz",
"positionId": null,
"onChainLoanId": null,
"txType": "ORACLE_SYNC",
"userAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"amount": "104.82",
"txHash": "0x3d1f7a9c2e5b80146fd2a3c9e7b5d1f08a6c4e2b9d7f1a3c5e8b0d2f4a6c8e1b",
"details": null,
"timestamp": "2026-09-25T11:30:00.000Z",
"recordedByThisInstance": true
},
{
"id": "cmt09x2f10002cghx8k4n6p3q",
"marketId": "cmssh7p1k0001cghxq2m4v8rz",
"positionId": "cmt09x2e70001cghx1a5c7e9g",
"onChainLoanId": "7",
"txType": "BORROW",
"userAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3",
"amount": "50000.0",
"txHash": "0x9f2c41d8b7e05a3164c2870fbd935e1a4c7802db6135ea9048f7c21b5d3ea41b",
"details": null,
"timestamp": "2026-09-25T10:05:00.000Z",
"recordedByThisInstance": true
}
],
"total": 214,
"totalExact": true,
"truncated": false,
"hasMore": true,
"limit": 20,
"offset": 0
}
}
Error Codes
| Code | HTTP | Cause |
|---|---|---|
MISSING_MARKET_ID | 400 | marketId is longer than 100 characters |
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}/transactions?limit=20" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities-v2/api/markets/${marketId}/transactions?limit=20&offset=0`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const loanRows = data.transactions.filter((t) => t.positionId !== null);
{
"success": true,
"data": {
"transactions": [
{
"id": "cmt0b3k8q0004cghx6r2d9w1e",
"marketId": "cmssh7p1k0001cghxq2m4v8rz",
"positionId": null,
"onChainLoanId": null,
"txType": "ORACLE_SYNC",
"userAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
"amount": "104.82",
"txHash": "0x3d1f7a9c2e5b80146fd2a3c9e7b5d1f08a6c4e2b9d7f1a3c5e8b0d2f4a6c8e1b",
"details": null,
"timestamp": "2026-09-25T11:30:00.000Z",
"recordedByThisInstance": true
},
{
"id": "cmt09x2f10002cghx8k4n6p3q",
"marketId": "cmssh7p1k0001cghxq2m4v8rz",
"positionId": "cmt09x2e70001cghx1a5c7e9g",
"onChainLoanId": "7",
"txType": "BORROW",
"userAddress": "0xabc7f1093d5e26b804a1c3f78de025916b47c0d3",
"amount": "50000.0",
"txHash": "0x9f2c41d8b7e05a3164c2870fbd935e1a4c7802db6135ea9048f7c21b5d3ea41b",
"details": null,
"timestamp": "2026-09-25T10:05:00.000Z",
"recordedByThisInstance": true
}
],
"total": 214,
"totalExact": true,
"truncated": false,
"hasMore": true,
"limit": 20,
"offset": 0
}
}
