# Examples

{% hint style="success" %}

### Token Optional

The `x-token` header is only required if you have enabled it in the configuration or you are accessing a hosted Old Faithful version that requires it.
{% endhint %}

{% hint style="warning" %}

## Protocol File

All `grpcurl` commands require the proto file to be passed. You can find it [here](https://raw.githubusercontent.com/rpcpool/yellowstone-faithful/refs/heads/main/old-faithful-proto/proto/old-faithful.proto).
{% endhint %}

## Unary Methods

Unary commands return a single response. \
\
They are similar to standard JSON-RPC methods, but you can send an arbitrary number of messages over a persistent, bi-direction connection.

### OldFaithful.OldFaithful/GetVersion

```bash
grpcurl \
  -proto old-faithful.proto \
  -d '' \
  -H 'x-token: <redacted-token>' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/GetVersion
```

### OldFaithful.OldFaithful/GetBlockTime

```bash
grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"slot": 307152000}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/GetBlockTime
```

### OldFaithful.OldFaithful/GetBlock

```
grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"slot": 307152000}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/GetBlock
```

### OldFaithful.OldFaithful/GetTransaction

```
grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"signature": "GbXoI+D7hhgeiUwovUhtaxog6zsxFcd5PKfhQM85GR6+NqmiFmQDf9cCCVj8BRj+DR1RvgR/E2E/ckbSGuQKCg=="}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/GetTransaction
```

## Streaming Methods

Streaming methods will stream the response to the client.  These methods allow you to retrieve data in large contiguous chunks, scoped by a `start_slot` and `end_slot` parameter.

Streaming commands also support a filter that will reduce the messages you receive.&#x20;

### OldFaithful.OldFaithful/StreamBlocks

The following filters are available for `StreamBlocks`:

* `account_include`: Array of base58 strings

#### No Filters

```
grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"start_slot": 307152000, "end_slot": 307152010}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/StreamBlocks
```

#### Filtered

```
grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"start_slot": 307152000, "end_slot": 307152010, "filter": {"account_include": ["Vote111111111111111111111111111111111111111"]}}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/StreamBlocks
```

### OldFaithful.OldFaithful/StreamTransactions

The following filters are available for `StreamTransactions`:

* `vote`: boolean
* `failed` : boolean
* `account_include`: Array of base58 strings
* `account_exclude`: Array of base58 strings
* `account_required`: Array of base58 strings

#### No Filters

```
grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"start_slot": 307152000, "end_slot": 307152010}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/StreamTransactions
```

#### Filtered

```
grpcurl \
  -proto old-faithful.proto \
  -H 'x-token: <redacted-token>' \
  -d '{"start_slot": 307152000, "end_slot": 307152010, "filter": {"vote": false, "failed": true}}' \
  customer-endpoint-2608.mainnet.rpcpool.com:443 \
  OldFaithful.OldFaithful/StreamTransactions
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.old-faithful.net/references/grpc-methods/examples.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
