Constructs a new LpExchangeRateTask.
Optional
properties: ILpExchangeRateTaskProperties to set
Optional
PoolLpExchangeRateTask PoolAddress.
Used alongside mercurial_pool_address to specify the input token for a swap.
Optional
mercurialMercurial finance pool address. A full list can be found here: https://github.com/mercurial-finance/stable-swap-n-pool-js
Optional
orcaPool address for an Orca LP pool or whirlpool. A full list of Orca LP pools can be found here: https://www.orca.so/pools
Optional
orca@deprecated Use orcaPoolAddress
Used alongside mercurial_pool_address to specify the output token for a swap.
Optional
portThe Port reserve pubkey. A full list can be found here: https://api-v1.port.finance/reserves
Optional
raydiumThe Raydium liquidity pool ammId. A full list can be found here: https://raydium.io/pools
Optional
saberSaber pool address. A full list can be found here: https://github.com/saber-hq/saber-registry-dist
Static
createCreates a new LpExchangeRateTask instance using the specified properties.
Optional
properties: ILpExchangeRateTaskProperties to set
LpExchangeRateTask instance
Static
decodeDecodes a LpExchangeRateTask message from the specified reader or buffer.
Reader or buffer to decode from
Optional
length: numberMessage length if known beforehand
LpExchangeRateTask
If the payload is not a reader or valid buffer
If required fields are missing
Static
decodeDecodes a LpExchangeRateTask message from the specified reader or buffer, length delimited.
Reader or buffer to decode from
LpExchangeRateTask
If the payload is not a reader or valid buffer
If required fields are missing
Static
encodeEncodes the specified LpExchangeRateTask message. Does not implicitly verify messages.
LpExchangeRateTask message or plain object to encode
Optional
writer: WriterWriter to encode to
Writer
Static
encodeEncodes the specified LpExchangeRateTask message, length delimited. Does not implicitly verify messages.
LpExchangeRateTask message or plain object to encode
Optional
writer: WriterWriter to encode to
Writer
Static
fromCreates a LpExchangeRateTask message from a plain object. Also converts values to their respective internal types.
Plain object
LpExchangeRateTask
Static
getStatic
toCreates a plain object from a LpExchangeRateTask message. Also converts values to other types if specified.
LpExchangeRateTask
Optional
options: IConversionOptionsConversion options
Plain object
Static
verify
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