code: def buy(ctx, buy_amount, buy_asset, price, sell_asset, order_expiration, account):
      
      amount = Amount(buy_amount, buy_asset)
      price = Price(
          price, base=sell_asset, quote=buy_asset, bitshares_instance=ctx.bitshares
      )
      print_tx(
          price.market.buy(price, amount, account=account, expiration=order_expiration)
      )
docs: Buy a specific asset at a certain rate against a base asset