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

# 获取法币列表

> 获取 VelaFi 支持的所有法币，包括对应的国家名称以及各币种交易金额使用的小数精度。

使用 **GET** `/v2/base/fiats` 接口获取 VelaFi 平台上可用法币的完整列表。每个条目都包含该币种所属的国家，以及一个 `accuracy` 值，用于说明以该币种表示金额时使用的小数位数。在构造交易对或支付方式请求之前，请查阅此列表以确认哪些法币代码有效。

## 请求

```text theme={null}
GET /v2/base/fiats
```

### 请求头

| 请求头 | 值 | 必填 |
| - | - | - |
| `X-BH-TOKEN` | 通过 `GET /v2/token/generate` 获取的令牌 | ✓ |

### 查询参数

此接口不接受任何查询参数。

## 响应字段

**code** `number`

HTTP 风格的状态码。`200` 表示成功。

**msg** `string`

可读的状态信息，例如 `"SUCCESS"`。

**data** `array`

法币对象数组。

**data\[]**

**country** `string`

与该法币关联的国家名称（例如 `"Mexico"`）。

**fiat** `string`

ISO 4217 币种代码（例如 `"MXN"`、`"USD"`）。

**accuracy** `number`

该币种金额使用的小数位数。例如，`2` 表示金额精确到小数点后两位。

## 示例

```bash cURL theme={null}
curl --request GET \
  --url 'https://api.velafi.com/v2/base/fiats' \
  --header 'X-BH-TOKEN: YOUR_TOKEN'
```

### 响应

```json theme={null}
{
  "code": 200,
  "msg": "SUCCESS",
  "data": [
    {
      "country": "Mexico",
      "fiat": "MXN",
      "accuracy": 2
    },
    {
      "country": "United States",
      "fiat": "USD",
      "accuracy": 2
    }
  ]
}
```

> [!NOTE]
>
> `accuracy` 字段表示该币种交易金额的小数位数。提交订单数量时，请始终遵循此精度。


## Related topics

- [获取加密货币列表](https://docs.velafi.com/cn/api-reference/basic-configuration/get-list-of-crypto-currencies.md)
- [获取法币→法币支付方式](https://docs.velafi.com/cn/api-reference/basic-configuration/get-fiat-fiat-payment-methods.md)
- [获取法币→法币交易对](https://docs.velafi.com/cn/api-reference/basic-configuration/get-fiat-fiat-pairs.md)
- [获取法币→加密货币交易对](https://docs.velafi.com/cn/api-reference/basic-configuration/get-fiat-crypto-pairs.md)
- [获取法币/法币报价](https://docs.velafi.com/cn/api-reference/quote/get-user-quote-for-fiat-fiat.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.