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

# getRecentBlockhash on Solana

> Call getRecentBlockhash on Solana via GoldRush JSON-RPC. Returns a recent blockhash and fee schedule (deprecated). Endpoint, parameters, return values, and code examples.

<Card title="0.01 credits per call" icon="coins" />

`getRecentBlockhash` on **Solana**: Returns a recent blockhash and fee schedule (deprecated).

<Warning>
  This method is **deprecated** in the upstream RPC API and may be removed by node operators. Use [`getLatestBlockhash`](/api-reference/json-rpc/solana/getlatestblockhash) instead.
</Warning>

## Endpoint

```
https://rpc.goldrushdata.com/v1/solana-mainnet
```

Authenticate with `Authorization: Bearer <GOLDRUSH_API_KEY>`. See [authentication](/goldrush-json-rpc/authentication).

## Parameters

| Name     | Type     | Required | Description      | Example                      |
| -------- | -------- | -------- | ---------------- | ---------------------------- |
| `config` | `object` | no       | `{commitment?}`. | `{"commitment":"finalized"}` |

## Returns

`object`: `{context, value: {blockhash, feeCalculator: {lamportsPerSignature}}}`.

```json theme={null}
{"context":{"slot":372877175},"value":{"blockhash":"EkSn...","feeCalculator":{"lamportsPerSignature":5000}}}
```

## Examples

<CodeGroup>
  ```bash curl theme={null}
  curl https://rpc.goldrushdata.com/v1/solana-mainnet \
    -H "Authorization: Bearer $GOLDRUSH_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "jsonrpc": "2.0",
      "id": 1,
      "method": "getRecentBlockhash",
      "params": [{"commitment":"finalized"}]
    }'
  ```

  ```typescript @solana/kit theme={null}
  import {
    createDefaultRpcTransport,
    createSolanaRpcFromTransport,
  } from "@solana/kit";

  const transport = createDefaultRpcTransport({
    url: "https://rpc.goldrushdata.com/v1/solana-mainnet",
    headers: { Authorization: `Bearer ${process.env.GOLDRUSH_API_KEY}` },
  });
  const rpc = createSolanaRpcFromTransport(transport);

  const result = await rpc.getRecentBlockhash({"commitment":"finalized"}).send();
  console.log(result);
  ```

  ```python python theme={null}
  import os
  import requests

  resp = requests.post(
      "https://rpc.goldrushdata.com/v1/solana-mainnet",
      headers={
          "Authorization": f"Bearer {os.environ['GOLDRUSH_API_KEY']}",
          "Content-Type": "application/json",
      },
      json={"jsonrpc": "2.0", "id": 1, "method": "getRecentBlockhash", "params": [{"commitment":"finalized"}]},
  )
  print(resp.json()["result"])
  ```
</CodeGroup>

## Errors

Standard JSON-RPC errors: `-32600` invalid request, `-32601` method not found, `-32602` invalid params.

## Related Blocks info methods on Solana

* [`getBlock` on Solana](/api-reference/json-rpc/solana/getblock)
* [`getBlocks` on Solana](/api-reference/json-rpc/solana/getblocks)
* [`getBlocksWithLimit` on Solana](/api-reference/json-rpc/solana/getblockswithlimit)
* [`getBlockHeight` on Solana](/api-reference/json-rpc/solana/getblockheight)
* [`getBlockTime` on Solana](/api-reference/json-rpc/solana/getblocktime)
