Documentation ¶
Index ¶
Constants ¶
View Source
const (
DefaultApiBaseUrl = "https://quote-api.jup.ag/v6/"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) GetQuote ¶
func (c *Client) GetQuote( ctx context.Context, inputMint string, outputMint string, quarksToSwap uint64, slippageBps uint32, forceDirectRoute bool, maxAccounts uint8, useLegacyInstruction bool, ) (*Quote, error)
GetQuote gets an optimal route for performing a swap
func (*Client) GetSwapInstructions ¶
func (c *Client) GetSwapInstructions( ctx context.Context, quote *Quote, owner string, destinationTokenAccount string, ) (*SwapInstructions, error)
GetSwapInstructions gets the instructions to construct a transaction to sign and execute on chain to perform a swap with a given quote
type Quote ¶
type Quote struct {
// contains filtered or unexported fields
}
func (*Quote) GetEstimatedSwapAmount ¶ added in v1.2.0
type SwapInstructions ¶
type SwapInstructions struct { TokenLedgerInstruction *solana.Instruction ComputeBudgetInstructions []solana.Instruction SetupInstructions []solana.Instruction SwapInstruction solana.Instruction CleanupInstruction *solana.Instruction }
Click to show internal directories.
Click to hide internal directories.