Constructs a new TitanTask.
Optionalproperties: ITitanTaskProperties to set
Optional API access token for authenticated requests
The amount of tokens to swap (raw atoms, not scaled by decimals).
Optional API endpoint override (defaults to partners.api.titan.exchange)
OptionaldexesIf set, constrain quotes to the given set of DEXes.
OptionalexcludeIf set, exclude the following DEXes when determining routes.
The input token mint address (base58 encoded).
If set to true, only direct routes between the input and output mint will be considered.
The output token mint address (base58 encoded).
If set, limit quotes to the given set of provider IDs.
Allowed slippage in basis points (e.g., 50 = 0.5%).
Whether the amount is in terms of input or output token. Defaults to ExactIn.
Optional user public key for transaction generation (base58 encoded).
Converts this TitanTask to JSON.
JSON object
StaticcreateCreates a new TitanTask instance using the specified properties.
Optionalproperties: ITitanTaskProperties to set
TitanTask instance
StaticdecodeStaticdecodeStaticencodeEncodes the specified TitanTask message. Does not implicitly {@apilink oracle_job.OracleJob.TitanTask.verify|verify} messages.
TitanTask message or plain object to encode
Optionalwriter: WriterWriter to encode to
Writer
StaticencodeEncodes the specified TitanTask message, length delimited. Does not implicitly {@apilink oracle_job.OracleJob.TitanTask.verify|verify} messages.
TitanTask message or plain object to encode
Optionalwriter: WriterWriter to encode to
Writer
StaticfromStaticgetGets the default type url for TitanTask
OptionaltypeUrlPrefix: stringyour custom typeUrlPrefix(default "type.googleapis.com")
The default type url
StatictoStaticverifyVerifies a TitanTask message.
Plain object to verify
null if valid, otherwise the reason why it is not
Fetch the simulated swap price from Titan API.
Input: None
Returns: The swap price on Titan for a given input and output token mint address.
Example: Fetch the Titan price for exchanging 1 SOL into USDC.
Example: Fetch the Titan price for exchanging 1000 SOL into USDC with slippage.