# List live bonds

`GET /sigmafi/bonds` · Lithos client API · SigmaFi Bonds

Source: https://lithosprotocol.org/docs/api/list-sf-bonds

Bonds not yet repaid or liquidated, soonest maturity first. Only verified bonds unless `all` is true: a verified bond is the one its bond asset's genesis order created. Anyone can build a bond naming any asset, and such a bond only ever pays that asset's holder.

## Parameters

| Name | In | Type | Required | Description |

|---|---|---|---|---|

| `offset` | query | integer | no |  |

| `limit` | query | integer | no |  |

| `all` | query | boolean | no | Include unverified bonds. |

## Responses

### 200: One page of bonds

`SFBondList`

- `height` (integer, required)
- `bonds` (SFBondView[], required)
  - `boxId` (string, required)
  - `assetId` (string, required): The bond asset whose holder is paid.
  - `terms` (SFTerms, required): A bond's terms, as its order states them and the bond carries them.
    - `kind` (string, required): The bond's kind. Every SigmaFi V2 bond is `zero-coupon`.
    - `principalNanoErgs` (string): Agreed nanoERG lent; for a token loan, the principal box's floor. Read directly from a bond's R6.
    - `principalToken` (SFTokenAmount)
      - `tokenId` (string, required)
      - `amount` (string, required): Base units.
    - `repayment` (string, required): What the borrower repays, in nanoERG or in base units of `repayToken`.
    - `repayToken` (string): The token a token loan is repaid in. Absent when repaid in ERG.
    - `collateralNanoErgs` (string, required): Borrower collateral nanoERG, excluding the lender-funded reserve.
    - `collateralTokens` (SFTokenAmount[], required)
    - `maturityHeight` (integer · int64): Repayment is open strictly below it. Absent for an on-close order until it is filled.
    - `durationBlocks` (integer · int64): An on-close order's term, counted from its fill.
    - `batchingFee` (string, required): Lender-funded reserve selected on fill; zero on unfilled orders. Refunded on repayment.
    - `liquidation` (string): The liquidation script's name. Absent when this client does not know it.
    - `liquidationHash` (string, required)
  - `verified` (boolean, required): Whether this is the bond its asset's genesis order created.
  - `verification` (string): Why it is not verified.
  - `status` (string, required, one of open, matured)
  - `blocksLeft` (integer · int64, required): Blocks before repayment closes. 0 once matured.
  - `borrowerIsMe` (boolean, required)
  - `creationHeight` (integer, required)
- `total` (integer, required)
- `unverified` (integer, required): Live bonds that failed verification, listed only with `all`.
- `truncated` (boolean, required)

### 400: A malformed field, or terms no contract or shipped client accepts.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

### 503: Node or index unavailable. Never returns a partial answer.

`ApiError`

- `error` (integer, required): Error code
- `reason` (string, required): Error message explaining the reason of the error
- `detail` (string, required): Detailed error description

## Example request

```bash
curl -X GET "http://localhost:9000/sigmafi/bonds"
```

## Example response

```json
{
  "height": 0,
  "bonds": [
    {
      "boxId": "string",
      "assetId": "string",
      "terms": {
        "kind": "string",
        "principalNanoErgs": "string",
        "principalToken": {
          "tokenId": "string",
          "amount": "string"
        },
        "repayment": "string",
        "repayToken": "string",
        "collateralNanoErgs": "string",
        "collateralTokens": [
          {
            "tokenId": "string",
            "amount": "string"
          }
        ],
        "maturityHeight": 0,
        "durationBlocks": 0,
        "batchingFee": "string",
        "liquidation": "string",
        "liquidationHash": "string"
      },
      "verified": true,
      "verification": "string",
      "status": "open",
      "blocksLeft": 0,
      "borrowerIsMe": true,
      "creationHeight": 0
    }
  ],
  "total": 0,
  "unverified": 0,
  "truncated": true
}
```
