# 簡單價格

**API:** Data API

**Endpoint:** `GET /v1/beta/coingecko/simple/price`

**Tags:** CoinGecko

欄位名稱由計價貨幣組成——`vs_currencies` 設為 usd 時會得到 `usd`，若同時設定對應的 `include_market_cap`、`include_24hr_vol`、`include_24hr_change` 與 `include_last_updated_at` 旗標，還會加上 `usd_market_cap`、`usd_24h_vol`、`usd_24h_change` 與 `last_updated_at`。當 id 已知且只需要目前數字時使用。若需要排名、供給量或歷史高點資料，請用 `get_coingecko_coins_markets`；若持有合約地址而非 id，請用 `get_coingecko_simple_token_price_id`。

### 定價參考

- 計量方式：方案資源單位。
- 參考請求預估：USD 0.008。
- 單位成本基礎：USD 0.0。
- 資源單位：`provider_credit`。
- 成本基礎不構成最終客戶價格，即使為零亦同。

僅供參考的中繼資料，並非帳戶報價、保證價格或消費上限。資源額度並非 Felo 額度。最終費用依 Felo 計費記錄為準。

## Base URL

- `https://openapi.felo.ai`

## Authentication

- `FeloBearerAuth` (http bearer, bearer format Felo API Key)
- `FeloApiKey` (apiKey in header `X-API-Key`)

## Parameters

| Name | In | Required | Type | Description |
| --- | --- | --- | --- | --- |
| `ids` | query | no | string, default: "bitcoin" | 幣種 ID，查詢多個幣種時以逗號分隔。 *參見 [`/coins/list`](/reference/coins-list) |
| `include_24hr_change` | query | no | boolean | 包含 24 小時漲跌幅。 預設值：false |
| `include_24hr_vol` | query | no | boolean | 包含 24 小時交易量。 預設值：false |
| `include_last_updated_at` | query | no | boolean | 包含最後更新價格時間（UNIX 時間戳）。 預設值：false |
| `include_market_cap` | query | no | boolean | 包含市值。 預設值：false |
| `include_tokens` | query | no | string, enum: "top", "all" | 使用 `symbols` 查詢時，指定 `all` 可包含所有相符的代幣。 預設的 `top` 會依市值或成交量傳回排名最前的代幣。 |
| `names` | query | no | string, default: "Bitcoin" | 幣種名稱，查詢多個幣種時以逗號分隔。 |
| `precision` | query | no | string, enum: "full", "0", "1", "2", "3", "4", … | 貨幣價格值的小數位數 |
| `symbols` | query | no | string, default: "btc" | 幣種符號，查詢多個幣種時以逗號分隔。 |
| `vs_currencies` | query | yes | string, default: "usd" | 幣種的目標計價貨幣；查詢多個貨幣時以逗號分隔。 *參見 [`/simple/supported_vs_currencies`](/reference/simple-supported-currencies) |

## Responses

### 200 — 幣種價格

Headers:
- `X-Request-Id` (string) — 聯絡 Felo 支援時需提供的請求識別碼。

**application/json**

Schema: `Response860C3Ae68Ea5_SimplePrice` (`#/components/schemas/Response860C3Ae68Ea5_SimplePrice`)

Example:

```json
{
  "bitcoin": {
    "usd": 76975,
    "usd_market_cap": 1542226908349.8406,
    "usd_24h_vol": 29096603418.89408,
    "usd_24h_change": -1.4093297098441402,
    "last_updated_at": 1779092258
  }
}
```

### 400 — 無法處理該要求。請檢查請求參數。

### 401 — 需要有效的 Felo API 金鑰。

### 402 — 由於未符合計費要求，要求無法繼續。

### 403 — 該帳戶無權執行此操作。

### 429 — 已達到要求或支出上限。

### 502 — 服務無法完成該要求。

### 503 — API 或計費服務暫時無法使用。

### 504 — 服務在處理要求時逾時。

### default — 錯誤回應；上游透傳回應可能採用供應商格式

**application/json**

Schema:

```json
{}
```

## Schema definitions

### Response860C3Ae68Ea5_SimplePrice

`#/components/schemas/Response860C3Ae68Ea5_SimplePrice`

```json
{
  "type": "object",
  "additionalProperties": {
    "type": "object",
    "properties": {
      "usd": {
        "type": "number",
        "description": "以目標貨幣計的價格"
      },
      "usd_market_cap": {
        "type": "number",
        "description": "以目標貨幣計的市值"
      },
      "usd_24h_vol": {
        "type": "number",
        "description": "以目標貨幣計的 24 小時交易量"
      },
      "usd_24h_change": {
        "type": "number",
        "description": "以目標貨幣計的 24 小時價格漲跌幅"
      },
      "last_updated_at": {
        "type": "number",
        "description": "最後更新時間戳（UNIX 秒）"
      }
    }
  }
}
```
