OneinchApi

moonsdk.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/protocols

POST /oneinch/quote

POST /oneinch/{accountName}/swap

POST /oneinch/tokens

approve_call_data

object approve_call_data(body)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.OneinchApi(api_client)
    body = None # object | 

    try:
        api_response = await api_instance.approve_call_data(body)
        print("The response of OneinchApi->approve_call_data:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling OneinchApi->approve_call_data: %s\n" % e)

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]

approve_spender

object approve_spender(body)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.OneinchApi(api_client)
    body = None # object | 

    try:
        api_response = await api_instance.approve_spender(body)
        print("The response of OneinchApi->approve_spender:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling OneinchApi->approve_spender: %s\n" % e)

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(body)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.OneinchApi(api_client)
    body = None # object | 

    try:
        api_response = await api_instance.protocols(body)
        print("The response of OneinchApi->protocols:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling OneinchApi->protocols: %s\n" % e)

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(body)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.OneinchApi(api_client)
    body = None # object | 

    try:
        api_response = await api_instance.quote(body)
        print("The response of OneinchApi->quote:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling OneinchApi->quote: %s\n" % e)

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(account_name, authorization, get_swap_dto)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.models.get_swap_dto import GetSwapDto
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.OneinchApi(api_client)
    account_name = 'account_name_example' # str | 
    authorization = 'authorization_example' # str | 
    get_swap_dto = moonsdk.GetSwapDto() # GetSwapDto | 

    try:
        api_response = await api_instance.swap(account_name, authorization, get_swap_dto)
        print("The response of OneinchApi->swap:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling OneinchApi->swap: %s\n" % e)

Parameters

Name
Type
Description
Notes

account_name

str

authorization

str

get_swap_dto

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(body)

Example

  • Api Key Authentication (ApiKeyAuth):

  • Api Key Authentication (BearerAuth):

import moonsdk
from moonsdk.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://beta.usemoon.ai
# See configuration.py for a list of all supported configuration parameters.
configuration = moonsdk.Configuration(
    host = "https://beta.usemoon.ai"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'

# Configure API key authorization: BearerAuth
configuration.api_key['BearerAuth'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['BearerAuth'] = 'Bearer'

# Enter a context with an instance of the API client
async with moonsdk.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = moonsdk.OneinchApi(api_client)
    body = None # object | 

    try:
        api_response = await api_instance.tokens(body)
        print("The response of OneinchApi->tokens:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling OneinchApi->tokens: %s\n" % e)

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]

Last updated