We already have a space treaty.
And about the only thing it has been effective at preventing is orbiting nuclear weapons.