Grate 1 half of the onion. Combine grated onion, ground beef, egg, parsley, bread crumbs, mustard, 1 teaspoon salt, and pepper in a bowl. Mix together; form into meatballs.
Turn on a multi-functional pressure cooker (such as Instant Pot(R)) and select Saute function. Coat bottom of the pot with 1 tablespoon oil. Cook meatballs until browned, 5 to 7 minutes. Turn and cook until browned on the other side, 5 to 7 minutes more.
Place the remaining onion half, tomato puree, butter, and 1 teaspoon salt in the pot. Close and lock the lid. Select the Meat or Stew function; set timer for 20 minutes. Allow 10 to 15 minutes for pressure to build.
Bring a large pot of lightly salted water to a boil. Cook spaghetti in the boiling water, stirring occasionally, until tender yet firm to the bite, about 12 minutes. Drain; add 1 1/2 teaspoons olive oil to keep spaghetti from sticking.
Release pressure carefully using the quick-release method according to manufacturer's instructions, about 5 minutes. Unlock and remove lid. Remove onion and discard. Serve meatball sauce over the spaghetti.