# BuildTokenSwap

### Description

This endpoint returns the transaction detail that is needed to perform the actual swap, based on information obtained in the **Get Exchange Rate** endpoint. This endpoint will build a transaction for you, which afterward you or your user needs to execute. Each item in the response array needs to be taken, enriched with the relevant signing method and submitted against the endpoint:\ `/api/transactions/execute`

{% code overflow="wrap" %}

```csharp
public static VyTask<VyHederaTokenAssociationRequest[]> BuildTokenSwap(string id, VyBuildTokenSwapRequest reqParams)
```

{% endcode %}

{% tabs %}
{% tab title="Details" %}
**Parameters**

| id        | string                                                                                                                  | This is the \`ID\` of the source wallet. (Wallet that holds tokens to swap) |
| --------- | ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| reqParams | [VyBuildTokenSwapRequest](https://sdk.venly.io/sdk-reference/c-sdk-v3/object-references/wallet/vybuildtokenswaprequest) | Request data for the operation                                              |

**Returns**

VyTask<[VyHederaTokenAssociationRequest](https://sdk.venly.io/sdk-reference/c-sdk-v3/object-references/wallet/vytransactionrequestbase/vyhederatokenassociationrequest)\[]>\
Swap transactions created successfully.
{% endtab %}
{% endtabs %}
