/** * @module utils.zeroExExchange */ import { EthAddress } from '../types'; import { SellAction } from '../actions/basic'; /** * Gets price estimate for selling a specific amount. * Example: getBestExchangePrice('1', 'ETH', 'DAI') - swapping 1 ETH for some DAI * * @param sellAmount amount of sellToken (not in wei) * @param sellToken Symbol for asset being sold * @param buyToken Symbol for asset being bought * @returns price of sellToken in buyToken */ export declare const estimateSellPrice: (sellAmount: string, sellToken: string, buyToken: string) => Promise; /** * Gets price estimate for buying a specific amount. * Example: estimateBuyPrice('1000', 'DAI', 'ETH') - swapping 1000 DAI for some ETH * * @param buyAmount amount of buyToken (not in wei) * @param buyToken Symbol for asset being bought * @param sellToken Symbol for asset being sold * @returns price of sellToken in buyToken */ export declare const estimateBuyPrice: (buyAmount: string, buyToken: string, sellToken: string) => Promise; /** * Fetches prices and creates order ready to be passed to transaction. * This should only be called when before sending tx, not to be used for just querying the price. * For that purpose, the estimateSellPrice method can be used. * * @param sellAmount Amount of asset being sold ('1.5') * @param sellToken Symbol for asset being sold ('ETH') * @param buyToken Symbol for asset being bought ('DAI') * @param expectedPrice Price received from estimatePrice (so minPrice can be calculated based on what user saw) * @param acceptedSlippagePercent Slippage percentage tolerated [0-100] * @param fromAccount Withdraw funds from this addr * @param toAccount Send funds to this addr */ export declare const createSellAction: (sellAmount: string, sellToken: string, buyToken: string, expectedPrice: string, acceptedSlippagePercent: string | number, fromAccount: EthAddress, toAccount: EthAddress) => Promise;