Skip to main content

About

This library contains python code to interact with Jito's Geyser Plugin.

Downloading

$ pip install jito_geyser

Access Token

Please request access to geyser by emailing support@jito.wtf

Examples

Printing slot updates

from grpc import ssl_channel_credentials, secure_channel

from jito_geyser.generated.geyser_pb2 import SubscribeSlotUpdateRequest
from jito_geyser.generated.geyser_pb2_grpc import GeyserStub

GEYSER_URL = "mainnet.rpc.jito.wtf"
ACCESS_TOKEN = "ACCESS_TOKEN_HERE"

channel = secure_channel(GEYSER_URL, ssl_channel_credentials())
client = GeyserStub(channel)
for msg in client.SubscribeSlotUpdates(SubscribeSlotUpdateRequest(), metadata=[("access-token", ACCESS_TOKEN)]):
    print(msg)

Listening to program account updates

This example listens to pyth-owned accounts

from grpc import ssl_channel_credentials, secure_channel
from solders.pubkey import Pubkey # note: probably need to install solders for this import

from jito_geyser.generated.geyser_pb2 import SubscribeProgramsUpdatesRequest
from jito_geyser.generated.geyser_pb2_grpc import GeyserStub

GEYSER_URL = "mainnet.rpc.jito.wtf"
ACCESS_TOKEN = "ACCESS_TOKEN_HERE"
ACCOUNTS = [bytes(Pubkey.from_string("FsJ3A3u2vn5cTVofAjvy6y5kwABJAqYWpe4975bi2epH"))]

channel = secure_channel(GEYSER_URL, ssl_channel_credentials())
client = GeyserStub(channel)
for msg in client.SubscribeProgramUpdates(SubscribeProgramsUpdatesRequest(programs=ACCOUNTS), metadata=[("access-token", ACCESS_TOKEN)]):
    print(msg)

Functions available

  • There are many functions available including:
    • GetHeartbeatInterval
    • SubscribeAccountUpdates
    • SubscribeProgramUpdates
    • SubscribePartialAccountUpdates
    • SubscribeSlotUpdates
    • SubscribeTransactionUpdates
    • SubscribeBlockUpdates

Development

Install pip

$ curl -sSL https://bootstrap.pypa.io/get-pip.py | python 3 -

Install poetry

$ curl -sSL https://install.python-poetry.org | python3 -

Setup environment and build protobufs

$ poetry install
$ poetry shell
$ poetry protoc

Linting

$ poetry run black .
$ poetry run isort .

Publishing package

$ poetry protoc && poetry build && poetry publish

Metadata

Release files for jito-geyser 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jito-geyser 0.1.0
File Size Uploaded Provenance Actions
jito_geyser-0.1.0.tar.gz 18.4 kB Without provenance Details for jito_geyser-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jito-geyser 0.1.0
File Interpreter ABI Platform Actions
jito_geyser-0.1.0-py3-none-any.whl Python 3 none any Details for jito_geyser-0.1.0-py3-none-any.whl

Total release size: 40.5 kB

Release files / jito_geyser-0.1.0.tar.gz

Download URL jito_geyser-0.1.0.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
db1e6a2c1b7e178edfe9767e1da62080b3315e9fead9f6a51f3b7e9603da0b2a
BLAKE2b-256 checksum
How to use checksums
3997a841bf2dcdae71df28d02605381a0085080ce1976717c4c63093e6a580dd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.8 Darwin/21.6.0

Release files / jito_geyser-0.1.0-py3-none-any.whl

Download URL jito_geyser-0.1.0-py3-none-any.whl
Size 22.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
28fd93579d9b7a3c0cb774d51d59cd5bcc13aad8c9ac5dc1898251270a82a453
BLAKE2b-256 checksum
How to use checksums
fa536c259cb254b89379c91693cc46689ccc119b5d3f4bba65486fe2a65ad4f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.8 Darwin/21.6.0

Security for jito-geyser 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page