OneinchApi

com.usemoon.MoonSDK.Api.OneinchApi

All URIs are relative to https://beta.usemoon.ai

Method
HTTP request
Description

ApproveCallData

POST /oneinch/approve-call-data

ApproveSpender

POST /oneinch/approve-spender

Protocols

POST /oneinch/protocols

Quote

POST /oneinch/quote

Swap

POST /oneinch/{accountName}/swap

Tokens

POST /oneinch/tokens

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.

Parameters

Name
Type
Description
Notes

body

Object

Return type

Object

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

ApproveSpender

Object ApproveSpender (Object body)

Example

Using the ApproveSpenderWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

Parameters

Name
Type
Description
Notes

body

Object

Return type

Object

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Protocols

Object Protocols (Object body)

Example

Using the ProtocolsWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

Parameters

Name
Type
Description
Notes

body

Object

Return type

Object

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Quote

Object Quote (Object body)

Example

Using the QuoteWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

Parameters

Name
Type
Description
Notes

body

Object

Return type

Object

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

[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 the SwapWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

Parameters

Name
Type
Description
Notes

accountName

string

authorization

string

getSwapDto

GetSwapDto

Return type

Object

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

[Back to top] [Back to API list] [Back to Model list] [Back to README]

Tokens

Object Tokens (Object body)

Example

Using the TokensWithHttpInfo variant

This returns an ApiResponse object which contains the response data, status code and headers.

Parameters

Name
Type
Description
Notes

body

Object

Return type

Object

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

HTTP response details

Status code
Description
Response headers

200

Ok

-

[Back to top] [Back to API list] [Back to Model list] [Back to README]