Home

Awesome

<p align="center"> <img src="assets/icon.png" margin="auto" height="175"/> </p> <p align="center"> <a href="https://github.com/bmresearch/Solnet.Pyth/actions/workflows/build.yml"> <img alt="Build .NET6" src="https://github.com/bmresearch/Solnet.Pyth/actions/workflows/build.yml/badge.svg"></a> <a href="https://github.com/bmresearch/Solnet.Pyth/actions/workflows/publish.yml"> <img alt="Release .NET6" src="https://github.com/bmresearch/Solnet.Pyth/actions/workflows/publish.yml/badge.svg"></a> <br/> <a href="https://github.com/bmresearch/Solnet.Pyth/actions/workflows/build.yml"> <img alt="Build .NET5" src="https://github.com/bmresearch/Solnet.Pyth/actions/workflows/build.yml/badge.svg?branch=net5"></a> <a href="https://github.com/bmresearch/Solnet.Pyth/actions/workflows/publish.yml"> <img alt="Release .NET5" src="https://github.com/bmresearch/Solnet.Pyth/actions/workflows/publish.yml/badge.svg?branch=net5"></a> <a href="https://coveralls.io/github/bmresearch/Solnet.Pyth?branch=main"> <img src="https://coveralls.io/repos/github/bmresearch/Solnet.Pyth/badge.svg?branch=main" alt="Coverage Status" ></a> <br/> <a href=""> <img src="https://img.shields.io/github/license/bmresearch/solnet.pyth?style=flat-square" alt="Code License"></a> <a href="https://twitter.com/intent/follow?screen_name=blockmountainio"> <img src="https://img.shields.io/twitter/follow/blockmountainio?style=flat-square&logo=twitter" alt="Follow on Twitter"></a> <a href="https://discord.gg/YHMbpuS3Tx"> <img alt="Discord" src="https://img.shields.io/discord/849407317761064961?style=flat-square" alt="Join the discussion!"></a> </p>

What is Solnet.Pyth?

Solnet is Solana's .NET integration library, a number of packages that implement features to interact with Solana from .Net applications.

Solnet.Pyth is a package within the same Solnet. namespace that implements a Client for Pyth, this project is in a separate repository so it is contained, as the goal for Solnet was to be a core SDK.

Features

Requirements

Dependencies

API

The IPythClient API follows the following structure:

JSON RPC

GetMappingAccountAsync(string account, Commitment commitment = Commitment.Finalized);
GetMappingAccount(string account, Commitment commitment = Commitment.Finalized);
GetProductAccountAsync(string account, Commitment commitment = Commitment.Finalized);
GetProductAccount(string account, Commitment commitment = Commitment.Finalized);
GetProductAccountsAsync(MappingAccount mappingAccount, Commitment commitment = Commitment.Finalized);
GetProductAccounts(MappingAccount mappingAccount, Commitment commitment = Commitment.Finalized);
GetPriceDataAccountAsync(string account, Commitment commitment = Commitment.Finalized);
GetPriceDataAccount(string account, Commitment commitment = Commitment.Finalized);
GetPriceDataAccountsAsync(List<ProductAccount> productAccounts, Commitment commitment = Commitment.Finalized);
GetPriceDataAccounts(List<ProductAccount> productAccounts, Commitment commitment = Commitment.Finalized);

Streaming JSON RPC

SubscribePriceDataAccountAsync(Action<Subscription, PriceDataAccount, ulong> action, string priceAccountAddress, Commitment commitment = Commitment.Finalized);
SubscribePriceDataAccount(Action<Subscription, PriceDataAccount, ulong> action, string priceAccountAddress, Commitment commitment = Commitment.Finalized);
UnsubscribePriceDataAccountAsync(string priceAccountAddress);
UnsubscribePriceDataAccount(string priceAccountAddress);

Examples

The Solnet.Pyth.Examples project features some examples on how to usethe ISerumClient, these examples include:

Contribution

We encourage everyone to contribute, submit issues, PRs, discuss. Every kind of help is welcome.

Contributors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE file for details