# fCash Markets

## Get active fCash Markets

We can use the `getActiveMarkets` method to get a list of the current active markets in a given currency:

```
 activeMarkets = notional.getActiveMarkets(currencyId)
```

## Get a market's total fCash and total Prime Cash holdings

```
market3Months = activeMarkets[0]
market6Months = activeMarkets[1]

# Get the maturity of the 3 Month market
maturity = market3Months[1]

# Get the 3 Month market total Prime Cash balance 
primeCashBalance3MonthMarket = market3Months[3]/1e8

# Get the 3 Month market total fCash balance
fCashBalance3MonthMarket  = market3Months[2]/1e8
```

## Get a market's utilization

An fCash market's utilization is defined as total `fCash/ (total fCash + total Prime Cash in underlying)`:&#x20;

<pre><code>from brownie.network.state import Chain
chain = Chain()

primeFactors = notional.getPrimeFactorsStored(currencyId, chain.time())
supplyScalar = primeFactors["factors"]["supplyScalar"]/1e18
underlyingScalar = primeFactors["factors"]["underlyingScalar"]/1e18

<strong>marketPrimeCashSupply = primeCashBalance3MonthMarket * underlyingScalar * supplyScalar
</strong><strong>fCashMarketUtilization =  fCashBalance3MonthMarket / (fCashBalance3MonthMarket + marketPrimeCashSupply) 
</strong><strong>
</strong></code></pre>

## Get fCash rates

```
# Last Implied Rate 3 Month Market
lastImpliedRate = market3Months[5] 

# Oracle Rate 3 Month Market
oracleRate = market3Months[6]
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.notional.finance/v3-technical-docs/contract-interaction-guides/fcash-markets.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
