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: 5 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 (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-21T19:17:22.000Z (over 1 year ago)
- Last Synced: 2025-03-26T08:47:36.496Z (about 1 year ago)
- Topics: amm, csharp, raydium, sdk, solana, solnet
- Language: C#
- Homepage:
- Size: 23.4 KB
- Stars: 9
- Watchers: 2
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# 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();
```