Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bifrost-technologies/solnet.raydium
C# client and SDK for the Raydium v4 Amm program on Solana!
https://github.com/bifrost-technologies/solnet.raydium
amm csharp raydium sdk solana solnet
Last synced: 3 months ago
JSON representation
C# client and SDK for the Raydium v4 Amm program on Solana!
- Host: GitHub
- URL: https://github.com/bifrost-technologies/solnet.raydium
- Owner: Bifrost-Technologies
- License: mit
- Created: 2024-03-07T22:42:57.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-10-21T19:17:22.000Z (4 months ago)
- Last Synced: 2024-10-22T02:08:27.274Z (4 months ago)
- Topics: amm, csharp, raydium, sdk, solana, solnet
- Language: C#
- Homepage:
- Size: 23.4 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![raydium-small](https://github.com/user-attachments/assets/4cc1bc3d-6f0c-4a52-bc59-4466ddc68c9f)
# Solnet.Raydium
A C# SDK & Client for Rayium's V4 Amm program on Solana### Dependencies
- NET8
- Solnet.Rpc
- Solnet.Wallet
- Solnet.Programs#### Search for the NET8 tag on nuget to find the latest versions of Solnet
### Quickstart
```
using Solnet.Programs.Utilities;
using Solnet.Raydium.Client;
using Solnet.Raydium.Types;
using Solnet.Rpc;
using Solnet.Wallet;IRpcClient connection = ClientFactory.GetClient("RPC LINK HERE");
RaydiumAmmClient raydiumAmmClient = new RaydiumAmmClient(connection);Account trader = Account.FromSecretKey("SECRET KEY HERE");
//amountIn must be in lamports
//Minimum out can be 0 to always execute no matter what or set it specifically to apply a fixed slippage rate
var swap_test = await raydiumAmmClient.SendSwapAsync(new PublicKey("POOL ADDRESS HERE"), SolHelper.ConvertToLamports(0.01m), 0, OrderSide.Buy, trader, trader);Console.WriteLine(swap_test.RawRpcResponse.ToString());
Console.ReadKey();
```