Markets
Update Market Config
Update on-chain market configuration parameters
POST
/
lending-stocks
/
api
/
markets
/
{marketId}
/
config
curl -X POST "https://api.trusset.org/lending-stocks/api/markets/{marketId}/config" \
-H "X-API-Key: trusset_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"config": {
"collateralFactor": 7500,
"liquidationThreshold": 8500,
"liquidationPenalty": 500,
"protocolFeeRate": 2500,
"minBorrowAmount": "100",
"maxPriceAge": 86400,
"closeFactor": 5000,
"maxTotalCollateral": "0",
"maxUserCollateral": "0",
"useDutchAuction": false,
"auctionDuration": 3600,
"auctionStartPremium": 13000,
"auctionMinPremium": 9500
},
"useRelayer": true
}'
{
"success": true,
"data": { "txHash": "0xabc...def" }
}
Updates the lending market’s risk parameters, fee rates, supply caps, and auction settings. Requires
ISSUER_ROLE on the market contract. When useRelayer is false, returns unsigned calldata.
liquidationThreshold changes are capped at 10% per call by the smart contract.Path Parameters
Market ID.
Body Parameters
Show child attributes
Show child attributes
Max LTV in basis points (1000–9500).
Liquidation trigger in basis points (1000–9800).
Penalty in basis points (0–5000).
Issuer fee rate in basis points (0–10000).
Minimum USDC borrow (e.g.
"100").Max oracle price age in seconds (300–604800).
Max liquidatable fraction in basis points (1000–5000).
Global collateral cap (
"0" = unlimited).Per-user collateral cap (
"0" = unlimited).Enable Dutch auction liquidation mode.
Auction length in seconds (600–86400).
Starting price multiplier in basis points (10000–20000).
Ending price multiplier in basis points (8000–10000).
Execute via relayer or return calldata.
curl -X POST "https://api.trusset.org/lending-stocks/api/markets/{marketId}/config" \
-H "X-API-Key: trusset_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"config": {
"collateralFactor": 7500,
"liquidationThreshold": 8500,
"liquidationPenalty": 500,
"protocolFeeRate": 2500,
"minBorrowAmount": "100",
"maxPriceAge": 86400,
"closeFactor": 5000,
"maxTotalCollateral": "0",
"maxUserCollateral": "0",
"useDutchAuction": false,
"auctionDuration": 3600,
"auctionStartPremium": 13000,
"auctionMinPremium": 9500
},
"useRelayer": true
}'
{
"success": true,
"data": { "txHash": "0xabc...def" }
}
⌘I
curl -X POST "https://api.trusset.org/lending-stocks/api/markets/{marketId}/config" \
-H "X-API-Key: trusset_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"config": {
"collateralFactor": 7500,
"liquidationThreshold": 8500,
"liquidationPenalty": 500,
"protocolFeeRate": 2500,
"minBorrowAmount": "100",
"maxPriceAge": 86400,
"closeFactor": 5000,
"maxTotalCollateral": "0",
"maxUserCollateral": "0",
"useDutchAuction": false,
"auctionDuration": 3600,
"auctionStartPremium": 13000,
"auctionMinPremium": 9500
},
"useRelayer": true
}'
{
"success": true,
"data": { "txHash": "0xabc...def" }
}
