code: def buy_market_order(self, amount):
          
          amount = str(amount)
          self._log("buy {} {} at market price".format(amount, self.major))
          return self._rest_client.post(
              endpoint='/buy',
              payload={'book': self.name, 'amount': amount}
          )
docs: Place a buy order at market price.
  
          :param amount: Amount of major currency to buy at market price.
          :type amount: int | float | str | unicode | decimal.Decimal
          :return: Order details.
          :rtype: dict