# Convert Getters Facet

{% hint style="warning" %}
Note that this page has not been updated to reflect the current state of Beanstalk, but is left here as a reference.
{% endhint %}

The Convert Getters Facet contains view functions for Convert data.

## Call Functions

None.

## View Functions

### [Get Max Amount In](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ConvertGettersFacet.sol#L19)

```solidity
function getMaxAmountIn(address tokenIn, address tokenOut)
    external
    view
    returns (uint256 amountIn);
```

Estimate the maximum number of tokens that can currently be Converted from `tokenIn` to `tokenOut`.&#x20;

| Parameter  | Type      | Description                                        |
| ---------- | --------- | -------------------------------------------------- |
| `tokenIn`  | `address` | The whitelisted token to estimate Converting from. |
| `tokenOut` | `address` | The whitelisted token to estimate Converting to.   |

| Return Value | Type      | Description                                                                                |
| ------------ | --------- | ------------------------------------------------------------------------------------------ |
| `amountIn`   | `uint256` | The maximum number of tokens that can currently be Converted from `tokenIn` to `tokenOut`. |

### [Get Amount Out](https://github.com/BeanstalkFarms/Beanstalk/blob/master/protocol/contracts/beanstalk/silo/ConvertGettersFacet.sol#L30)

```solidity
function getAmountOut(
    address tokenIn,
    address tokenOut,
    uint256 amountIn
) external view returns (uint256 amountOut);
```

Estimate the amount of tokens received from Converting `tokenIn` to `tokenOut` given an amount of `tokenIn`.

| Parameter  | Type      | Description                                        |
| ---------- | --------- | -------------------------------------------------- |
| `tokenIn`  | `address` | The whitelisted token to estimate Converting from. |
| `tokenOut` | `address` | The whitelisted token to estimate Converting to.   |

| Return Value | Type      | Description                                                                       |
| ------------ | --------- | --------------------------------------------------------------------------------- |
| `amountOut`  | `uint256` | The amount of `tokenOut` received from a Conversion from `tokenIn` to `tokenOut`. |

## Events

None.


---

# 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.bean.money/developers/protocol/silo/convert-facet-1.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.
