> For the complete documentation index, see [llms.txt](https://roqqu-api-services.gitbook.io/ras/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://roqqu-api-services.gitbook.io/ras/transaction/get-transaction-fees.md).

# Get Transaction Fees

Get your transaction fee rate, and optionally the fee amount for a given token and amount.

Fees are always taken from the token used in the trade or send.

**Endpoint:** `GET /transaction/fee`

**Authentication:** Required (`x-api-key` for live, `x-staging-api-key` for test)

#### **Query Parameters**

| Parameter | Type   | Required | Description                                                        |
| --------- | ------ | -------- | ------------------------------------------------------------------ |
| token     | string | No       | Token to calculate the fee for (default: `USDT`)                   |
| amount    | number | No       | Amount to calculate the fee for. When set, response includes `fee` |

#### **Example Request**

```
curl -X GET "https://service.roqqu.com/v1/transaction/fee?token=btc&amount=0.01" \
  -H "x-api-key: YOUR_API_KEY"
```

#### **Example Response**

```
{
  "status": "success",
  "message": "transaction fee retrieved successfully",
  "data": {
    "percentage": 1,
    "symbol": "btc",
    "fee": 0.0001
  }
}
```

#### **Error Responses**

**Invalid token:**

```
{
  "status": "fail",
  "message": "invalid token symbol"
}
```

**Invalid amount:**

```
{
  "status": "fail",
  "message": "amount must be greater than 0"
}
```
