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 |
| Address of coin being sent. |
to |
| Address of coin being received. |
amount |
| Quantity of |
Returned Values
Name | Plugin Type | Description |
---|---|---|
poolAddress |
| Address of the pool offering the best rate |
expectedAmount |
| Expected amount received in the swap. |
Example
Example with initParams
Example without initParams
Learn more
Learn more about Curve exchange here
Last updated