That depends entirely on what the intent is. If the intent is to launder money then yes it is probably illegal. If the intent is to swap notes with your favourite serial numbers then yes it is probably legal. Intent is a important part of most legislations.