Introducing Petasos: A Lightweight Client for Real-Time Pyth Price Feeds in NodeJS

Hello the Pyth community !

Today, I’m excited to share Petasos — a minimal and modern TypeScript client for consuming real-time price updates from the Pyth Network.

What is Petasos?

Petasos is a wrapper around the @pythnetwork/hermes-client, designed to simplify:

  • Subscribing to price feeds (BTC/USD, ETH/USD, etc.)
  • Reconnecting automatically on dropped connections
  • Plugging in your own custom price handler
  • The deal with SSE

DISCLAMER: the library is not stable at the moment I will add bunch of features soon and rewrite the client

Why I Built It

While using the raw Hermes client, I quickly hit a major frustration:

I had to manually manage the SSE connection (event listeners, reconnections, and message parsing).

That boilerplate got repetitive fast, especially for something that should be simple.
So Petasos wraps that all up for you with a clean, reusable interface.

What’s Next

I plan to add more features soon — like fully typed price feeds with autocompletion — and I’m also looking forward to your feedback.

Don’t hesitate to give me a star it will really help me to develop the library !

:backhand_index_pointing_right: github.com/MaximeMRF/petasos

2 Likes

Hey @MaximeMRF

Thank you for contributing and making the Typescript Client.
Feel free to post and message us if you have any questions or if any help is needed.

1 Like