# 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. |
