Markets
Get Configuration Status
Check whether a market is ready to accept loans
GET
/
lending-external-securities
/
api
/
markets
/
{marketId}
/
configuration-status
curl "https://api.trusset.org/lending-external-securities/api/markets/{marketId}/configuration-status" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/markets/${marketId}/configuration-status`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"liquidationContract": "0x067a3FeEA46649AdAd8e31c33B3a4D8774b8d8cF",
"insuranceFund": "0x8f1a...9c22",
"adapter": "0x4d2b...77ae",
"liquidationConfigured": true,
"insuranceFundConfigured": true,
"adapterConfigured": true,
"routerAuthorized": true,
"collateralAuthStatus": {
"mode": "FREEZE",
"adapterAuthorized": true,
"interfaceSupported": true,
"requirement": "adapter_must_hold_agent_role"
},
"routerHolderAuthorized": true,
"oracleSignerAuthorized": true,
"liquidatorRoleGranted": true,
"relayerAddress": "0x123...456",
"pendingCurator": false,
"pendingCuratorMessage": null,
"fullyConfigured": true
}
}
{
"success": true,
"data": {
"liquidationContract": "0x067a3FeEA46649AdAd8e31c33B3a4D8774b8d8cF",
"insuranceFund": "0x8f1a...9c22",
"adapter": "0x4d2b...77ae",
"liquidationConfigured": true,
"insuranceFundConfigured": true,
"adapterConfigured": true,
"routerAuthorized": true,
"collateralAuthStatus": {
"mode": "FREEZE",
"adapterAuthorized": false,
"interfaceSupported": true,
"requirement": "adapter_must_hold_agent_role"
},
"routerHolderAuthorized": false,
"oracleSignerAuthorized": true,
"liquidatorRoleGranted": false,
"relayerAddress": "0x123...456",
"fullyConfigured": false
}
}
Returns a single readiness verdict plus the individual checks behind it. Poll this after deployment and after each authorization step until
fullyConfigured is true.
Readiness spans two layers. Contract wiring is set up by the factory at deployment and rarely needs attention. Token-side authorization is the layer that blocks new markets, because it depends on parties outside Trusset: the collateral token’s agent administrator and its identity registry operator.
Path Parameters
string
required
Market ID.
Response Fields
object
Show child attributes
Show child attributes
boolean
The single flag to gate a market on. True only when all of the following hold: the market has a lender of record, contract wiring is complete, the adapter is authorized on the collateral token, the router is an eligible collateral recipient, the registered wallet can sign oracle prices, and it holds
LIQUIDATOR_ROLE.string
Liquidation router the market is wired to.
string
Insurance fund contract.
string
Collateral adapter contract.
boolean
Router address is set on the market.
boolean
Insurance fund address is set on the market.
boolean
Adapter address is set on the market.
boolean
The router accepts liquidations originating from this market.
boolean
The router is an eligible recipient of the collateral token under its compliance rules. Without this, a liquidation cannot transfer seized collateral.
object
Adapter authorization detail.
null when the market has no collateral token recorded.Show child attributes
Show child attributes
string
FREEZE or CUSTODY.boolean
Whether the adapter can act on the collateral token.
string
What is needed. See the table below.
boolean
FREEZE only. False means the token cannot support freeze mode at all.string
CUSTODY only. token_authorized_contract or identity_registry, or null.string
CUSTODY only. Registry consulted, when one was resolvable.boolean
The registered wallet can push and sign prices for this market’s oracle. The oracle owner is treated as authorized implicitly.
boolean
The registered wallet holds
LIQUIDATOR_ROLE on the market, which liquidation and expired-auction settlement require.string
Registered wallet address, or null when none is configured. Every role check above is evaluated against this address.
boolean
The market has no lender of record yet, so every configuration transaction would assign a role nobody holds.
fullyConfigured can never be true while this is set. See Lender of record.string
Explanation accompanying
pendingCurator, or null when the role has been taken.Requirement Values
requirement | Meaning | Resolved by |
|---|---|---|
adapter_must_hold_agent_role | FREEZE mode. The adapter needs the agent role on the collateral token | The token’s agent administrator |
adapter_must_be_verified_holder | CUSTODY mode. The adapter must be a verified holder on the token’s identity registry | The token’s identity registry operator |
adapter_must_be_authorized_contract | CUSTODY mode. The adapter must be allow-listed on the collateral token itself | The token’s compliance administrator |
token_not_freeze_compatible | The token does not implement the freeze interface. FREEZE mode is impossible. Redeploy in CUSTODY mode | Not resolvable |
collateral_authorization_unresolvable | The token exposes neither an identity registry nor a contract allow-list, so the adapter can never be authorized to hold collateral | Not resolvable |
adapter_not_deployed | No adapter address is recorded on the market | Contact Trusset |
unknown | The check could not complete, usually an RPC failure | Retry |
routerHolderAuthorized is reported as true when the collateral token exposes no identity registry and no contract allow-list, because eligibility cannot be evaluated without one. That is an unknown, not a pass. Verify the router’s authorization out of band before letting borrowers in.This endpoint tells you what is unfinished. Get Setup Steps returns the same state as an ordered checklist with ready-to-sign calldata for each outstanding item.
curl "https://api.trusset.org/lending-external-securities/api/markets/{marketId}/configuration-status" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/markets/${marketId}/configuration-status`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"liquidationContract": "0x067a3FeEA46649AdAd8e31c33B3a4D8774b8d8cF",
"insuranceFund": "0x8f1a...9c22",
"adapter": "0x4d2b...77ae",
"liquidationConfigured": true,
"insuranceFundConfigured": true,
"adapterConfigured": true,
"routerAuthorized": true,
"collateralAuthStatus": {
"mode": "FREEZE",
"adapterAuthorized": true,
"interfaceSupported": true,
"requirement": "adapter_must_hold_agent_role"
},
"routerHolderAuthorized": true,
"oracleSignerAuthorized": true,
"liquidatorRoleGranted": true,
"relayerAddress": "0x123...456",
"pendingCurator": false,
"pendingCuratorMessage": null,
"fullyConfigured": true
}
}
{
"success": true,
"data": {
"liquidationContract": "0x067a3FeEA46649AdAd8e31c33B3a4D8774b8d8cF",
"insuranceFund": "0x8f1a...9c22",
"adapter": "0x4d2b...77ae",
"liquidationConfigured": true,
"insuranceFundConfigured": true,
"adapterConfigured": true,
"routerAuthorized": true,
"collateralAuthStatus": {
"mode": "FREEZE",
"adapterAuthorized": false,
"interfaceSupported": true,
"requirement": "adapter_must_hold_agent_role"
},
"routerHolderAuthorized": false,
"oracleSignerAuthorized": true,
"liquidatorRoleGranted": false,
"relayerAddress": "0x123...456",
"fullyConfigured": false
}
}
⌘I
curl "https://api.trusset.org/lending-external-securities/api/markets/{marketId}/configuration-status" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
`https://api.trusset.org/lending-external-securities/api/markets/${marketId}/configuration-status`,
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
{
"success": true,
"data": {
"liquidationContract": "0x067a3FeEA46649AdAd8e31c33B3a4D8774b8d8cF",
"insuranceFund": "0x8f1a...9c22",
"adapter": "0x4d2b...77ae",
"liquidationConfigured": true,
"insuranceFundConfigured": true,
"adapterConfigured": true,
"routerAuthorized": true,
"collateralAuthStatus": {
"mode": "FREEZE",
"adapterAuthorized": true,
"interfaceSupported": true,
"requirement": "adapter_must_hold_agent_role"
},
"routerHolderAuthorized": true,
"oracleSignerAuthorized": true,
"liquidatorRoleGranted": true,
"relayerAddress": "0x123...456",
"pendingCurator": false,
"pendingCuratorMessage": null,
"fullyConfigured": true
}
}
{
"success": true,
"data": {
"liquidationContract": "0x067a3FeEA46649AdAd8e31c33B3a4D8774b8d8cF",
"insuranceFund": "0x8f1a...9c22",
"adapter": "0x4d2b...77ae",
"liquidationConfigured": true,
"insuranceFundConfigured": true,
"adapterConfigured": true,
"routerAuthorized": true,
"collateralAuthStatus": {
"mode": "FREEZE",
"adapterAuthorized": false,
"interfaceSupported": true,
"requirement": "adapter_must_hold_agent_role"
},
"routerHolderAuthorized": false,
"oracleSignerAuthorized": true,
"liquidatorRoleGranted": false,
"relayerAddress": "0x123...456",
"fullyConfigured": false
}
}
