# eth_getBlockByHash：參數、傳回值與 CU

> Source: https://docs.blockvectra.com/zh-hant/api/json-rpc/methods/eth_getBlockByHash/

## 用途

按區塊雜湊取得區塊，可選擇是否傳回完整交易物件。

## 計算單位（CU）與價格

- 單次呼叫 CU: 10 CU
- 每百萬次呼叫價格（USD）: $1.00

## 參數

| 參數名 | 類型 | 說明 |
| --- | --- | --- |
| `blockHash` | `HASH` | 32 位元組區塊雜湊，0x 十六進位。 |
| `fullTransactions` | `boolean` | 為 true 時傳回完整的交易物件，為 false 時只傳回交易雜湊清單。 |

## 傳回值

- **類型**: `OBJECT|NULL`
- **說明**: 區塊物件；找不到時傳回 null。

## 注意事項

相比按高度查詢，按雜湊查詢指向的區塊是確定的。

## 請求範例

```bash
export BLOCKVECTRA_API_KEY=rgw_your_api_key

curl -X POST "https://api.blockvectra.com/v1/robinhood_mainnet" \
  -H 'Content-Type: application/json' \
  -H "x-api-key: $BLOCKVECTRA_API_KEY" \
  -d '{
    "jsonrpc": "2.0",
    "method": "eth_getBlockByHash",
    "params": [
      "<blockHash>",
      false
    ],
    "id": 1
  }'
```

## 可用鏈

全部 9 條支援鏈均可用。
