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

# 查询支持的汇率对

> 查询支持的汇率对

完整[认证、签名、数据约定与错误响应](https://docs.stablepayfi.ai/zh/api/stablecoin-exchange/overview)。每次重试均须重新生成时间戳、nonce 与签名。

`GET /quote/pairs` 按转账类型返回平台支持的币种汇率对。

## 请求头

**Authorization** `string` *required*

Bearer API Key。

**X-StablePay-Timestamp** `string` *required*

Unix 秒，允许与服务端相差最多 5 分钟。

**X-StablePay-Nonce** `string` *required*

每次请求唯一的随机串，16–64 字符。

**X-StablePay-Signature** `string` *required*

HMAC-SHA256 签名，小写十六进制；签名必须对应实际发送的请求体。

## 请求参数

**merchant\_id** `string`

10 位数字；商户 App 不传，服务商 App 传值指定作用商户

**transfer\_type** `string` *required*

`on_ramp`、`off_ramp`、swap

## 响应

**pairs** `array` *required*

汇率对数组

**pairs\[].source\_currency** `string` *required*

卖出币种

**pairs\[].target\_currency** `string` *required*

买入币种

**pairs\[].transfer\_type** `string` *required*

适用的转账类型

## 状态与错误

400 `transfer_type` 不合法。

```bash cURL theme={"system"}
curl --request GET \
  --url "https://api.stablepay.co/api/v1/quote/pairs?transfer_type=<TRANSFER_TYPE>" \
  --header "Authorization: Bearer <API_KEY>" \
  --header "X-StablePay-Timestamp: <TIMESTAMP>" \
  --header "X-StablePay-Nonce: <NONCE>" \
  --header "X-StablePay-Signature: <SIGNATURE>"
```

```javascript JavaScript theme={"system"}
const response = await fetch("https://api.stablepay.co/api/v1/quote/pairs?transfer_type=<TRANSFER_TYPE>", {
  method: "GET",
  headers: {
    "Authorization": "Bearer <API_KEY>",
    "X-StablePay-Timestamp": "<TIMESTAMP>",
    "X-StablePay-Nonce": "<NONCE>",
    "X-StablePay-Signature": "<SIGNATURE>"
  }
});
console.log(await response.json());
```

```json 200 theme={"system"}
{
  "pairs": [
    {
      "source_currency": "USD",
      "target_currency": "USDC",
      "transfer_type": "on_ramp"
    },
    {
      "source_currency": "USDC",
      "target_currency": "USDT",
      "transfer_type": "swap"
    }
  ]
}
```


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