Markets
List Borrow Assets
List the curated settlement assets available for new markets
GET
/
lending-external-securities-v2
/
api
/
markets
/
borrow-assets
curl "https://api.trusset.org/lending-external-securities-v2/api/markets/borrow-assets" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
'https://api.trusset.org/lending-external-securities-v2/api/markets/borrow-assets',
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const usdc = data.assets.find(a => a.isDefault);
{
"success": true,
"data": {
"assets": [
{
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"mintable": false,
"isDefault": true
},
{
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"symbol": "USDT",
"name": "Tether USD",
"decimals": 6,
"mintable": false,
"isDefault": false
},
{
"address": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"symbol": "DAI",
"name": "Dai Stablecoin",
"decimals": 18,
"mintable": false,
"isDefault": false
}
],
"custom": {
"minDecimals": 6,
"maxDecimals": 18
}
}
}
Returns the settlement assets Trusset curates for your instance type and network, plus the decimal bounds enforced on custom assets. Use this to populate a borrow asset selector before calling Deploy Market.
A market’s borrow asset is the settlement token (stablecoin) liquidity providers deposit, borrowers receive, and all debt is denominated in. It is fixed at deployment and cannot be changed afterwards.
A production instance on Ethereum is offered USDC, USDT and DAI at their mainnet addresses. A development instance is offered test tokens for USDC, USDT, DAI, EURC and EUROP on the development networks, marked
You are not limited to this list. Any ERC-20 with 6 to 18 decimals can be passed as
borrowAssetAddress at deployment. The contract is validated on-chain at that point: it must have deployed bytecode and readable decimals() and balanceOf(). Omitting borrowAssetAddress selects USDC.(Mock) in their names. An asset with no address configured for your network is left out.
Response Fields
object
Show child attributes
Show child attributes
array
Curated assets for the instance type and network bound to your API key.
Show child attributes
Show child attributes
string
Checksummed token address.
string
Token symbol.
string
Human-readable token name.
integer
Token decimals. Every amount you send or receive for this market’s settlement side is a decimal string parsed at this precision.
boolean
Whether the test token can be minted on a development network. Always
false for production assets.boolean
True for USDC, the asset selected when
borrowAssetAddress is omitted.curl "https://api.trusset.org/lending-external-securities-v2/api/markets/borrow-assets" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
'https://api.trusset.org/lending-external-securities-v2/api/markets/borrow-assets',
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const usdc = data.assets.find(a => a.isDefault);
{
"success": true,
"data": {
"assets": [
{
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"mintable": false,
"isDefault": true
},
{
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"symbol": "USDT",
"name": "Tether USD",
"decimals": 6,
"mintable": false,
"isDefault": false
},
{
"address": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"symbol": "DAI",
"name": "Dai Stablecoin",
"decimals": 18,
"mintable": false,
"isDefault": false
}
],
"custom": {
"minDecimals": 6,
"maxDecimals": 18
}
}
}
Custom Asset Rejections
When you pass aborrowAssetAddress that fails validation, Deploy Market returns one of:
| Code | Cause |
|---|---|
INVALID_BORROW_ASSET | A mixed-case address whose checksum does not match. A malformed address is refused earlier with VALIDATION_ERROR |
BORROW_ASSET_NOT_CONTRACT | No deployed bytecode at the address on the resolved network |
BORROW_ASSET_NOT_ERC20 | decimals() or balanceOf() could not be read |
BORROW_ASSET_DECIMALS_UNSUPPORTED | Decimals outside the 6 to 18 range |
⌘I
curl "https://api.trusset.org/lending-external-securities-v2/api/markets/borrow-assets" \
-H "X-API-Key: trusset_your_key_here"
const res = await fetch(
'https://api.trusset.org/lending-external-securities-v2/api/markets/borrow-assets',
{ headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const usdc = data.assets.find(a => a.isDefault);
{
"success": true,
"data": {
"assets": [
{
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"symbol": "USDC",
"name": "USD Coin",
"decimals": 6,
"mintable": false,
"isDefault": true
},
{
"address": "0xdAC17F958D2ee523a2206206994597C13D831ec7",
"symbol": "USDT",
"name": "Tether USD",
"decimals": 6,
"mintable": false,
"isDefault": false
},
{
"address": "0x6B175474E89094C44Da98b954EedeAC495271d0F",
"symbol": "DAI",
"name": "Dai Stablecoin",
"decimals": 18,
"mintable": false,
"isDefault": false
}
],
"custom": {
"minDecimals": 6,
"maxDecimals": 18
}
}
}
