Yellowstone gRPC

Our clients have access to the Yellowstone gRPC endpoint by default. This 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.

How to test Yellowstone gRPC endpoint

  1. Install grpcurlarrow-up-right software onto your machine.

  2. Download Yellowstone gRPC proto files geyser.protoarrow-up-right, solana-storage.protoarrow-up-right (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" %}

    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" %}

    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/golangarrow-up-right https://github.com/rpcpool/yellowstone-grpc/tree/master/examples/rustarrow-up-right https://github.com/rpcpool/yellowstone-grpc/tree/master/examples/typescriptarrow-up-right

Last updated