using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class AddLiquidityExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new YearnApi(config);
var authorization = "authorization_example"; // string |
var name = "name_example"; // string |
var inputBody = new InputBody(); // InputBody |
try
{
TransactionAPIResponse result = apiInstance.AddLiquidity(authorization, name, inputBody);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling YearnApi.AddLiquidity: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the AddLiquidityWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class AddLiquidityWethExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new YearnApi(config);
var authorization = "authorization_example"; // string |
var name = "name_example"; // string |
var inputBody = new InputBody(); // InputBody |
try
{
TransactionAPIResponse result = apiInstance.AddLiquidityWeth(authorization, name, inputBody);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling YearnApi.AddLiquidityWeth: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the AddLiquidityWethWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class RemoveLiquidityExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new YearnApi(config);
var authorization = "authorization_example"; // string |
var name = "name_example"; // string |
var inputBody = new InputBody(); // InputBody |
try
{
TransactionAPIResponse result = apiInstance.RemoveLiquidity(authorization, name, inputBody);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling YearnApi.RemoveLiquidity: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the RemoveLiquidityWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
using System.Collections.Generic;
using System.Diagnostics;
using com.usemoon.MoonSDK.Api;
using com.usemoon.MoonSDK.Client;
using com.usemoon.MoonSDK.Model;
namespace Example
{
public class RemoveLiquidityWethExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://beta.usemoon.ai";
// Configure API key authorization: ApiKeyAuth
config.AddApiKey("x-api-key", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("x-api-key", "Bearer");
// Configure API key authorization: BearerAuth
config.AddApiKey("Authorization", "YOUR_API_KEY");
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// config.AddApiKeyPrefix("Authorization", "Bearer");
var apiInstance = new YearnApi(config);
var authorization = "authorization_example"; // string |
var name = "name_example"; // string |
var inputBody = new InputBody(); // InputBody |
try
{
TransactionAPIResponse result = apiInstance.RemoveLiquidityWeth(authorization, name, inputBody);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling YearnApi.RemoveLiquidityWeth: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the RemoveLiquidityWethWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.