Nomial Docs
  • Concepts
    • What is Nomial
    • Why use Nomial
  • Protocol
    • Architecture Overview
  • Smart Contracts
  • Loan Process
  • Interest Rate Model
  • Solvers
    • Take out a loan
  • View loan status
  • Repay a loan
  • Security
    • Security Model Overview
  • Resources
    • Terminology
    • Connect with us
Powered by GitBook
On this page
  • Request Borrower Status
  • Understanding the Response

View loan status

This guide explains how to check the status of your loans and collateral across all inventory pools.

Request Borrower Status

Make a GET request to https://api.nomial.io/borrowers/{address} where {address} is your borrower address:

GET https://api.nomial.io/borrowers/0x1234...

The API will return current collateral and debt for the borrower:

{
  "borrower": {
    "name": "borrower1",
    "address": "0x1234..."
  },
  "collateral": {
    "assets": [
      {
        "collateral_pool_address": "0x...",
        "chain": {
          "id": "1",
          "name": "ethereum"
        },
        "token": {
          "address": "0x...",
          "name": "Wrapped Ether",
          "symbol": "WETH",
          "decimals": 18
        },
        "balance": {
          "amount": "10.0",
          "raw": "10000000000000000000"
        }
      }
    ]
  },
  "debt": [
    {
      "pool_address": "0x...",
      "chain": {
        "id": "1",
        "name": "ethereum"
      },
      "token": {
        "address": "0x...",
        "name": "USD Coin",
        "symbol": "USDC",
        "decimals": 6
      },
      "base_debt": {
        "amount": "1000.0",
        "raw": "1000000000"
      },
      "penalty_debt": {
        "amount": "0.0",
        "raw": "0"
      }
    }
  ]
}

Understanding the Response

The response includes:

  1. Borrower Information:

    • name: The name of the borrower

    • address: The borrower's address

  2. Collateral Information:

    • assets: Array of collateral assets, each containing:

      • collateral_pool_address: The address of the pool where the asset is deposited

      • chain: Chain details (ID and name)

      • token: Token details (address, name, symbol, decimals)

      • balance: Amount currently deposited

  3. Debt Information:

    • Array of debt positions by pool, each containing:

      • pool_address: The inventory pool address

      • chain: Chain details (ID and name)

      • token: Token details (address, name, symbol, decimals)

      • base_debt: Principal and interest the borrower owes to the pool

      • penalty_debt: Late payment penalties the borrower owes to the pool

If the borrower has no collateral or no debt, these arrays will be empty in the response.

PreviousTake out a loanNextRepay a loan

Last updated 8 hours ago