> For the complete documentation index, see [llms.txt](https://docs.notional.finance/v3-technical-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.notional.finance/v3-technical-docs/subgraph-guides/notional-v3-subgraphs/fetch-outstanding-debt.md).

# Fetch Outstanding Debt

## Get Prime Cash and fCash Markets Outstanding Debts

This query can be used to fetch Notional outstanding variable and fixed debts:&#x20;

```
{
primeCashMarkets{
  snapshots(first: 1, orderBy: timestamp, orderDirection:desc){
    market{id}
    totalPrimeDebtInUnderlying
  }
  }
  fCashMarkets{
    snapshots(first: 1, orderBy: timestamp, orderDirection:desc){
    market{id}
    totalfCashDebtOutstandingPresentValue
  }
  }
}
```
