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

# Get Swap

> Retrieve details of a swap transaction.

## Get Swap

Retrieve the full details of a swap transaction by its ID, including conversion rates, fees, and current status.

### Endpoint

```
GET /v1/onchain-fx/:id
```

### Request

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.thiqwave.com/v1/onchain-fx/fx_1234567890 \
    -H "X-API-Key: your_api_key"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch('https://api.thiqwave.com/v1/onchain-fx/fx_1234567890', {
    method: 'GET',
    headers: {
      'X-API-Key': 'your_api_key',
    },
  });

  const fx = await response.json();
  console.log(fx);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.thiqwave.com/v1/onchain-fx/fx_1234567890',
      headers={'X-API-Key': 'your_api_key'}
  )

  fx = response.json()
  print(fx)
  ```
</CodeGroup>

### Response

```json theme={null}
{
  "fx_id": "fx_1234567890",
  "quote_id": "quote_3333333333",
  "status": "completed",
  "source_currency": "USDT",
  "source_network": "ethereum",
  "source_address": "0x123456789abcdef123456789abcdef1234567890",
  "source_amount": "1000.00",
  "destination_currency": "USDC",
  "destination_network": "polygon",
  "destination_address": "0xabcdef123456789abcdef123456789abcdef1234",
  "destination_amount": "999.50",
  "exchange_rate": "0.9995",
  "fees": {
    "platform_fee": "0.50",
    "network_fee": "0.00"
  },
  "created_at": "2026-04-09T14:30:00Z",
  "completed_at": "2026-04-09T14:32:00Z"
}
```

### Response Fields

| Field                  | Type           | Description                                                     |
| ---------------------- | -------------- | --------------------------------------------------------------- |
| `fx_id`                | string         | Unique on-chain FX transaction identifier.                      |
| `quote_id`             | string         | Associated quote ID.                                            |
| `status`               | string         | Current status: `pending`, `processing`, `completed`, `failed`. |
| `source_currency`      | string         | Source stablecoin.                                              |
| `source_network`       | string         | Source blockchain network.                                      |
| `source_address`       | string         | Source wallet address.                                          |
| `source_amount`        | string         | Amount in source currency (human-readable).                     |
| `destination_currency` | string         | Destination stablecoin.                                         |
| `destination_network`  | string         | Destination blockchain network.                                 |
| `destination_address`  | string         | Destination wallet address.                                     |
| `destination_amount`   | string         | Amount in destination currency (human-readable).                |
| `exchange_rate`        | string         | Conversion rate (destination per source).                       |
| `fees`                 | object         | Platform and network fees breakdown.                            |
| `created_at`           | string         | ISO 8601 timestamp of creation.                                 |
| `completed_at`         | string \| null | ISO 8601 timestamp of completion.                               |

## Notes

* Check the `status` field to determine the current state of the FX transaction.
* Use the `fx_id` to track the transaction in your system.
* Once status becomes `completed`, stablecoins have been converted and delivered to the destination address.
* Exchange rates are locked during the quote validity period (3 minutes).
