> ## Documentation Index
> Fetch the complete documentation index at: https://docs.yativo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Swap Master Wallet Token

> Swap between USD, EUR, and GBP balances in your master wallet

<ParamField header="Authorization" type="string" required>
  Bearer token: `Bearer YOUR_ACCESS_TOKEN`
</ParamField>

<ParamField body="from_token" type="string" required>
  Source currency: `USDC`, `EUR`, or `GBP`.
</ParamField>

<ParamField body="to_token" type="string" required>
  Target currency: `USDC`, `EUR`, or `GBP`.
</ParamField>

<ParamField body="amount" type="number" required>
  Amount to swap from the source currency balance.
</ParamField>

<Note>
  Customer card currency is determined by the customer's country at the time their card
  wallet is created. Use this endpoint to convert your USDC balance to the correct currency
  before funding customers whose cards are denominated in EUR or GBP.
</Note>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST 'https://crypto-api.yativo.com/api/v1/card-issuer/master-wallets/swap' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
    -H 'Content-Type: application/json' \
    -d '{
      "from_token": "USDC",
      "to_token": "EUR",
      "amount": 1000
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 Swap initiated theme={null}
  {
    "success": true,
    "message": "Swap initiated: 1000 USD → EUR",
    "data": {
      "swap_id": "0x7a8b9c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f",
      "status": "submitted",
      "from_token": "USD",
      "to_token": "EUR",
      "amount": 1000,
      "expected_output": 924.50,
      "fee_amount": "1.20",
      "estimated_time": "1-5 minutes"
    }
  }
  ```
</ResponseExample>
