> For the complete documentation index, see [llms.txt](https://finterest.gitbook.io/product-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://finterest.gitbook.io/product-docs/for-later/protocol-interaction-read.md).

# Protocol Interaction (Read)

{% hint style="danger" %}
This section is under construction, many query methods are included in the canister but not yet implemented in these docs.
{% endhint %}

## View Max Borrowable amount

```
get_max_borrowable() : async Int
```

Returns the maximum borrowable amount (in USD) for the caller.

## View Account Liquidity of Collateral Plus Borrows

```
get_accliq() : async Int
```

Returns the account liquidity (in USD) of the caller. The account liquidity includes assets declared as collateral minus borrows. It will either be a negative number, zero, or bigger than zero.

## View Balance for a Market

```
get_market_balance(_token:T.Token,_principal:Principal) :async Nat
```

Returns the market balance of the market *token for user \_*&#x70;rincipal. \
\
You can also query the balance expressed in units of the underlying asset by calling:

```
get_market_balance_underlying(_token:T.Token,_principal:Principal) :async Nat
```

## View Borrow Balance for a Market&#x20;

```
get_market_borrow_balance(_token:T.Token,_principal:Principal) :async Nat
```

Returns the borrow market balance of the market *token for user \_*&#x70;rincipal. \
\
You can also query the balance expressed in USD by calling:

```
get_market_borrow_balance_usd(_token:T.Token,_principal:Principal) :async Nat
```
