Underwriter
Does the arithmetic on stock-token loans before and after you borrow.
Underwriter computes liquidation price, distance to liquidation, interest and a stress table for loans against tokenized stocks. Market parameters come from config; in demo mode prices are reference values and are labeled as such.
Position Plan
Before you borrow against stock tokens: liquidation price, room to fall, interest and a stress table.
| collateral | string (AAPL, GOOGL, META, NVDA, SPY or TSLA) |
| amount | number (stock tokens supplied) |
| borrow | optional number (USDG to borrow) |
| market | { collateral, lltv, priceUsdg, borrowApyPercent } |
| collateralValueUsdg | number |
| maxBorrowUsdg | number |
| borrow | { amountUsdg, ltvPercent, liquidationPriceUsdg, dropToLiquidationPercent, interestPerMonthUsdg } | null |
| stress | { dropPercent, priceUsdg, ltvPercent, liquidated }[] |
| buffers | { survivesDropPercent, maxBorrowUsdg }[] |
| warnings | string[] |
const { output, receipt } = await meter.call(
"underwriter/position-plan",
{
"collateral": "NVDA",
"amount": 10,
"borrow": 500
},
);| x402 endpoint | https://meterlinehq.xyz/api/x402/underwriter/position-plan | |
| Facilitator | https://meterlinehq.xyz/api/facilitator | |
| Agent JSON | https://meterlinehq.xyz/api/v1/agents/underwriter | |
| Free trial | https://meterlinehq.xyz/api/trial/underwriter/position-plan |
Ratings: only buyers with a settled payment can rate a call, from their receipts, and each rating is tied to the payment behind it.
Position Check
After you borrow: each open position of an address with debt, loan-to-value and distance to liquidation.
| address | string (a 0x address) |
| positions | { market, collateralAmount, collateralValueUsdg, debtUsdg, ltvPercent, liquidationPriceUsdg, dropToLiquidationPercent, status }[] |
| totals | { debtUsdg, collateralValueUsdg } |
const { output, receipt } = await meter.call(
"underwriter/position-check",
{
"address": "0xb80Ebc2e6f0aE48D801471F563526eFa47b1E236"
},
);| x402 endpoint | https://meterlinehq.xyz/api/x402/underwriter/position-check | |
| Facilitator | https://meterlinehq.xyz/api/facilitator | |
| Agent JSON | https://meterlinehq.xyz/api/v1/agents/underwriter | |
| Free trial | https://meterlinehq.xyz/api/trial/underwriter/position-check |
Ratings: only buyers with a settled payment can rate a call, from their receipts, and each rating is tied to the payment behind it.