\YearnAPI

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

Method
HTTP request
Description

AddLiquidity

Post /yearn/{name}/add-liquidity

AddLiquidityWeth

Post /yearn/{name}/add-liquidity-weth

RemoveLiquidity

Post /yearn/{name}/remove-liquidity

RemoveLiquidityWeth

Post /yearn/{name}/remove-liquidity-weth

AddLiquidity

TransactionAPIResponse AddLiquidity(ctx, name).Authorization(authorization).InputBody(inputBody).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/moon-up/moon-sdk-go"
)

func main() {
	authorization := "authorization_example" // string | 
	name := "name_example" // string | 
	inputBody := *openapiclient.NewInputBody() // InputBody | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.YearnAPI.AddLiquidity(context.Background(), name).Authorization(authorization).InputBody(inputBody).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `YearnAPI.AddLiquidity``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AddLiquidity`: TransactionAPIResponse
	fmt.Fprintf(os.Stdout, "Response from `YearnAPI.AddLiquidity`: %v\n", resp)
}

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

name

string

Other Parameters

Other parameters are passed through a pointer to a apiAddLiquidityRequest struct via the builder pattern

Name
Type
Description
Notes

authorization

string

inputBody | InputBody | |

Return type

TransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

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

AddLiquidityWeth

TransactionAPIResponse AddLiquidityWeth(ctx, name).Authorization(authorization).InputBody(inputBody).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/moon-up/moon-sdk-go"
)

func main() {
	authorization := "authorization_example" // string | 
	name := "name_example" // string | 
	inputBody := *openapiclient.NewInputBody() // InputBody | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.YearnAPI.AddLiquidityWeth(context.Background(), name).Authorization(authorization).InputBody(inputBody).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `YearnAPI.AddLiquidityWeth``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AddLiquidityWeth`: TransactionAPIResponse
	fmt.Fprintf(os.Stdout, "Response from `YearnAPI.AddLiquidityWeth`: %v\n", resp)
}

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

name

string

Other Parameters

Other parameters are passed through a pointer to a apiAddLiquidityWethRequest struct via the builder pattern

Name
Type
Description
Notes

authorization

string

inputBody | InputBody | |

Return type

TransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

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

RemoveLiquidity

TransactionAPIResponse RemoveLiquidity(ctx, name).Authorization(authorization).InputBody(inputBody).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/moon-up/moon-sdk-go"
)

func main() {
	authorization := "authorization_example" // string | 
	name := "name_example" // string | 
	inputBody := *openapiclient.NewInputBody() // InputBody | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.YearnAPI.RemoveLiquidity(context.Background(), name).Authorization(authorization).InputBody(inputBody).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `YearnAPI.RemoveLiquidity``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RemoveLiquidity`: TransactionAPIResponse
	fmt.Fprintf(os.Stdout, "Response from `YearnAPI.RemoveLiquidity`: %v\n", resp)
}

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

name

string

Other Parameters

Other parameters are passed through a pointer to a apiRemoveLiquidityRequest struct via the builder pattern

Name
Type
Description
Notes

authorization

string

inputBody | InputBody | |

Return type

TransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

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

RemoveLiquidityWeth

TransactionAPIResponse RemoveLiquidityWeth(ctx, name).Authorization(authorization).InputBody(inputBody).Execute()

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/moon-up/moon-sdk-go"
)

func main() {
	authorization := "authorization_example" // string | 
	name := "name_example" // string | 
	inputBody := *openapiclient.NewInputBody() // InputBody | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.YearnAPI.RemoveLiquidityWeth(context.Background(), name).Authorization(authorization).InputBody(inputBody).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `YearnAPI.RemoveLiquidityWeth``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `RemoveLiquidityWeth`: TransactionAPIResponse
	fmt.Fprintf(os.Stdout, "Response from `YearnAPI.RemoveLiquidityWeth`: %v\n", resp)
}

Path Parameters

Name
Type
Description
Notes

ctx

context.Context

context for authentication, logging, cancellation, deadlines, tracing, etc.

name

string

Other Parameters

Other parameters are passed through a pointer to a apiRemoveLiquidityWethRequest struct via the builder pattern

Name
Type
Description
Notes

authorization

string

inputBody | InputBody | |

Return type

TransactionAPIResponse

Authorization

ApiKeyAuth, BearerAuth

HTTP request headers

  • Content-Type: application/json

  • Accept: application/json

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