> 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-historical-prime-cash-and-prime-debt-exchange-rates.md).

# Fetch Historical Prime Cash & Prime Debt Exchange Rates

## Get Prime Cash to Underlying exchange rates

This query can be used to fetch the underlying exchange rate between Prime Cash and the underlying currency:

```
{
primeCashMarkets{
  snapshots(orderBy: timestamp, orderDirection:desc){
    market{
      id
    }
    timestamp
    underlyingScalar
    supplyScalar
  }
  }
}
```

## Get Prime Debt to Underlying exchange rates

This query can be used to fetch the underlying exchange rate between Prime Debts and the underlying currency:

```
{
primeCashMarkets{
  snapshots(orderBy: timestamp, orderDirection:desc){
    market{
      id
    }
    timestamp
    underlyingScalar
    debtScalar
  }
  }
}
```
