# 汇率

`GET` `/v1/asset/exchange_rates`

获取账户中所有货币对的当前外汇汇率。

## Parameters

### Query Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `base` | string | No | 基础货币，例如 `USD`，不传则返回所有货币对 |

## Request Example

```bash
curl --request GET \
  --url 'https://openapi.longbridge.com/v1/asset/exchange_rates' \
  --header 'Authorization: Bearer <access_token>'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `exchanges` | object[] | No | 汇率列表， |
| `└ base_currency` | string | No | 基准货币 |
| `└ other_currency` | string | No | 报价货币 |
| `└ bid_rate` | number | No | 买入汇率 |
| `└ offer_rate` | number | No | 卖出汇率 |
| `└ average_rate` | number | No | 平均汇率，表示 1 单位 `other_currency` 折合多少 `base_currency`。例如 `base_currency=USD`、`other_currency=HKD`、`average_rate=0.12746` 表示 1 港元 = 0.12746 美元 |

### Response JSON Example

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "exchanges": [
      {
        "base_currency": "USD",
        "other_currency": "HKD",
        "bid_rate": 0.12746,
        "offer_rate": 0.12746,
        "average_rate": 0.12746
      }
    ]
  }
}
```
