.NET 6.0
dotnet add package Chia-Client-API --version
NuGet\Install-Package Chia-Client-API -Version
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Chia-Client-API" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Chia-Client-API --version
#r "nuget: Chia-Client-API,"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Chia-Client-API as a Cake Addin
#addin nuget:?package=Chia-Client-API&version=

// Install Chia-Client-API as a Cake Tool
#tool nuget:?package=Chia-Client-API&version=


Thank you for considering using the Chia Client API for C#! Here is a brief overview of what you can expect to find in this repository:


This repository contains a C# wrapper for the Chia blockchain API. It allows you to easily interact with the Chia blockchain from your C# applications.

This library is also available on NuGet. You can find it by searching for "ChiaClientAPI" in the NuGet Package Manager or by using the following command in the Package Manager Console:

Install-Package Chia-Client-API


A simple, easy-to-use interface for accessing the Chia API Support for all API endpoints, including those for managing accounts, sending and receiving transactions, and querying the blockchain Detailed documentation for each API endpoint, including descriptions of input and output parameters

  • viewing, creating and managing wallets
  • sending chia, cats, nfts
  • creating offers for chia, cats and nfts
  • exploring the blockchain
  • managing datalayer
  • managing simulator
  • Minting NFTs
  • Creating CATs


.NET 6 or higher


To install this library from the repository, simply clone the repository and open the solution file in Visual Studio. You can then build the solution and reference the compiled library in your own C# projects.

Alternatively, you can install the library from NuGet as described above.


Note: Per default, chia rpc will only listen to requests from the local machine and also load the certificates of the local machine automatically.
If you have remote machines to manage, eg a full node or farmers, you need to enable public port listening.
For that, edit the chia configuration (default at ~/.chia/mainnet/config/config.yaml).
Look for a line starting with self-hostname like so: self_hostname: &self_hostname "localhost"
change it to: self_hostname: to listen on all interfaces or to the local interface ip to listen on a specific interface.

You will need to create an instance of the ChiaClient class and pass in your API certificates:

// ... available endpoints ...
using Chia_Client_API.FullNodeAPI_NS;
using Chia_Client_API.WalletAPI_NS;
using Chia_Client_API.FarmerAPI_NS;
using Chia_Client_API.HarvesterAPI_NS;
using Chia_Client_API.DatalayerAPI_NS;

// ... initialize local host ...
Wallet_RPC_Client client = new Wallet_RPC_Client();

// ... initialize remote host ...
string certificatePath = Path.Combine(
Fullnode_Client = new FullNode_RPC_Client(targetApiAddress: "", targetCertificateBaseFolder: certificatePath);

You can then call any of the API endpoints by calling the corresponding method on the client object. For example, to get the balance of an account, you can use the GetWalletBalance_Sync method:

using Chia_Client_API.WalletAPI_NS;
using CHIA_RPC.General_NS;
using CHIA_RPC.Wallet_NS.Wallet_NS;

namespace ChiaTransactionExaminator
    internal class Clients
        private static Wallet_RPC_Client Wallet = new Wallet_RPC_Client();
        public decimal GetBalance()
            WalletID_RPC walletID_RPC = new WalletID_RPC(1);
            GetWalletBalance_Response response = Wallet.GetWalletBalance_Sync(walletID_RPC);
            return response.wallet_balance.confirmed_wallet_balance_in_xch;

Note that a request usually consists of 3 Steps:

  1. Compile the RPC document (with the included chia rpc library) This defines the data which you want to pull prom the chia node
  2. Making the request (with the chia client library) this actually connects to the node and makes the request
  3. Loading the data into a response

Refer to the documentation for specific usage instructions for each API endpoint.

Creating a cat offer

this is how you offer Cat vs chia:

CatGetAssetId_Response assetId = Testnet_Wallet.Wallet_Client.CatGetAssetID_Sync(new WalletID_RPC(;
CreateOfferForIds_RPC offer_rpc = new CreateOfferForIds_RPC();
offer_rpc.offer.Add("1", -50000); // you want to give 500000 mojos
offer_rpc.offer.Add(assetId.asset_id, 500); // you want to receive 0.5 of asset x
OfferFile offer = Testnet_Wallet.Wallet_Client.CreateOfferForIds_Sync(offer_rpc);

note you can also give amounts in decimal chia (note that 1 cat is normally 1000 mojos so mind the conversion there)

offer_rpc.AddOfferPosition("1", -0.005); // you want to give 500000 mojos


We welcome contributions to this repository! If you have suggestions for improvements or new features, please open an issue or submit a pull request.


This library is licensed under the MIT License. Please see the LICENSE file for more information.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed. 
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated 83 8/31/2023
2.0.0 89 8/28/2023 83 8/22/2023 74 8/22/2023 115 8/10/2023 98 8/9/2023 111 8/9/2023 92 8/9/2023 88 8/9/2023
1.8.2 97 7/26/2023 85 6/26/2023 102 6/23/2023 87 6/22/2023 78 6/22/2023 74 6/22/2023 76 6/22/2023 80 6/22/2023 100 6/21/2023 103 6/14/2023 92 6/14/2023 118 6/12/2023 103 6/9/2023 98 6/9/2023 98 6/9/2023 112 6/7/2023 94 6/7/2023
1.8.1 104 6/2/2023
1.8.0 115 5/11/2023
1.7.1 123 4/21/2023 215 2/8/2023 201 2/8/2023 211 2/5/2023 226 1/31/2023 208 1/31/2023 229 1/28/2023 237 1/26/2023 243 1/25/2023 227 1/24/2023 232 1/17/2023 228 1/16/2023 240 1/15/2023 242 1/13/2023
1.6.2 241 1/12/2023 232 1/11/2023 231 1/11/2023 235 1/11/2023 242 1/10/2023 243 12/29/2022
1.6.1 252 12/29/2022
- Marked GetTransactions and corresponding classes/functions as obsolete due to official statement:
"Transaction history is not deterministic due to heuristics we use to counter privacy features of the blockchain. the wallet does a best effort. we are trying to improve this going forward. for accurate records you should keep a local record of TXs made. If the balance is not the same (within a mojos because of dust filtering) please let us know."

- documentation updates according to official documentation
- added signing_mode to verify_signature