GetBestRate
Curve Getter Plugin - GetBestRate
Description
Find the pool offering the best rate for a given swap.
Method
get_best_rate(address, address, uint256)
Input Parameters
No required input parameters
Method Parameters
Name
Plugin Type
Description
from
FctAddress
Address of coin being sent.
to
FctAddress
Address of coin being received.
amount
FctValue
Quantity of from
being sent.
Returned Values
Name
Plugin Type
Description
poolAddress
FctAddress
Address of the pool offering the best rate
expectedAmount
FctValue
Expected amount received in the swap.
Example
Example with initParams
Example without initParams
Learn more
Learn more about Curve exchange here
Last updated