Constructs a new LpExchangeRateTask.
Optionalproperties: ILpExchangeRateTaskProperties to set
LpExchangeRateTask chain.
Used alongside mercurial_pool_address to specify the input token for a swap.
OptionalmercurialMercurial finance pool address. A full list can be found here: https://github.com/mercurial-finance/stable-swap-n-pool-js
OptionalorcaPool address for an Orca LP pool or whirlpool. A full list of Orca LP pools can be found here: https://www.orca.so/pools
Optionalorca@deprecated Use orcaPoolAddress
Used alongside mercurial_pool_address to specify the output token for a swap.
OptionalPoolLpExchangeRateTask PoolAddress.
OptionalportThe Port reserve pubkey. A full list can be found here: https://api-v1.port.finance/reserves
OptionalraydiumThe Raydium liquidity pool ammId. A full list can be found here: https://raydium.io/pools
OptionalsaberSaber pool address. A full list can be found here: https://github.com/saber-hq/saber-registry-dist
Converts this LpExchangeRateTask to JSON.
JSON object
StaticcreateCreates a new LpExchangeRateTask instance using the specified properties.
Optionalproperties: ILpExchangeRateTaskProperties to set
LpExchangeRateTask instance
StaticdecodeDecodes a LpExchangeRateTask message from the specified reader or buffer.
Reader or buffer to decode from
Optionallength: numberMessage length if known beforehand
LpExchangeRateTask
StaticdecodeDecodes a LpExchangeRateTask message from the specified reader or buffer, length delimited.
Reader or buffer to decode from
LpExchangeRateTask
StaticencodeEncodes the specified LpExchangeRateTask message. Does not implicitly {@apilink oracle_job.OracleJob.LpExchangeRateTask.verify|verify} messages.
LpExchangeRateTask message or plain object to encode
Optionalwriter: WriterWriter to encode to
Writer
StaticencodeEncodes the specified LpExchangeRateTask message, length delimited. Does not implicitly {@apilink oracle_job.OracleJob.LpExchangeRateTask.verify|verify} messages.
LpExchangeRateTask message or plain object to encode
Optionalwriter: WriterWriter to encode to
Writer
StaticfromCreates a LpExchangeRateTask message from a plain object. Also converts values to their respective internal types.
Plain object
LpExchangeRateTask
StaticgetGets the default type url for LpExchangeRateTask
OptionaltypeUrlPrefix: stringyour custom typeUrlPrefix(default "type.googleapis.com")
The default type url
StatictoCreates a plain object from a LpExchangeRateTask message. Also converts values to other types if specified.
LpExchangeRateTask
Optionaloptions: IConversionOptionsConversion options
Plain object
StaticverifyVerifies a LpExchangeRateTask message.
Plain object to verify
null if valid, otherwise the reason why it is not
Fetch the current swap price for a given liquidity pool
Input: None
Returns: The swap price for a given AMM pool.
Example: Fetch the exchange rate from the Orca SOL/USDC pool
Example: Fetch the exchange rate from the Raydium SOL/USDC pool