> For the complete documentation index, see [llms.txt](https://doc.xendbridge.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.xendbridge.com/xendbridge-sdks/xendbridge-.net-sdk.md).

# XendBridge .NET SDK

Xendbridge provides a .NET SDK which can be integrated by downloading from the Nugget Package Manager on [Visual Studio](https://visualstudio.microsoft.com/downloads/) or from the [website](https://www.nuget.org/).

#### Installation

The .NET SDK can be integrated by downloading from the Nugget Package Manager on [Visual Studio](https://visualstudio.microsoft.com/downloads/) or from the [website](https://www.nuget.org/).

#### Setup

Firstly, in your ***appsettings.json*** file, you'd need to add the following JSON object and properties and populate them with the necessary values considering the environments of your choice. See [Get Started](/get-started.md#keys) and [Get Started](/get-started.md#environments) to get your keys and urls.

<pre class="language-json"><code class="lang-json"><strong>"XendBridgeSDKConfig": {
</strong>    "BaseUrl": "https://canary.xendbridge.com",
    "PublicKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXX",
    "SecretKey": "XXXXXXXXXXXXXXXXXXXXXXXXXXX"
  }
</code></pre>

Secondly, add or bind the config settings to your project by injecting it into your **services** using the following code snippet;

```csharp
public static IServiceCollection ConfigureAppSettingsBinding(this IServiceCollection services, IConfiguration Configuration)
{
  //Your other registered services can be here
  services.RegisterXendBridgeSDKConfig(Configuration);
  
  return services;
}
```

Lastly, you'd need to register the SDK as a service in the **services** using the code snippet below;

```csharp
public static IServiceCollection RegisterServices(this IServiceCollection services)
{
  services.AddXendBridgeSDK();
}
```

#### Method Calls <a href="#method-calls" id="method-calls"></a>

After adding the [setup](#setup) above, the following functions, objects, and params are provided for the following method calls below.&#x20;

* [**Rate**](/xendbridge-sdks/xendbridge-.net-sdk/rate.md)
* [**Buy Order**](/xendbridge-sdks/xendbridge-.net-sdk/buy-order.md)
* [**Sell Order**](/xendbridge-sdks/xendbridge-.net-sdk/sell-order.md)
* [**Swap Order**](/xendbridge-sdks/xendbridge-.net-sdk/swap-order.md)
* [**Pending Order**](/xendbridge-sdks/xendbridge-.net-sdk/pending-order.md)
* [**Pay For Order Confirmation**](/xendbridge-sdks/xendbridge-.net-sdk/pay-for-order-confirmation.md)
* [**Cancel Order**](/xendbridge-sdks/xendbridge-.net-sdk/cancel-order.md)
* [**Raise Dispute**](/xendbridge-sdks/xendbridge-.net-sdk/raise-a-dispute.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://doc.xendbridge.com/xendbridge-sdks/xendbridge-.net-sdk.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
