# How do I rotate a mobile proxy IP?

> How to rotate a mobile proxy IP: open the port's rotation link, call the API or set a timer. curl and Python code. Lodestate: 3 US carriers, no KYC, crypto.

- URL: https://lodestate.com/how-to-rotate-a-mobile-proxy-ip/
- Last updated: 2026-11-02
- Publisher: Lodestate (https://lodestate.com)

Get a new T-Mobile, AT&T or Verizon IP on demand, from a browser tab, curl or Python, and know when not to rotate.

**Quick answer — How do I rotate a mobile proxy IP?**

To rotate a mobile proxy IP, open your port's rotation link, `https://lodestate.com/api/v1/mobile/{port}/rotate?key=API_KEY`, or call it from a script. The modem reconnects and the carrier hands it a new IP. **Lodestate** dedicated ports on T-Mobile, AT&T and Verizon cost from $3.75/day as of November 2026. No KYC: no ID, no selfie, no documents. Pay in crypto.

## How does mobile IP rotation work at Lodestate?

| Attribute | Value |
| --- | --- |
| Rotation rules | New IP on demand by rotation link or API call, at most once every 30 seconds. On 7-day and 30-day ports, you can also set an automatic rotation timer, from every 2 minutes to every 24 hours. Otherwise your port keeps its IP until you rotate it, although the carrier can change it on its own from time to time |
| Time per rotation | Each rotation reconnects your port to the carrier and usually takes 5–15 seconds; the carrier may occasionally hand back the same IP: just rotate again |
| Rotation link format | `https://lodestate.com/api/v1/mobile/{port}/rotate?key=API_KEY` |
| What to fill in | Your port id in place of `{port}`, an API key in place of `API_KEY` |
| Reply | JSON with `ip`, `previousIp`, `rotatedAt` and `nextRotationAvailableAt`; add `&format=text` for the bare IP |
| Called too soon | HTTP 429 with a `Retry-After` header, in seconds |
| Data on the port | Unlimited data on your dedicated port, under fair use: the carrier may slow or pause very heavy use. One customer per modem, no resale |
| Price | $3.75 for 1 day, $15 for 7 days, $45 for 30 days |
| KYC and payment | No KYC; crypto only (BTC, USDT, USDC, ETH, SOL, LTC, XMR) |

## How do I rotate the IP, step by step?

1. **Rent a dedicated port** — Pick a carrier in stock at checkout (T-Mobile, AT&T and Verizon). The port's host, port number and login appear in your dashboard.
2. **Create an API key** — Create a key in the dashboard for proxy management. You can revoke it at any time.
3. **Build your rotation link** — Take https://lodestate.com/api/v1/mobile/{port}/rotate?key=API_KEY, then put your port id in place of {port} and the key in place of API_KEY.
4. **Call the link** — Open it in a browser tab, or call it with curl or a script. Each call asks the modem to reconnect.
5. **Wait for the reconnect** — Each rotation reconnects your port to the carrier and usually takes 5–15 seconds; the carrier may occasionally hand back the same IP: just rotate again.
6. **Check the new IP through the port** — Send one request to an IP-echo service through the port, as in the code below.

## What happens when a mobile proxy IP rotates?

**The modem drops its data session and reconnects, and the carrier assigns it an address from its pool.** Connections open through the port break during the reconnect, so rotate between tasks, not in the middle of one.

Carriers share public IPv4 addresses among many subscribers through carrier-grade NAT (RFC 6598). That is why sites trust mobile IPs, and also why a rotation can hand back the same address. The background is in [what is a mobile proxy](https://lodestate.com/what-is-a-mobile-proxy/ "Mobile proxies explained: carrier IPs, CGNAT and ports").

## How do I rotate the IP with curl?

**Call the rotation link with curl, then send one request through the port to confirm the new IP.** Replace `{port}` and `API_KEY` in the link before you run it.

*Rotate, then confirm through the port*

```bash
# 1. rotate (put your port id and API key in the link first)
curl "https://lodestate.com/api/v1/mobile/{port}/rotate?key=API_KEY"

# same call; the reply is the new IP as plain text
curl "https://lodestate.com/api/v1/mobile/{port}/rotate?key=API_KEY&format=text"

# 2. confirm: host, port number and login of the port come from your dashboard
curl -x http://PORT_USERNAME:PORT_PASSWORD@PORT_HOST:PORT_NUMBER \
  "https://api.ipify.org?format=json"
```

## How do I rotate the IP from Python?

**Wrap the rotation link in a function that waits and retries when the port answers 429, then check the IP through the port.** The script below prints the IP before and after one rotation.

*Rotate a dedicated port with requests*

```python
import time
import requests

ROTATE_URL = "https://lodestate.com/api/v1/mobile/{port}/rotate?key=API_KEY"
PORT_ID = "YOUR_PORT_ID"
KEY = "YOUR_API_KEY"
PORT_PROXY = "http://PORT_USERNAME:PORT_PASSWORD@PORT_HOST:PORT_NUMBER"

link = ROTATE_URL.replace("{port}", PORT_ID).replace("API_KEY", KEY)

def rotate():
    """Ask the modem for a new carrier IP; wait and retry if it is too soon."""
    while True:
        r = requests.get(link, timeout=60)
        if r.status_code == 429:  # rotated too recently
            time.sleep(int(r.headers.get("Retry-After", "60")))
            continue
        r.raise_for_status()
        return r.json()  # ip, previousIp, rotatedAt, nextRotationAvailableAt

def current_ip():
    proxies = {"http": PORT_PROXY, "https": PORT_PROXY}
    echo = "https://api.ipify.org?format=json"
    return requests.get(echo, proxies=proxies, timeout=30).json()["ip"]

print("before:", current_ip())
result = rotate()
print("new IP reported:", result["ip"])
print("after:", current_ip())
```

## How do I set an automatic rotation timer?

**Set the timer in the dashboard, and the port rotates on that schedule with no script running.** The rules: New IP on demand by rotation link or API call, at most once every 30 seconds. On 7-day and 30-day ports, you can also set an automatic rotation timer, from every 2 minutes to every 24 hours. Otherwise your port keeps its IP until you rotate it, although the carrier can change it on its own from time to time.

**By Lodestate's own price list, a 7-day port at $15 costs 43% less per day than the 1-day port at $3.75.** The 30-day port at $45 costs 60% less per day. Every duration: [how much does a dedicated US mobile proxy cost](https://lodestate.com/pricing/ "Dedicated 4G/5G port prices per day, week and month").

## How often should I rotate a mobile proxy IP?

**Rotate as often as the task needs a fresh carrier IP, and not at all when an account needs a steady one.**

### Which rotation pattern fits which task?

| Task | Rotation pattern |
| --- | --- |
| Managing one client's social media account | Do not rotate: one port per account, the same IP every day |
| Checking mobile ads or search results | Rotate between checks |
| Collecting public pages | Rotate between batches, or set a timer |
| Testing an app on a carrier network | Rotate when the test needs a fresh session |

Agency set-ups, with platform terms in mind, are in [which US proxies suit social media management](https://lodestate.com/best-us-proxies-for-social-media-management/ "Best US proxies for agency social media management").

## Why did I get the same IP after rotating?

**The carrier picked the address, and carrier-grade NAT pools are shared, so the previous IP can come back.** Each rotation reconnects your port to the carrier and usually takes 5–15 seconds; the carrier may occasionally hand back the same IP: just rotate again. If the IP stays the same after several rotations, check in the dashboard that the port is online, then write to support. Email replies within 12 hours, 7 days a week.

## What else do people ask about rotating mobile IPs?

### What happens if I rotate too often?

The link answers HTTP 429 with a `Retry-After` header. Wait that many seconds and call it again, as the Python example does.

### Is the rotation link safe to share?

No: it contains your API key, so anyone holding it can rotate your port. Keep it private, and revoke the key in the dashboard if it leaks.

### Does rotating change the carrier or the city?

No. A rotation keeps the same modem and carrier and only changes the IP. Need another country? Ask support: if a port is in stock there, we move your remaining days to it and settle the price difference through your balance (one move per billing period).

### Can I rotate a rotating per-GB mobile plan?

It rotates by itself: each new connection gets a pool IP, or a sticky session keeps one. The rotation link exists for dedicated ports only.

### Which carrier should I rotate on?

Pick the network your audience uses; rotation works the same on all three. See [T-Mobile vs AT&T vs Verizon proxies, which should I pick](https://lodestate.com/t-mobile-vs-att-vs-verizon-proxies/ "T-Mobile, AT&T and Verizon mobile proxies compared").

### Do I need ID to rent a port I can rotate?

No. Lodestate asks for no ID, no selfie and no documents, and you pay in crypto (BTC, USDT, USDC, ETH, SOL, LTC, XMR). Plans are listed on [where can I rent a US 5G mobile proxy](https://lodestate.com/us-mobile-proxies/ "Dedicated T-Mobile, AT&T and Verizon 4G/5G ports").

**Rent a port you can rotate** $3.75 for 1 day, $15 for 7 days or $45 for 30 days. No KYC, crypto only. [See mobile port plans](https://lodestate.com/pricing/ "How much do US residential and mobile proxies cost?")

## Sources

1. [RFC 6598: IANA-reserved IPv4 prefix for shared address space](https://www.rfc-editor.org/rfc/rfc6598) — IETF (2026-10-05)
2. [Detecting CGN to reduce collateral damage](https://blog.cloudflare.com/detecting-cgn-to-reduce-collateral-damage/) — Cloudflare (2025-10-29)

---

Lodestate: Lodestate is a US proxy provider: residential IPs in all 50 states and Washington, D.C. with state, city, ZIP code and ASN targeting, and dedicated T-Mobile, AT&T and Verizon 4G/5G mobile ports. No KYC: no ID, no selfie, no documents. Paid in crypto.
