com.usemoon.MoonSDK.Api.OneinchApi
All URIs are relative to https://beta.usemoon.ai
Method
HTTP request
Description
POST /oneinch/approve-call-data
POST /oneinch/approve-spender
POST /oneinch/{accountName}/swap
ApproveCallData
Object ApproveCallData (Object body)
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 ApproveCallDataExample
{
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 OneinchApi(config);
var body = null; // Object |
try
{
Object result = apiInstance.ApproveCallData(body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OneinchApi.ApproveCallData: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the ApproveCallDataWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<Object> response = apiInstance.ApproveCallDataWithHttpInfo(body);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OneinchApi.ApproveCallDataWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Return type
Object
Authorization
ApiKeyAuth, BearerAuth
Content-Type: application/json
HTTP response details
Status code
Description
Response headers
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ApproveSpender
Object ApproveSpender (Object body)
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 ApproveSpenderExample
{
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 OneinchApi(config);
var body = null; // Object |
try
{
Object result = apiInstance.ApproveSpender(body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OneinchApi.ApproveSpender: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the ApproveSpenderWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<Object> response = apiInstance.ApproveSpenderWithHttpInfo(body);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OneinchApi.ApproveSpenderWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Return type
Object
Authorization
ApiKeyAuth, BearerAuth
Content-Type: application/json
HTTP response details
Status code
Description
Response headers
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Protocols
Object Protocols (Object body)
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 ProtocolsExample
{
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 OneinchApi(config);
var body = null; // Object |
try
{
Object result = apiInstance.Protocols(body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OneinchApi.Protocols: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the ProtocolsWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<Object> response = apiInstance.ProtocolsWithHttpInfo(body);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OneinchApi.ProtocolsWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Return type
Object
Authorization
ApiKeyAuth, BearerAuth
Content-Type: application/json
HTTP response details
Status code
Description
Response headers
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Quote
Object Quote (Object body)
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 QuoteExample
{
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 OneinchApi(config);
var body = null; // Object |
try
{
Object result = apiInstance.Quote(body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OneinchApi.Quote: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the QuoteWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<Object> response = apiInstance.QuoteWithHttpInfo(body);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OneinchApi.QuoteWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Return type
Object
Authorization
ApiKeyAuth, BearerAuth
Content-Type: application/json
HTTP response details
Status code
Description
Response headers
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Swap
Object Swap (string accountName, string authorization, GetSwapDto getSwapDto)
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 SwapExample
{
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 OneinchApi(config);
var accountName = "accountName_example"; // string |
var authorization = "authorization_example"; // string |
var getSwapDto = new GetSwapDto(); // GetSwapDto |
try
{
Object result = apiInstance.Swap(accountName, authorization, getSwapDto);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OneinchApi.Swap: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the SwapWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<Object> response = apiInstance.SwapWithHttpInfo(accountName, authorization, getSwapDto);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OneinchApi.SwapWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Return type
Object
Authorization
ApiKeyAuth, BearerAuth
Content-Type: application/json
HTTP response details
Status code
Description
Response headers
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Tokens
Object Tokens (Object body)
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 TokensExample
{
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 OneinchApi(config);
var body = null; // Object |
try
{
Object result = apiInstance.Tokens(body);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OneinchApi.Tokens: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
Using the TokensWithHttpInfo variant
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
ApiResponse<Object> response = apiInstance.TokensWithHttpInfo(body);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling OneinchApi.TokensWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Parameters
Return type
Object
Authorization
ApiKeyAuth, BearerAuth
Content-Type: application/json
HTTP response details
Status code
Description
Response headers
[Back to top] [Back to API list] [Back to Model list] [Back to README]