# Yellowstone gRPC

The **Yellowstone gRPC endpoint** is mostly used to subscribe to events on the Solana network, such as transactions, votes, new blocks, program executions, etc. – it is the best option to receive transaction data as fast as possible. Compared to traditional WebSocket subscriptions, gRPC has **minimal latency** and **maximum throughput.**

> **Yellowstone gRPC** endpoint is offered within the **Stream plan** (SaaS) and a [dedicated node](https://rpcfast.com/dedicated-solana-nodes) offering at no additional cost.

### How to test Yellowstone gRPC endpoint

1. Install [grpcurl](https://github.com/fullstorydev/grpcurl) software onto your machine.
2. Download Yellowstone gRPC proto files [geyser.proto](https://github.com/rpcpool/yellowstone-grpc/releases/download/v6.0.0%2Bsolana.2.2.4/geyser.proto), [solana-storage.proto](https://github.com/rpcpool/yellowstone-grpc/releases/download/v6.0.0%2Bsolana.2.2.4/solana-storage.proto) (gRPC protocol needs to know methods and how to interact with them).
3. Place these files to the folder from where you want to invoke `grpcurl` command.
4. Grab your endpoint (i.e. `sol-yellowstone-customer.rpcfast.net`) and your token, which you have received when you ordered the node.
5. From terminal, launch the command to show the current slot number of the node.

   {% code overflow="wrap" %}

   ```shell
   X_TOKEN="YOUR-TOKEN"
   YELLOWSTONE_ENDPOINT="YOUR-YELLOWSTONE-GRPC-ENDPOINT"

   grpcurl \
     -proto geyser.proto \
     -H "x-token: ${X_TOKEN}" \
     ${YELLOWSTONE_ENDPOINT} geyser.Geyser/GetSlot
   ```

   {% endcode %}
6. To test subcription to events, let's take a look at an example of subscribing to transactions on Pump.fun with "processed" commitment level:

   {% code overflow="wrap" %}

   ```shell
   X_TOKEN="YOUR-TOKEN"
   YELLOWSTONE_ENDPOINT="YOUR-YELLOWSTONE-GRPC-ENDPOINT"

   grpcurl \
     -proto geyser.proto \
     -H "x-token: ${X_TOKEN}" \
     -d '{
           "transactions": {
             "pumpfun": {
               "account_include": ["6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"]
             }
           },
           "commitment": 0
         }' \
     "${YELLOWSTONE_ENDPOINT}" geyser.Geyser/Subscribe
   ```

   {% endcode %}7. For further usage with your applications, please refer to examples, written in Go, Rust and Node:\
   <https://github.com/rpcpool/yellowstone-grpc/tree/master/examples/golang>\
   <https://github.com/rpcpool/yellowstone-grpc/tree/master/examples/rust>\
   <https://github.com/rpcpool/yellowstone-grpc/tree/master/examples/typescript>
7. Refer to official documentation for advanced usage: <https://docs.triton.one/project-yellowstone/dragons-mouth-grpc-subscriptions>.
