UniSwapApi
com.usemoon.MoonSDK.Api.UniSwapApi
Method
HTTP request
Description
AddLiquidity
Example
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 UniSwapApi(config);
var authorization = "authorization_example"; // string |
var name = "name_example"; // string |
var uniswapInput = new UniswapInput(); // UniswapInput |
try
{
TransactionAPIResponse result = apiInstance.AddLiquidity(authorization, name, uniswapInput);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UniSwapApi.AddLiquidity: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}Parameters
Name
Type
Description
Notes
Return type
Authorization
HTTP request headers
HTTP response details
Status code
Description
Response headers
RemoveLiquidity
Example
Parameters
Name
Type
Description
Notes
Return type
Authorization
HTTP request headers
HTTP response details
Status code
Description
Response headers
SwapExactETHForTokens
Example
Parameters
Name
Type
Description
Notes
Return type
Authorization
HTTP request headers
HTTP response details
Status code
Description
Response headers
SwapExactTokensForTokens
Example
Parameters
Name
Type
Description
Notes
Return type
Authorization
HTTP request headers
HTTP response details
Status code
Description
Response headers