Constructs a new JupiterSwapTask.
Optional
properties: IJupiterSwapTaskProperties to set
Optional
allowA list of AMM markets to allow.
Optional
baseThe amount of in_token_address
tokens to swap.
Optional
baseThe amount of in_token_address
tokens to swap.
Optional
denyA list of AMM markets to deny.
The input token address.
The output token address.
Optional
quoteThe amount of out_token_address
tokens to swap.
Optional
quoteThe amount of out_token_address
tokens to swap.
Optional
RoutesJupiterSwapTask RoutesFilters.
The allowable slippage on the swap in decimal form (e.g. 0.5 is 0.5% slippage)
Optional
SwapJupiterSwapTask SwapAmount.
JupiterSwapTask version.
Converts this JupiterSwapTask to JSON.
JSON object
Static
createCreates a new JupiterSwapTask instance using the specified properties.
Optional
properties: IJupiterSwapTaskProperties to set
JupiterSwapTask instance
Static
decodeDecodes a JupiterSwapTask message from the specified reader or buffer.
Reader or buffer to decode from
Optional
length: numberMessage length if known beforehand
JupiterSwapTask
Static
decodeDecodes a JupiterSwapTask message from the specified reader or buffer, length delimited.
Reader or buffer to decode from
JupiterSwapTask
Static
encodeEncodes the specified JupiterSwapTask message. Does not implicitly verify messages.
JupiterSwapTask message or plain object to encode
Optional
writer: WriterWriter to encode to
Writer
Static
encodeEncodes the specified JupiterSwapTask message, length delimited. Does not implicitly verify messages.
JupiterSwapTask message or plain object to encode
Optional
writer: WriterWriter to encode to
Writer
Static
fromCreates a JupiterSwapTask message from a plain object. Also converts values to their respective internal types.
Plain object
JupiterSwapTask
Static
getGets the default type url for JupiterSwapTask
Optional
typeUrlPrefix: stringyour custom typeUrlPrefix(default "type.googleapis.com")
The default type url
Static
toCreates a plain object from a JupiterSwapTask message. Also converts values to other types if specified.
JupiterSwapTask
Optional
options: IConversionOptionsConversion options
Plain object
Static
verifyVerifies a JupiterSwapTask message.
Plain object to verify
null
if valid, otherwise the reason why it is not
Fetch the simulated price for a swap on JupiterSwap.
Input: None
Returns: The swap price on Jupiter for a given input and output token mint address.
Example: Fetch the JupiterSwap price for exchanging 1 SOL into USDC.
Example: Fetch the JupiterSwap price for exchanging 1000 SOL into USDC.