<!--
{
  "availability" : [

  ],
  "documentType" : "symbol",
  "framework" : "Tor",
  "identifier" : "/documentation/Tor/TorControlClient/newIdentity()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Tor"
    ],
    "preciseIdentifier" : "s:3Tor0A13ControlClientC11newIdentityyyYaKF"
  },
  "title" : "newIdentity()"
}
-->

# newIdentity()

Ask Tor to rotate circuits (`SIGNAL NEWNYM`).

```
func newIdentity() async throws
```

## Discussion

Tor builds fresh circuits for new streams going forward;
already-established streams remain on their existing circuits
until closed. Useful for rotating exits between anonymised
request batches.

> Throws: ``doc://Tor/documentation/Tor/TorError/controlProtocolError(code:message:)`` if
> the signal is rejected.

> Note: `NEWNYM` is rate-limited by Tor (default 10 seconds
> between signals). Rapid re-invocation is silently
> coalesced; observe ``doc://Tor/documentation/Tor/TorEvent/log(level:message:)`` at
> ``doc://Tor/documentation/Tor/TorLogLevel/notice`` for the coalesce notice.