Awesome
<p align="center"> <img src="https://raw.githubusercontent.com/bmresearch/Solnet.Serum/master/assets/icon.png" margin="auto" height="175"/> </p> <p align="center"> <a href="https://github.com/bmresearch/Solnet.Serum/actions/workflows/dotnet.yml"> <img src="https://github.com/bmresearch/Solnet.Serum/actions/workflows/dotnet.yml/badge.svg" alt="Build .NET6" ></a> <a href="https://github.com/bmresearch/Solnet.Serum/actions/workflows/publish.yml"> <img src="https://github.com/bmresearch/Solnet.Serum/actions/workflows/publish.yml/badge.svg" alt="Release .NET6" ></a> <br/> <a href="https://github.com/bmresearch/Solnet.Serum/actions/workflows/dotnet.yml"> <img src="https://github.com/bmresearch/Solnet.Serum/actions/workflows/dotnet.yml/badge.svg?branch=net5" alt="Build .NET5" ></a> <a href="https://github.com/bmresearch/Solnet.Serum/actions/workflows/publish.yml"> <img src="https://github.com/bmresearch/Solnet.Serum/actions/workflows/publish.yml/badge.svg?branch=net5" alt="Release .NET5" ></a> <a href="https://coveralls.io/github/bmresearch/Solnet.Serum?branch=master"> <img src="https://coveralls.io/repos/github/bmresearch/Solnet.Serum/badge.svg?branch=master" alt="Coverage Status" ></a> <br/> <a href=""> <img src="https://img.shields.io/github/license/bmresearch/solnet.serum?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.Serum?
Solnet is Solana's .NET integration library, a number of packages that implement features to interact with Solana from .Net applications.
Solnet.Serum is a package within the same Solnet.
namespace that implements a Client for Serum, this project is in a
separate repository so it is contained, as the goal for Solnet was to be a core SDK.
Features
- Decoding of Serum data structures:
Market
OpenOrdersAccount
Slab
s, which are used for order book data stored underOrderBookSide
andOrderBook
which holds both sidesEventQueue
(Event
data, used to process and filter forTradeEvent
s)
SerumProgram
instructions implemented:NewOrderV3
CancelOrderV2
CancelOrderByClientIdV2
SettleFunds
ConsumeEvents
InitOpenOrders
CloseOpenOrders
Prune
SerumClient
class which allows to:- Get these structures and decode them only by having their address
- Subscribing to these accounts in real time, getting notifications with their decoded structures
MarketManager
class which has:- Various overloads of
NewOrder
,NewOrders
,CancelOrder
andCancelAllOrders
, these:- craft a transaction or several transactions, in the case where they interact with several orders
- request a signature using the defined delegate method
- submit the transaction to the cluster
- and subscribe to the confirmation of the signature, notifying the user when it happens
- if the transaction is subject to a custom error defined by the Serum Program here, it is parsed into the appropriate
SerumProgramError
enum value
- Various overloads of
- Factory patterns for both
ISerumClient
andIMarketManager
Requirements
- net 6.0
Dependencies
- Solnet.Rpc v6.0.13
- Solnet.Wallet v6.0.13
- Solnet.Programs v6.0.13
Examples
The Solnet.Serum.Examples project features some examples on how to use both the IMarketManager and the ISerumClient, these examples include:
- Streaming market data directly into user-friendly values using the
IMarketManager
interface - Submitting new orders and cancelling existing ones
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