contract IAutoTrader {

    // ============ Public Functions ============

    /**
     * Allows traders to make trades approved by this smart contract. The active trader's account is
     * the takerAccount and the passive account (for which this contract approves trades
     * on-behalf-of) is the makerAccount.
     *
     * @param  inputMarketId   The market for which the trader specified the original amount
     * @param  outputMarketId  The market for which the trader wants the resulting amount specified
     * @param  makerAccount    The account for which this contract is making trades
     * @param  takerAccount    The account requesting the trade
     * @param  oldInputPar     The old principal amount for the makerAccount for the inputMarketId
     * @param  newInputPar     The new principal amount for the makerAccount for the inputMarketId
     * @param  inputWei        The change in token amount for the makerAccount for the inputMarketId
     * @param  data            Arbitrary data passed in by the trader
     * @return                 The AssetAmount for the makerAccount for the outputMarketId
     */
    function getTradeCost(
        uint256 inputMarketId,
        uint256 outputMarketId,
        Account.Info memory makerAccount,
        Account.Info memory takerAccount,
        Types.Par memory oldInputPar,
        Types.Par memory newInputPar,
        Types.Wei memory inputWei,
        bytes memory data
    )
        public
        returns (Types.AssetAmount memory);
}
/**
 * @title IAutoTrader
 * @author dYdX
 *
 * Interface that Auto-Traders for Solo must implement in order to approve trades.
 */
function getTradeCost(
    uint256 inputMarketId,
    uint256 outputMarketId,
    Account.Info memory makerAccount,
    Account.Info memory takerAccount,
    Types.Par memory oldInputPar,
    Types.Par memory newInputPar,
    Types.Wei memory inputWei,
    bytes memory data
)
    public
    returns (Types.AssetAmount memory);

/**
 * Allows traders to make trades approved by this smart contract. The active trader's account is
 * the takerAccount and the passive account (for which this contract approves trades
 * on-behalf-of) is the makerAccount.
 *
 * @param  inputMarketId   The market for which the trader specified the original amount
 * @param  outputMarketId  The market for which the trader wants the resulting amount specified
 * @param  makerAccount    The account for which this contract is making trades
 * @param  takerAccount    The account requesting the trade
 * @param  oldInputPar     The old principal amount for the makerAccount for the inputMarketId
 * @param  newInputPar     The new principal amount for the makerAccount for the inputMarketId
 * @param  inputWei        The change in token amount for the makerAccount for the inputMarketId
 * @param  data            Arbitrary data passed in by the trader
 * @return                 The AssetAmount for the makerAccount for the outputMarketId
 */