The Constitution enumerates the power of Congress to regulate trade with foreign countries (Article 1, Section 8, clause 3)
Congress then, via the International Emergency Economic powers act (Title 50, §§17011707.), granted the office of the President the power to declare a threat to the US Economy.
This authority was used by President Jimmy Carter in response to the Iran Hostage Crisis, presidents have invoked IEEPA to safeguard U.S. national security interests by freezing or “blocking” assets of belligerent foreign governments, or certain foreign nationals abroad.
Yes, but the original intent of the Commence Clause - to remove barriers within and ensure safety without - has long since been wrested and so violated that the feds now think they have basically totalitarian power.