> For the complete documentation index, see [llms.txt](https://docs.bancor.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bancor.network/developer-guides/read-functions/trades/tradeoutputbysourceamount.md).

# tradeOutputBySourceAmount()

### Function tradeOutputBySourceAmount()

{% code title="BancorNetworkInfo.sol" %}

```javascript
function tradeOutputBySourceAmount(Token sourceToken, Token targetToken, uint256 sourceAmount) 
external view validTokensForTrade(sourceToken, targetToken) greaterThanZero(sourceAmount) 
returns (uint256)
```

{% endcode %}

This function is used to determine the number of tokens expected to be received by trading one token to another.&#x20;

### Function Arguments

| Name         | Type    | Description                      |
| ------------ | ------- | -------------------------------- |
| sourceToken  | Token   | The token being sold.            |
| targetToken  | Token   | The token being bought.          |
| sourceAmount | uint256 | The number of tokens being sold. |

### Return Variables

This function returns the number of tokens expected to be received.

| Variable Type | Returns                                                           |
| ------------- | ----------------------------------------------------------------- |
| uint256       | The number of target tokens expected to be received by the trade. |
